@agnos-ui/angular-bootstrap 0.7.1 → 0.8.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.
@@ -13,6 +13,6 @@ import * as i11 from "./components/collapse/collapse.component";
13
13
  import * as i12 from "./components/tree/tree.component";
14
14
  export declare class AgnosUIAngularModule {
15
15
  static ɵfac: i0.ɵɵFactoryDeclaration<AgnosUIAngularModule, never>;
16
- 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 i12.TreeComponent, typeof i12.TreeStructureDirective, typeof i12.TreeItemToggleDirective, typeof i12.TreeItemContentDirective, typeof i12.TreeItemDirective], [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 i12.TreeComponent, typeof i12.TreeStructureDirective, typeof i12.TreeItemToggleDirective, typeof i12.TreeItemContentDirective, typeof i12.TreeItemDirective]>;
16
+ 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 i8.SliderTickDirective, 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 i11.CollapseTriggerDirective, typeof i12.TreeComponent, typeof i12.TreeStructureDirective, typeof i12.TreeItemToggleDirective, typeof i12.TreeItemContentDirective, typeof i12.TreeItemDirective], [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 i8.SliderTickDirective, 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 i11.CollapseTriggerDirective, typeof i12.TreeComponent, typeof i12.TreeStructureDirective, typeof i12.TreeItemToggleDirective, typeof i12.TreeItemContentDirective, typeof i12.TreeItemDirective]>;
17
17
  static ɵinj: i0.ɵɵInjectorDeclaration<AgnosUIAngularModule>;
18
18
  }
@@ -1,5 +1,6 @@
1
1
  import { BaseWidgetDirective } from '@agnos-ui/angular-headless';
2
2
  import type { CollapseWidget } from '@agnos-ui/core-bootstrap/components/collapse';
3
+ import { type OnInit } from '@angular/core';
3
4
  import * as i0 from "@angular/core";
4
5
  /**
5
6
  * Directive to control the collapse behavior of an element.
@@ -73,3 +74,10 @@ export declare class CollapseDirective extends BaseWidgetDirective<CollapseWidge
73
74
  static ɵfac: i0.ɵɵFactoryDeclaration<CollapseDirective, never>;
74
75
  static ɵdir: i0.ɵɵDirectiveDeclaration<CollapseDirective, "[auCollapse]", ["auCollapse"], { "animatedOnInit": { "alias": "auAnimatedOnInit"; "required": false; "isSignal": true; }; "animated": { "alias": "auAnimated"; "required": false; "isSignal": true; }; "className": { "alias": "auClassName"; "required": false; "isSignal": true; }; "horizontal": { "alias": "auHorizontal"; "required": false; "isSignal": true; }; "visible": { "alias": "auVisible"; "required": false; "isSignal": true; }; "id": { "alias": "auId"; "required": false; "isSignal": true; }; }, { "visibleChange": "auVisibleChange"; "hidden": "auHidden"; "shown": "auShown"; }, never, never, true, never>;
75
76
  }
77
+ export declare class CollapseTriggerDirective implements OnInit {
78
+ readonly auCollapseTrigger: import("@angular/core").InputSignal<CollapseDirective>;
79
+ private readonly injector;
80
+ ngOnInit(): Promise<void>;
81
+ static ɵfac: i0.ɵɵFactoryDeclaration<CollapseTriggerDirective, never>;
82
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CollapseTriggerDirective, "[auCollapseTrigger]", never, { "auCollapseTrigger": { "alias": "auCollapseTrigger"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
83
+ }
@@ -134,6 +134,10 @@ export interface CollapseDirectives {
134
134
  * Directive to apply the collapse.
135
135
  */
136
136
  collapseDirective: Directive;
137
+ /**
138
+ * Directive to apply to a trigger;
139
+ */
140
+ triggerDirective: Directive;
137
141
  }
138
142
  /**
139
143
  * Represents a widget for handling collapse functionality.
@@ -1,7 +1,8 @@
1
1
  import type { SlotContent } from '@agnos-ui/angular-headless';
2
2
  import { BaseWidgetDirective } from '@agnos-ui/angular-headless';
3
3
  import { TemplateRef } from '@angular/core';
4
- import type { SliderContext, SliderSlotHandleContext, SliderSlotLabelContext, SliderWidget } from './slider.gen';
4
+ import { type ControlValueAccessor } from '@angular/forms';
5
+ import type { SliderContext, SliderSlotHandleContext, SliderSlotLabelContext, SliderSlotTickContext, SliderWidget } from './slider.gen';
5
6
  import * as i0 from "@angular/core";
6
7
  /**
7
8
  * Directive to provide a template reference for slider labels.
@@ -17,7 +18,7 @@ export declare class SliderLabelDirective {
17
18
  /**
18
19
  * Directive representing a handle for a slider component.
19
20
  *
20
- * This directive uses a template reference to render the {@link SliderSlotLabelContext}.
21
+ * This directive uses a template reference to render the {@link SliderSlotHandleContext}.
21
22
  */
22
23
  export declare class SliderHandleDirective {
23
24
  templateRef: TemplateRef<any>;
@@ -29,6 +30,21 @@ export declare class SliderHandleDirective {
29
30
  * A constant representing the default slot handle for the slider component.
30
31
  */
31
32
  export declare const sliderDefaultSlotHandle: SlotContent<SliderSlotHandleContext>;
33
+ /**
34
+ * Directive representing a tick for a slider component.
35
+ *
36
+ * This directive uses a template reference to render the {@link SliderSlotTickContext}.
37
+ */
38
+ export declare class SliderTickDirective {
39
+ templateRef: TemplateRef<any>;
40
+ static ngTemplateContextGuard(_dir: SliderTickDirective, context: unknown): context is SliderSlotTickContext;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<SliderTickDirective, never>;
42
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SliderTickDirective, "ng-template[auSliderTick]", never, {}, {}, never, never, true, never>;
43
+ }
44
+ /**
45
+ * A constant representing the default slot tick for the slider component.
46
+ */
47
+ export declare const sliderDefaultSlotTick: SlotContent<SliderSlotTickContext>;
32
48
  /**
33
49
  * Directive that provides structure for the slider component.
34
50
  *
@@ -49,7 +65,7 @@ export declare const sliderDefaultSlotStructure: SlotContent<SliderContext>;
49
65
  * to provide a customizable slider widget. This component allows for various
50
66
  * configurations and customizations through its inputs and outputs.
51
67
  */
52
- export declare class SliderComponent extends BaseWidgetDirective<SliderWidget> {
68
+ export declare class SliderComponent extends BaseWidgetDirective<SliderWidget> implements ControlValueAccessor {
53
69
  /**
54
70
  * CSS classes to be applied on the widget main container
55
71
  *
@@ -147,6 +163,25 @@ export declare class SliderComponent extends BaseWidgetDirective<SliderWidget> {
147
163
  * @defaultValue `false`
148
164
  */
149
165
  readonly vertical: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
166
+ /**
167
+ * If `true` the ticks are displayed on the slider
168
+ *
169
+ * @defaultValue `false`
170
+ */
171
+ readonly showTicks: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
172
+ /**
173
+ * Unit value between the ticks
174
+ * If value is set to `0` the {@link stepSize} is used to space the ticks
175
+ *
176
+ * @defaultValue `0`
177
+ */
178
+ readonly tickInterval: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
179
+ /**
180
+ * If `true` the tick values are displayed on the slider
181
+ *
182
+ * @defaultValue `true`
183
+ */
184
+ readonly showTickValues: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
150
185
  /**
151
186
  * An event emitted when slider values are changed
152
187
  *
@@ -178,6 +213,11 @@ export declare class SliderComponent extends BaseWidgetDirective<SliderWidget> {
178
213
  */
179
214
  readonly handle: import("@angular/core").InputSignal<SlotContent<SliderSlotHandleContext>>;
180
215
  readonly slotHandleFromContent: import("@angular/core").Signal<SliderHandleDirective | undefined>;
216
+ /**
217
+ * Slot to change the ticks
218
+ */
219
+ readonly tick: import("@angular/core").InputSignal<SlotContent<SliderSlotTickContext>>;
220
+ readonly slotTickFromContent: import("@angular/core").Signal<SliderTickDirective | undefined>;
181
221
  constructor();
182
222
  /**
183
223
  * Control value accessor methods
@@ -190,5 +230,5 @@ export declare class SliderComponent extends BaseWidgetDirective<SliderWidget> {
190
230
  setDisabledState(isDisabled: boolean): void;
191
231
  handleBlur(): void;
192
232
  static ɵfac: i0.ɵɵFactoryDeclaration<SliderComponent, never>;
193
- static ɵcmp: i0.ɵɵComponentDeclaration<SliderComponent, "[auSlider]", never, { "className": { "alias": "auClassName"; "required": false; "isSignal": true; }; "min": { "alias": "auMin"; "required": false; "isSignal": true; }; "max": { "alias": "auMax"; "required": false; "isSignal": true; }; "stepSize": { "alias": "auStepSize"; "required": false; "isSignal": true; }; "values": { "alias": "auValues"; "required": false; "isSignal": true; }; "rtl": { "alias": "auRtl"; "required": false; "isSignal": true; }; "showValueLabels": { "alias": "auShowValueLabels"; "required": false; "isSignal": true; }; "showMinMaxLabels": { "alias": "auShowMinMaxLabels"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "auAriaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "auAriaLabelledBy"; "required": false; "isSignal": true; }; "ariaValueText": { "alias": "auAriaValueText"; "required": false; "isSignal": true; }; "readonly": { "alias": "auReadonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "auDisabled"; "required": false; "isSignal": true; }; "vertical": { "alias": "auVertical"; "required": false; "isSignal": true; }; "label": { "alias": "auLabel"; "required": false; "isSignal": true; }; "structure": { "alias": "auStructure"; "required": false; "isSignal": true; }; "handle": { "alias": "auHandle"; "required": false; "isSignal": true; }; }, { "valuesChange": "auValuesChange"; }, ["slotLabelFromContent", "slotStructureFromContent", "slotHandleFromContent"], never, true, never>;
233
+ static ɵcmp: i0.ɵɵComponentDeclaration<SliderComponent, "[auSlider]", never, { "className": { "alias": "auClassName"; "required": false; "isSignal": true; }; "min": { "alias": "auMin"; "required": false; "isSignal": true; }; "max": { "alias": "auMax"; "required": false; "isSignal": true; }; "stepSize": { "alias": "auStepSize"; "required": false; "isSignal": true; }; "values": { "alias": "auValues"; "required": false; "isSignal": true; }; "rtl": { "alias": "auRtl"; "required": false; "isSignal": true; }; "showValueLabels": { "alias": "auShowValueLabels"; "required": false; "isSignal": true; }; "showMinMaxLabels": { "alias": "auShowMinMaxLabels"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "auAriaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "auAriaLabelledBy"; "required": false; "isSignal": true; }; "ariaValueText": { "alias": "auAriaValueText"; "required": false; "isSignal": true; }; "readonly": { "alias": "auReadonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "auDisabled"; "required": false; "isSignal": true; }; "vertical": { "alias": "auVertical"; "required": false; "isSignal": true; }; "showTicks": { "alias": "auShowTicks"; "required": false; "isSignal": true; }; "tickInterval": { "alias": "auTickInterval"; "required": false; "isSignal": true; }; "showTickValues": { "alias": "auShowTickValues"; "required": false; "isSignal": true; }; "label": { "alias": "auLabel"; "required": false; "isSignal": true; }; "structure": { "alias": "auStructure"; "required": false; "isSignal": true; }; "handle": { "alias": "auHandle"; "required": false; "isSignal": true; }; "tick": { "alias": "auTick"; "required": false; "isSignal": true; }; }, { "valuesChange": "auValuesChange"; }, ["slotLabelFromContent", "slotStructureFromContent", "slotHandleFromContent", "slotTickFromContent"], never, true, never>;
194
234
  }
@@ -31,6 +31,15 @@ export interface SliderSlotHandleContext extends SliderContext {
31
31
  */
32
32
  item: SliderHandle;
33
33
  }
34
+ /**
35
+ * Represents the context for a slider tick slot
36
+ */
37
+ export interface SliderSlotTickContext extends SliderContext {
38
+ /**
39
+ * tick context
40
+ */
41
+ tick: SliderTick;
42
+ }
34
43
  /**
35
44
  * Represents the state of a slider component.
36
45
  */
@@ -75,6 +84,10 @@ export interface SliderState {
75
84
  * Check if the slider is interactive, meaning it is not disabled or readonly
76
85
  */
77
86
  interactive: boolean;
87
+ /**
88
+ * Array of ticks to display on the slider component
89
+ */
90
+ ticks: SliderTick[];
78
91
  /**
79
92
  * Minimum value that can be assigned to the slider
80
93
  *
@@ -129,6 +142,12 @@ export interface SliderState {
129
142
  * @defaultValue `true`
130
143
  */
131
144
  showMinMaxLabels: boolean;
145
+ /**
146
+ * If `true` the ticks are displayed on the slider
147
+ *
148
+ * @defaultValue `false`
149
+ */
150
+ showTicks: boolean;
132
151
  /**
133
152
  * It `true` slider display is inversed
134
153
  *
@@ -158,6 +177,10 @@ export interface SliderState {
158
177
  * Slot to change the handlers
159
178
  */
160
179
  handle: SlotContent<SliderSlotHandleContext>;
180
+ /**
181
+ * Slot to change the ticks
182
+ */
183
+ tick: SlotContent<SliderSlotTickContext>;
161
184
  }
162
185
  /**
163
186
  * Represents the properties for the Slider component.
@@ -205,6 +228,19 @@ export interface SliderProps {
205
228
  * ```
206
229
  */
207
230
  onValuesChange: (values: number[]) => void;
231
+ /**
232
+ * Unit value between the ticks
233
+ * If value is set to `0` the {@link stepSize} is used to space the ticks
234
+ *
235
+ * @defaultValue `0`
236
+ */
237
+ tickInterval: number;
238
+ /**
239
+ * If `true` the tick values are displayed on the slider
240
+ *
241
+ * @defaultValue `true`
242
+ */
243
+ showTickValues: boolean;
208
244
  /**
209
245
  * Minimum value that can be assigned to the slider
210
246
  *
@@ -259,6 +295,12 @@ export interface SliderProps {
259
295
  * @defaultValue `true`
260
296
  */
261
297
  showMinMaxLabels: boolean;
298
+ /**
299
+ * If `true` the ticks are displayed on the slider
300
+ *
301
+ * @defaultValue `false`
302
+ */
303
+ showTicks: boolean;
262
304
  /**
263
305
  * It `true` slider display is inversed
264
306
  *
@@ -288,6 +330,10 @@ export interface SliderProps {
288
330
  * Slot to change the handlers
289
331
  */
290
332
  handle: SlotContent<SliderSlotHandleContext>;
333
+ /**
334
+ * Slot to change the ticks
335
+ */
336
+ tick: SlotContent<SliderSlotTickContext>;
291
337
  }
292
338
  /**
293
339
  * Represents a slider widget component.
@@ -371,6 +417,35 @@ export interface SliderHandle {
371
417
  */
372
418
  ariaLabelledBy: string | undefined;
373
419
  }
420
+ /**
421
+ * Represents a tick in a slider component.
422
+ */
423
+ export interface SliderTick {
424
+ /**
425
+ * CSS classes to be applied on the tick
426
+ */
427
+ className?: string | null;
428
+ /**
429
+ * Visualized optional explanation of the label
430
+ */
431
+ legend?: string | null;
432
+ /**
433
+ * Position of the tick in percent
434
+ */
435
+ position: number;
436
+ /**
437
+ * If `true` the tick has selected style
438
+ */
439
+ selected: boolean;
440
+ /**
441
+ * Value of the tick
442
+ */
443
+ value: number;
444
+ /**
445
+ * If `true` the tick label is displayed
446
+ */
447
+ displayLabel: boolean;
448
+ }
374
449
  /**
375
450
  * Interface representing various directives used in the slider component.
376
451
  */
@@ -421,4 +496,16 @@ export interface SliderDirectives {
421
496
  handleLabelDisplayDirective: Directive<{
422
497
  index: number;
423
498
  }>;
499
+ /**
500
+ * Directive to apply to the slider tick
501
+ */
502
+ tickDirective: Directive<{
503
+ tick: SliderTick;
504
+ }>;
505
+ /**
506
+ * Directive to apply to the slider tick label
507
+ */
508
+ tickLabelDirective: Directive<{
509
+ tick: SliderTick;
510
+ }>;
424
511
  }