@agnos-ui/angular-bootstrap 0.4.3 → 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.
- package/README.md +2 -2
- package/agnos-ui-angular.module.d.ts +2 -1
- package/components/accordion/accordion.component.d.ts +40 -18
- package/components/accordion/accordion.gen.d.ts +37 -9
- package/components/alert/alert.component.d.ts +29 -17
- package/components/alert/alert.gen.d.ts +21 -2
- package/components/collapse/collapse.component.d.ts +79 -0
- package/components/collapse/collapse.gen.d.ts +146 -0
- package/components/collapse/index.d.ts +2 -0
- package/components/modal/modal.component.d.ts +13 -19
- package/components/modal/modal.gen.d.ts +35 -18
- package/components/modal/modal.service.d.ts +5 -1
- package/components/pagination/pagination.component.d.ts +20 -15
- package/components/pagination/pagination.gen.d.ts +49 -29
- package/components/progressbar/progressbar.component.d.ts +32 -16
- package/components/progressbar/progressbar.gen.d.ts +21 -4
- package/components/rating/rating.component.d.ts +11 -4
- package/components/rating/rating.gen.d.ts +25 -17
- package/components/select/select.component.d.ts +24 -4
- package/components/select/select.gen.d.ts +41 -25
- package/components/slider/slider.component.d.ts +32 -23
- package/components/slider/slider.gen.d.ts +54 -33
- package/components/toast/toast.component.d.ts +29 -17
- package/components/toast/toast.gen.d.ts +22 -2
- package/config.d.ts +16 -5
- package/config.gen.d.ts +5 -0
- package/esm2022/agnos-ui-angular.module.mjs +12 -5
- package/esm2022/components/accordion/accordion.component.mjs +165 -134
- package/esm2022/components/accordion/accordion.gen.mjs +1 -1
- package/esm2022/components/alert/alert.component.mjs +90 -65
- package/esm2022/components/alert/alert.gen.mjs +1 -1
- package/esm2022/components/collapse/collapse.component.mjs +89 -0
- package/esm2022/components/collapse/collapse.gen.mjs +15 -0
- package/esm2022/components/collapse/index.mjs +3 -0
- package/esm2022/components/modal/modal.component.mjs +111 -99
- package/esm2022/components/modal/modal.gen.mjs +1 -1
- package/esm2022/components/modal/modal.service.mjs +7 -5
- package/esm2022/components/pagination/pagination.component.mjs +138 -123
- package/esm2022/components/pagination/pagination.gen.mjs +1 -1
- package/esm2022/components/progressbar/progressbar.component.mjs +94 -55
- package/esm2022/components/progressbar/progressbar.gen.mjs +1 -1
- package/esm2022/components/rating/rating.component.mjs +41 -35
- package/esm2022/components/rating/rating.gen.mjs +1 -1
- package/esm2022/components/select/select.component.mjs +103 -118
- package/esm2022/components/select/select.gen.mjs +1 -1
- package/esm2022/components/slider/slider.component.mjs +126 -111
- package/esm2022/components/slider/slider.gen.mjs +1 -1
- package/esm2022/components/toast/toast.component.mjs +106 -81
- package/esm2022/components/toast/toast.gen.mjs +1 -1
- package/esm2022/config.gen.mjs +1 -1
- package/esm2022/config.mjs +17 -1
- package/esm2022/index.mjs +2 -1
- package/fesm2022/agnos-ui-angular-bootstrap.mjs +1085 -806
- package/fesm2022/agnos-ui-angular-bootstrap.mjs.map +1 -1
- package/index.d.ts +8 -7
- package/package.json +9 -8
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import type { SlotContent, TransitionFn } from '@agnos-ui/angular-headless';
|
|
2
|
-
import { BaseWidgetDirective
|
|
3
|
-
import type { ModalContext,
|
|
4
|
-
import type { AfterContentChecked } from '@angular/core';
|
|
2
|
+
import { BaseWidgetDirective } from '@agnos-ui/angular-headless';
|
|
3
|
+
import type { ModalContext, ModalWidget, ModalBeforeCloseEvent } from './modal.gen';
|
|
5
4
|
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
/**
|
|
8
7
|
* Directive to provide the slot structure for the modal widget.
|
|
8
|
+
* This directive provides a template reference for the {@link ModalContext<Data>}.
|
|
9
9
|
*/
|
|
10
10
|
export declare class ModalStructureDirective<Data> {
|
|
11
11
|
templateRef: TemplateRef<any>;
|
|
12
|
-
static ngTemplateContextGuard<Data>(
|
|
12
|
+
static ngTemplateContextGuard<Data>(_dir: ModalStructureDirective<Data>, context: unknown): context is ModalContext<Data>;
|
|
13
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalStructureDirective<any>, never>;
|
|
14
14
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ModalStructureDirective<any>, "ng-template[auModalStructure]", never, {}, {}, never, never, true, never>;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Directive to provide the slot header for the modal widget.
|
|
18
|
+
* This directive provides a template reference for the {@link ModalContext<Data>}.
|
|
18
19
|
*/
|
|
19
20
|
export declare class ModalHeaderDirective<Data> {
|
|
20
21
|
templateRef: TemplateRef<any>;
|
|
@@ -24,6 +25,7 @@ export declare class ModalHeaderDirective<Data> {
|
|
|
24
25
|
}
|
|
25
26
|
/**
|
|
26
27
|
* Directive to provide the slot title for the modal widget.
|
|
28
|
+
* This directive provides a template reference for the {@link ModalContext<Data>}.
|
|
27
29
|
*/
|
|
28
30
|
export declare class ModalTitleDirective<Data> {
|
|
29
31
|
templateRef: TemplateRef<any>;
|
|
@@ -33,6 +35,7 @@ export declare class ModalTitleDirective<Data> {
|
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
35
37
|
* Directive to provide the default slot for the modal widget.
|
|
38
|
+
* This directive provides a template reference for the {@link ModalContext<Data>}.
|
|
36
39
|
*/
|
|
37
40
|
export declare class ModalBodyDirective<Data> {
|
|
38
41
|
templateRef: TemplateRef<any>;
|
|
@@ -42,6 +45,7 @@ export declare class ModalBodyDirective<Data> {
|
|
|
42
45
|
}
|
|
43
46
|
/**
|
|
44
47
|
* Directive to provide the slot footer for the modal widget.
|
|
48
|
+
* This directive provides a template reference for the {@link ModalContext<Data>}.
|
|
45
49
|
*/
|
|
46
50
|
export declare class ModalFooterDirective<Data> {
|
|
47
51
|
templateRef: TemplateRef<any>;
|
|
@@ -49,27 +53,18 @@ export declare class ModalFooterDirective<Data> {
|
|
|
49
53
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalFooterDirective<any>, never>;
|
|
50
54
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ModalFooterDirective<any>, "ng-template[auModalFooter]", never, {}, {}, never, never, true, never>;
|
|
51
55
|
}
|
|
52
|
-
/**
|
|
53
|
-
* Component containing the default slots for the modal.
|
|
54
|
-
*/
|
|
55
|
-
export declare class ModalDefaultSlotsComponent<Data> {
|
|
56
|
-
header: TemplateRef<ModalContext<Data>>;
|
|
57
|
-
structure: TemplateRef<ModalContext<Data>>;
|
|
58
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ModalDefaultSlotsComponent<any>, never>;
|
|
59
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ModalDefaultSlotsComponent<any>, "ng-component", never, {}, {}, never, never, true, never>;
|
|
60
|
-
}
|
|
61
56
|
/**
|
|
62
57
|
* Default slot for modal header.
|
|
63
58
|
*/
|
|
64
|
-
export declare const modalDefaultSlotHeader:
|
|
59
|
+
export declare const modalDefaultSlotHeader: SlotContent<ModalContext<any>>;
|
|
65
60
|
/**
|
|
66
61
|
* Default slot for modal structure.
|
|
67
62
|
*/
|
|
68
|
-
export declare const modalDefaultSlotStructure:
|
|
63
|
+
export declare const modalDefaultSlotStructure: SlotContent<ModalContext<any>>;
|
|
69
64
|
/**
|
|
70
65
|
* Modal component.
|
|
71
66
|
*/
|
|
72
|
-
export declare class ModalComponent<Data> extends BaseWidgetDirective<ModalWidget<Data>>
|
|
67
|
+
export declare class ModalComponent<Data> extends BaseWidgetDirective<ModalWidget<Data>> {
|
|
73
68
|
/**
|
|
74
69
|
* Whether the modal and its backdrop (if present) should be animated when shown or hidden.
|
|
75
70
|
*
|
|
@@ -218,9 +213,8 @@ export declare class ModalComponent<Data> extends BaseWidgetDirective<ModalWidge
|
|
|
218
213
|
* ```
|
|
219
214
|
*/
|
|
220
215
|
shown: EventEmitter<void>;
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
ngAfterContentChecked(): void;
|
|
216
|
+
slotChildren?: TemplateRef<void>;
|
|
217
|
+
constructor();
|
|
224
218
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent<any>, never>;
|
|
225
219
|
static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent<any>, "[auModal]", never, { "animated": { "alias": "auAnimated"; "required": false; }; "backdropTransition": { "alias": "auBackdropTransition"; "required": false; }; "modalTransition": { "alias": "auModalTransition"; "required": false; }; "visible": { "alias": "auVisible"; "required": false; }; "backdrop": { "alias": "auBackdrop"; "required": false; }; "closeOnOutsideClick": { "alias": "auCloseOnOutsideClick"; "required": false; }; "container": { "alias": "auContainer"; "required": false; }; "ariaCloseButtonLabel": { "alias": "auAriaCloseButtonLabel"; "required": false; }; "backdropClass": { "alias": "auBackdropClass"; "required": false; }; "closeButton": { "alias": "auCloseButton"; "required": false; }; "className": { "alias": "auClassName"; "required": false; }; "fullscreen": { "alias": "auFullscreen"; "required": false; }; "structure": { "alias": "auStructure"; "required": false; }; "header": { "alias": "auHeader"; "required": false; }; "title": { "alias": "auTitle"; "required": false; }; "children": { "alias": "auChildren"; "required": false; }; "footer": { "alias": "auFooter"; "required": false; }; "contentData": { "alias": "auContentData"; "required": false; }; }, { "visibleChange": "auVisibleChange"; "beforeClose": "auBeforeClose"; "hidden": "auHidden"; "shown": "auShown"; }, ["slotStructureFromContent", "slotHeaderFromContent", "slotTitleFromContent", "slotDefaultFromContent", "slotFooterFromContent"], ["*"], true, never>;
|
|
226
220
|
static ngAcceptInputType_animated: unknown;
|
|
@@ -6,7 +6,18 @@ import type { WidgetSlotContext, SlotContent, TransitionFn, Widget, PropsConfig,
|
|
|
6
6
|
*/
|
|
7
7
|
declare const export_getModalDefaultConfig: () => ModalProps<any>;
|
|
8
8
|
export { export_getModalDefaultConfig as getModalDefaultConfig };
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Represents the context for a modal component.
|
|
11
|
+
*
|
|
12
|
+
* @template Data - The type of data associated with the modal.
|
|
13
|
+
*/
|
|
14
|
+
export interface ModalContext<Data> extends WidgetSlotContext<ModalWidget<Data>> {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Represents the state of a modal component.
|
|
18
|
+
*
|
|
19
|
+
* @template Data - The type of the data associated with the modal.
|
|
20
|
+
*/
|
|
10
21
|
export interface ModalState<Data> {
|
|
11
22
|
/**
|
|
12
23
|
* Whether the backdrop is fully hidden. This can be true either because {@link ModalProps.backdrop|backdrop} is false or
|
|
@@ -98,6 +109,11 @@ export interface ModalState<Data> {
|
|
|
98
109
|
*/
|
|
99
110
|
fullscreen: boolean;
|
|
100
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Interface representing the properties for a modal component.
|
|
114
|
+
*
|
|
115
|
+
* @template Data - The type of data that the modal will handle.
|
|
116
|
+
*/
|
|
101
117
|
export interface ModalProps<Data> {
|
|
102
118
|
/**
|
|
103
119
|
* The transition to use for the backdrop behind the modal (if present).
|
|
@@ -243,6 +259,11 @@ export interface ModalProps<Data> {
|
|
|
243
259
|
*/
|
|
244
260
|
fullscreen: boolean;
|
|
245
261
|
}
|
|
262
|
+
/**
|
|
263
|
+
* Interface representing the API for a modal component.
|
|
264
|
+
*
|
|
265
|
+
* @template Data - The type of data associated with the modal.
|
|
266
|
+
*/
|
|
246
267
|
export interface ModalApi<Data> {
|
|
247
268
|
/**
|
|
248
269
|
* Method to change some modal properties.
|
|
@@ -262,7 +283,12 @@ export interface ModalApi<Data> {
|
|
|
262
283
|
*/
|
|
263
284
|
open(): Promise<any>;
|
|
264
285
|
}
|
|
265
|
-
|
|
286
|
+
/**
|
|
287
|
+
* Represents a modal widget with specific data type.
|
|
288
|
+
*
|
|
289
|
+
* @template Data - The type of data that the modal widget will handle.
|
|
290
|
+
*/
|
|
291
|
+
export type ModalWidget<Data> = Widget<ModalProps<Data>, ModalState<Data>, ModalApi<Data>, ModalDirectives>;
|
|
266
292
|
/**
|
|
267
293
|
* Creates a new modal widget instance.
|
|
268
294
|
* @param config - config of the modal, either as a store or as an object containing values or stores.
|
|
@@ -282,6 +308,9 @@ export { export_modalOutsideClick as modalOutsideClick };
|
|
|
282
308
|
*/
|
|
283
309
|
declare const export_modalCloseButtonClick: typeof modalCloseButtonClick;
|
|
284
310
|
export { export_modalCloseButtonClick as modalCloseButtonClick };
|
|
311
|
+
/**
|
|
312
|
+
* Type of the parameter of {@link ModalProps.onBeforeClose|onBeforeClose}.
|
|
313
|
+
*/
|
|
285
314
|
export interface ModalBeforeCloseEvent {
|
|
286
315
|
/**
|
|
287
316
|
* Result of the modal, which is the value passed to the {@link ModalApi.close|close} method
|
|
@@ -295,21 +324,9 @@ export interface ModalBeforeCloseEvent {
|
|
|
295
324
|
*/
|
|
296
325
|
cancel: boolean;
|
|
297
326
|
}
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
* @param event - mouse event
|
|
302
|
-
*/
|
|
303
|
-
closeButtonClick(event: Pick<MouseEvent, never>): void;
|
|
304
|
-
/**
|
|
305
|
-
* Action to be called when the user clicks on the modal DOM element (which is supposed to have the size of the full viewport).
|
|
306
|
-
* If the click is not done on a descendant of the modal DOM element, it is considered to be done outside the modal
|
|
307
|
-
* and, depending on the value of the {@link ModalProps.closeOnOutsideClick|closeOnOutsideClick} prop, the modal is or isn't closed
|
|
308
|
-
* (with the {@link modalOutsideClick} result).
|
|
309
|
-
* @param event - mouse event
|
|
310
|
-
*/
|
|
311
|
-
modalClick(event: Pick<MouseEvent, 'target' | 'currentTarget'>): void;
|
|
312
|
-
}
|
|
327
|
+
/**
|
|
328
|
+
* Directives of the modal widget.
|
|
329
|
+
*/
|
|
313
330
|
export interface ModalDirectives {
|
|
314
331
|
/**
|
|
315
332
|
* Directive to put on the modal DOM element.
|
|
@@ -332,7 +349,7 @@ export interface ModalDirectives {
|
|
|
332
349
|
*/
|
|
333
350
|
closeButtonDirective: Directive;
|
|
334
351
|
/**
|
|
335
|
-
* Directive to apply to the dialog element when using the native
|
|
352
|
+
* Directive to apply to the dialog element when using the native {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement | HTMLDialogElement}
|
|
336
353
|
*/
|
|
337
354
|
dialogDirective: Directive;
|
|
338
355
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
2
|
import type { ModalProps } from './modal.gen';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
|
|
4
|
+
interface ModalServiceOpenOptions {
|
|
5
5
|
injector?: Injector;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Service to handle the opening and management of modal components.
|
|
9
|
+
*/
|
|
7
10
|
export declare class ModalService {
|
|
8
11
|
private readonly _injector;
|
|
9
12
|
private readonly _applicationRef;
|
|
@@ -11,3 +14,4 @@ export declare class ModalService {
|
|
|
11
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalService, never>;
|
|
12
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<ModalService>;
|
|
13
16
|
}
|
|
17
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { SlotContent } from '@agnos-ui/angular-headless';
|
|
2
|
-
import { BaseWidgetDirective
|
|
3
|
-
import type { AfterContentChecked } from '@angular/core';
|
|
2
|
+
import { BaseWidgetDirective } from '@agnos-ui/angular-headless';
|
|
4
3
|
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
5
4
|
import type { PaginationContext, PaginationNumberContext, PaginationWidget } from './pagination.gen';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
/**
|
|
8
7
|
* A directive to use to give the 'ellipsis' link template to the pagination component
|
|
8
|
+
* This directive provides a template reference for the {@link PaginationContext}.
|
|
9
9
|
*/
|
|
10
10
|
export declare class PaginationEllipsisDirective {
|
|
11
11
|
templateRef: TemplateRef<any>;
|
|
@@ -15,6 +15,7 @@ export declare class PaginationEllipsisDirective {
|
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* A directive to use to give the 'first' link template to the pagination component
|
|
18
|
+
* This directive provides a template reference for the {@link PaginationContext}.
|
|
18
19
|
*/
|
|
19
20
|
export declare class PaginationFirstDirective {
|
|
20
21
|
templateRef: TemplateRef<any>;
|
|
@@ -24,6 +25,7 @@ export declare class PaginationFirstDirective {
|
|
|
24
25
|
}
|
|
25
26
|
/**
|
|
26
27
|
* A directive to use to give the 'last' link template to the pagination component
|
|
28
|
+
* This directive provides a template reference for the {@link PaginationContext}.
|
|
27
29
|
*/
|
|
28
30
|
export declare class PaginationLastDirective {
|
|
29
31
|
templateRef: TemplateRef<any>;
|
|
@@ -33,6 +35,7 @@ export declare class PaginationLastDirective {
|
|
|
33
35
|
}
|
|
34
36
|
/**
|
|
35
37
|
* A directive to use to give the 'next' link template to the pagination component
|
|
38
|
+
* This directive provides a template reference for the {@link PaginationContext}.
|
|
36
39
|
*/
|
|
37
40
|
export declare class PaginationNextDirective {
|
|
38
41
|
templateRef: TemplateRef<any>;
|
|
@@ -42,6 +45,7 @@ export declare class PaginationNextDirective {
|
|
|
42
45
|
}
|
|
43
46
|
/**
|
|
44
47
|
* A directive to use to give the page 'number' template to the pagination component
|
|
48
|
+
* This directive provides a template reference for the {@link PaginationNumberContext}.
|
|
45
49
|
*/
|
|
46
50
|
export declare class PaginationNumberDirective {
|
|
47
51
|
templateRef: TemplateRef<any>;
|
|
@@ -51,6 +55,7 @@ export declare class PaginationNumberDirective {
|
|
|
51
55
|
}
|
|
52
56
|
/**
|
|
53
57
|
* A directive to use to give the 'previous' link template to the pagination component
|
|
58
|
+
* This directive provides a template reference for the {@link PaginationContext}.
|
|
54
59
|
*/
|
|
55
60
|
export declare class PaginationPreviousDirective {
|
|
56
61
|
templateRef: TemplateRef<any>;
|
|
@@ -60,6 +65,7 @@ export declare class PaginationPreviousDirective {
|
|
|
60
65
|
}
|
|
61
66
|
/**
|
|
62
67
|
* A directive to use to give the 'Pages' template for the Pages slot
|
|
68
|
+
* This directive provides a template reference for the {@link PaginationContext}.
|
|
63
69
|
*/
|
|
64
70
|
export declare class PaginationPagesDirective {
|
|
65
71
|
templateRef: TemplateRef<any>;
|
|
@@ -69,28 +75,28 @@ export declare class PaginationPagesDirective {
|
|
|
69
75
|
}
|
|
70
76
|
/**
|
|
71
77
|
* Directive to provide the slot structure for the pagination widget.
|
|
78
|
+
* This directive provides a template reference for the {@link PaginationContext}.
|
|
72
79
|
*/
|
|
73
80
|
export declare class PaginationStructureDirective {
|
|
74
81
|
templateRef: TemplateRef<any>;
|
|
75
|
-
static ngTemplateContextGuard(
|
|
82
|
+
static ngTemplateContextGuard(_dir: PaginationStructureDirective, context: unknown): context is PaginationContext;
|
|
76
83
|
static ɵfac: i0.ɵɵFactoryDeclaration<PaginationStructureDirective, never>;
|
|
77
84
|
static ɵdir: i0.ɵɵDirectiveDeclaration<PaginationStructureDirective, "ng-template[auPaginationStructure]", never, {}, {}, never, never, true, never>;
|
|
78
85
|
}
|
|
79
|
-
export declare class PaginationDefaultSlotsComponent {
|
|
80
|
-
pages: TemplateRef<PaginationContext>;
|
|
81
|
-
structure: TemplateRef<PaginationContext>;
|
|
82
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PaginationDefaultSlotsComponent, never>;
|
|
83
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PaginationDefaultSlotsComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
84
|
-
}
|
|
85
86
|
/**
|
|
86
87
|
* The default slot for the pages
|
|
87
88
|
*/
|
|
88
|
-
export declare const paginationDefaultSlotPages:
|
|
89
|
+
export declare const paginationDefaultSlotPages: SlotContent<PaginationContext>;
|
|
89
90
|
/**
|
|
90
91
|
* The default slot for the structure
|
|
91
92
|
*/
|
|
92
|
-
export declare const paginationDefaultSlotStructure:
|
|
93
|
-
|
|
93
|
+
export declare const paginationDefaultSlotStructure: SlotContent<PaginationContext>;
|
|
94
|
+
/**
|
|
95
|
+
* The `PaginationComponent` is an Angular component that extends the `BaseWidgetDirective`
|
|
96
|
+
* to provide a customizable pagination widget. It includes various input properties
|
|
97
|
+
* to configure labels, templates, and behavior for accessibility and internationalization (i18n).
|
|
98
|
+
*/
|
|
99
|
+
export declare class PaginationComponent extends BaseWidgetDirective<PaginationWidget> {
|
|
94
100
|
/**
|
|
95
101
|
* Provide the label for each "Page" page button.
|
|
96
102
|
* This is used for accessibility purposes.
|
|
@@ -115,7 +121,7 @@ export declare class PaginationComponent extends BaseWidgetDirective<PaginationW
|
|
|
115
121
|
*
|
|
116
122
|
* @defaultValue
|
|
117
123
|
* ```ts
|
|
118
|
-
* (currentPage: number
|
|
124
|
+
* (currentPage: number) => `Current page is ${currentPage}`
|
|
119
125
|
* ```
|
|
120
126
|
*/
|
|
121
127
|
ariaLiveLabel: ((currentPage: number, pageCount: number) => string) | undefined;
|
|
@@ -202,7 +208,6 @@ export declare class PaginationComponent extends BaseWidgetDirective<PaginationW
|
|
|
202
208
|
* ```
|
|
203
209
|
*/
|
|
204
210
|
pageLink: ((pageNumber: number) => string) | undefined;
|
|
205
|
-
readonly _widget: import("@agnos-ui/angular-headless").AngularWidget<PaginationWidget>;
|
|
206
211
|
/**
|
|
207
212
|
* The template to use for the ellipsis slot
|
|
208
213
|
* for I18n, we suggest to use the global configuration
|
|
@@ -368,7 +373,7 @@ export declare class PaginationComponent extends BaseWidgetDirective<PaginationW
|
|
|
368
373
|
* @defaultValue `''`
|
|
369
374
|
*/
|
|
370
375
|
className: string | undefined;
|
|
371
|
-
|
|
376
|
+
constructor();
|
|
372
377
|
static ɵfac: i0.ɵɵFactoryDeclaration<PaginationComponent, never>;
|
|
373
378
|
static ɵcmp: i0.ɵɵComponentDeclaration<PaginationComponent, "[auPagination]", never, { "ariaPageLabel": { "alias": "auAriaPageLabel"; "required": false; }; "ariaLiveLabel": { "alias": "auAriaLiveLabel"; "required": false; }; "ariaLabel": { "alias": "auAriaLabel"; "required": false; }; "activeLabel": { "alias": "auActiveLabel"; "required": false; }; "ariaFirstLabel": { "alias": "auAriaFirstLabel"; "required": false; }; "ariaPreviousLabel": { "alias": "auAriaPreviousLabel"; "required": false; }; "ariaNextLabel": { "alias": "auAriaNextLabel"; "required": false; }; "ariaLastLabel": { "alias": "auAriaLastLabel"; "required": false; }; "ariaEllipsisLabel": { "alias": "auAriaEllipsisLabel"; "required": false; }; "pageLink": { "alias": "auPageLink"; "required": false; }; "ellipsisLabel": { "alias": "auEllipsisLabel"; "required": false; }; "firstPageLabel": { "alias": "auFirstPageLabel"; "required": false; }; "previousPageLabel": { "alias": "auPreviousPageLabel"; "required": false; }; "nextPageLabel": { "alias": "auNextPageLabel"; "required": false; }; "lastPageLabel": { "alias": "auLastPageLabel"; "required": false; }; "pagesDisplay": { "alias": "auPagesDisplay"; "required": false; }; "numberLabel": { "alias": "auNumberLabel"; "required": false; }; "structure": { "alias": "auStructure"; "required": false; }; "disabled": { "alias": "auDisabled"; "required": false; }; "boundaryLinks": { "alias": "auBoundaryLinks"; "required": false; }; "directionLinks": { "alias": "auDirectionLinks"; "required": false; }; "collectionSize": { "alias": "auCollectionSize"; "required": false; }; "page": { "alias": "auPage"; "required": false; }; "pageSize": { "alias": "auPageSize"; "required": false; }; "size": { "alias": "auSize"; "required": false; }; "pagesFactory": { "alias": "auPagesFactory"; "required": false; }; "className": { "alias": "auClassName"; "required": false; }; }, { "pageChange": "auPageChange"; }, ["slotEllipsisFromContent", "slotFirstFromContent", "slotPreviousFromContent", "slotNextFromContent", "slotLastFromContent", "slotPagesFromContent", "slotNumberLabelFromContent", "slotStructureFromContent"], never, true, never>;
|
|
374
379
|
static ngAcceptInputType_disabled: unknown;
|
|
@@ -8,16 +8,20 @@ export { export_getPaginationDefaultConfig as getPaginationDefaultConfig };
|
|
|
8
8
|
/**
|
|
9
9
|
* A type for the slot context of the pagination widget
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export interface PaginationContext extends WidgetSlotContext<PaginationWidget> {
|
|
12
|
+
}
|
|
12
13
|
/**
|
|
13
14
|
* A type for the slot context of the pagination widget when the slot is the number label
|
|
14
15
|
*/
|
|
15
|
-
export
|
|
16
|
+
export interface PaginationNumberContext extends PaginationContext {
|
|
16
17
|
/**
|
|
17
18
|
* Displayed page
|
|
18
19
|
*/
|
|
19
20
|
displayedPage: number;
|
|
20
|
-
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Represents the state of a pagination component.
|
|
24
|
+
*/
|
|
21
25
|
export interface PaginationState {
|
|
22
26
|
/**
|
|
23
27
|
* The number of pages.
|
|
@@ -53,14 +57,6 @@ export interface PaginationState {
|
|
|
53
57
|
* @defaultValue `1`
|
|
54
58
|
*/
|
|
55
59
|
page: number;
|
|
56
|
-
/**
|
|
57
|
-
* The pagination display size.
|
|
58
|
-
*
|
|
59
|
-
* Bootstrap currently supports small and large sizes.
|
|
60
|
-
*
|
|
61
|
-
* @defaultValue `null`
|
|
62
|
-
*/
|
|
63
|
-
size: 'sm' | 'lg' | null;
|
|
64
60
|
/**
|
|
65
61
|
* The label for the nav element.
|
|
66
62
|
*
|
|
@@ -223,7 +219,18 @@ export interface PaginationState {
|
|
|
223
219
|
* ```
|
|
224
220
|
*/
|
|
225
221
|
numberLabel: SlotContent<PaginationNumberContext>;
|
|
222
|
+
/**
|
|
223
|
+
* The pagination display size.
|
|
224
|
+
*
|
|
225
|
+
* Bootstrap currently supports small and large sizes.
|
|
226
|
+
*
|
|
227
|
+
* @defaultValue `null`
|
|
228
|
+
*/
|
|
229
|
+
size: 'sm' | 'lg' | null;
|
|
226
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Represents the properties for the Pagination component.
|
|
233
|
+
*/
|
|
227
234
|
export interface PaginationProps {
|
|
228
235
|
/**
|
|
229
236
|
* The number of items in your paginated collection.
|
|
@@ -300,7 +307,7 @@ export interface PaginationProps {
|
|
|
300
307
|
*
|
|
301
308
|
* @defaultValue
|
|
302
309
|
* ```ts
|
|
303
|
-
* (currentPage: number
|
|
310
|
+
* (currentPage: number) => `Current page is ${currentPage}`
|
|
304
311
|
* ```
|
|
305
312
|
*/
|
|
306
313
|
ariaLiveLabel: (currentPage: number, pageCount: number) => string;
|
|
@@ -323,14 +330,6 @@ export interface PaginationProps {
|
|
|
323
330
|
* @defaultValue `1`
|
|
324
331
|
*/
|
|
325
332
|
page: number;
|
|
326
|
-
/**
|
|
327
|
-
* The pagination display size.
|
|
328
|
-
*
|
|
329
|
-
* Bootstrap currently supports small and large sizes.
|
|
330
|
-
*
|
|
331
|
-
* @defaultValue `null`
|
|
332
|
-
*/
|
|
333
|
-
size: 'sm' | 'lg' | null;
|
|
334
333
|
/**
|
|
335
334
|
* The label for the nav element.
|
|
336
335
|
*
|
|
@@ -493,8 +492,22 @@ export interface PaginationProps {
|
|
|
493
492
|
* ```
|
|
494
493
|
*/
|
|
495
494
|
numberLabel: SlotContent<PaginationNumberContext>;
|
|
495
|
+
/**
|
|
496
|
+
* The pagination display size.
|
|
497
|
+
*
|
|
498
|
+
* Bootstrap currently supports small and large sizes.
|
|
499
|
+
*
|
|
500
|
+
* @defaultValue `null`
|
|
501
|
+
*/
|
|
502
|
+
size: 'sm' | 'lg' | null;
|
|
496
503
|
}
|
|
497
|
-
|
|
504
|
+
/**
|
|
505
|
+
* Represents a pagination widget component.
|
|
506
|
+
*
|
|
507
|
+
* This type defines a widget that handles pagination functionality,
|
|
508
|
+
* including properties, state, api and directives specific to pagination.
|
|
509
|
+
*/
|
|
510
|
+
export type PaginationWidget = Widget<PaginationProps, PaginationState, PaginationApi, PaginationDirectives>;
|
|
498
511
|
/**
|
|
499
512
|
* Create a PaginationWidget with given config props
|
|
500
513
|
* @param config - an optional alert config
|
|
@@ -502,6 +515,9 @@ export type PaginationWidget = Widget<PaginationProps, PaginationState, Paginati
|
|
|
502
515
|
*/
|
|
503
516
|
declare const export_createPagination: WidgetFactory<PaginationWidget>;
|
|
504
517
|
export { export_createPagination as createPagination };
|
|
518
|
+
/**
|
|
519
|
+
* Interface representing the hrefs for pagination navigation links.
|
|
520
|
+
*/
|
|
505
521
|
export interface DirectionsHrefs {
|
|
506
522
|
/**
|
|
507
523
|
* The href for the 'Previous' navigation link
|
|
@@ -512,29 +528,35 @@ export interface DirectionsHrefs {
|
|
|
512
528
|
*/
|
|
513
529
|
next: string;
|
|
514
530
|
}
|
|
515
|
-
|
|
531
|
+
/**
|
|
532
|
+
* Interface representing pagination API for navigating through pages.
|
|
533
|
+
*/
|
|
534
|
+
export interface PaginationApi {
|
|
516
535
|
/**
|
|
517
536
|
* To "go" to a specific page
|
|
518
537
|
* @param page - The page number to select
|
|
519
538
|
*/
|
|
520
|
-
select(page: number
|
|
539
|
+
select(page: number): void;
|
|
521
540
|
/**
|
|
522
541
|
* To "go" to the first page
|
|
523
542
|
*/
|
|
524
|
-
first(
|
|
543
|
+
first(): void;
|
|
525
544
|
/**
|
|
526
545
|
* To "go" to the previous page
|
|
527
546
|
*/
|
|
528
|
-
previous(
|
|
547
|
+
previous(): void;
|
|
529
548
|
/**
|
|
530
549
|
* To "go" to the next page
|
|
531
550
|
*/
|
|
532
|
-
next(
|
|
551
|
+
next(): void;
|
|
533
552
|
/**
|
|
534
553
|
* To "go" to the last page
|
|
535
554
|
*/
|
|
536
|
-
last(
|
|
555
|
+
last(): void;
|
|
537
556
|
}
|
|
557
|
+
/**
|
|
558
|
+
* Interface representing the directives for pagination components.
|
|
559
|
+
*/
|
|
538
560
|
export interface PaginationDirectives {
|
|
539
561
|
/**
|
|
540
562
|
* A directive to be applied to each page link
|
|
@@ -560,5 +582,3 @@ export interface PaginationDirectives {
|
|
|
560
582
|
*/
|
|
561
583
|
pageLast: Directive;
|
|
562
584
|
}
|
|
563
|
-
export interface PaginationApi {
|
|
564
|
-
}
|
|
@@ -1,26 +1,41 @@
|
|
|
1
|
-
import { BaseWidgetDirective
|
|
1
|
+
import { BaseWidgetDirective } from '@agnos-ui/angular-headless';
|
|
2
2
|
import type { SlotContent } from '@agnos-ui/angular-headless';
|
|
3
|
-
import { type WritableSignal } from '@amadeus-it-group/tansu';
|
|
4
|
-
import type { AfterContentChecked } from '@angular/core';
|
|
5
3
|
import { TemplateRef } from '@angular/core';
|
|
6
|
-
import type { ProgressbarContext,
|
|
4
|
+
import type { ProgressbarContext, ProgressbarWidget } from './progressbar.gen';
|
|
7
5
|
import type { BSContextualClass } from '@agnos-ui/core-bootstrap/types';
|
|
8
6
|
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Directive that provides a template reference for the progress bar context.
|
|
9
|
+
* This directive provides a template reference for the {@link ProgressbarContext}.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ProgressbarBodyDirective {
|
|
12
|
+
templateRef: TemplateRef<any>;
|
|
13
|
+
static ngTemplateContextGuard(_dir: ProgressbarStructureDirective, context: unknown): context is ProgressbarContext;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProgressbarBodyDirective, never>;
|
|
15
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ProgressbarBodyDirective, "ng-template[auProgressbarBody]", never, {}, {}, never, never, true, never>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Directive to define the structure of a progress bar.
|
|
19
|
+
*
|
|
20
|
+
* This directive provides a template reference for the {@link ProgressbarContext}.
|
|
21
|
+
*/
|
|
9
22
|
export declare class ProgressbarStructureDirective {
|
|
10
23
|
templateRef: TemplateRef<any>;
|
|
11
24
|
static ngTemplateContextGuard(_dir: ProgressbarStructureDirective, context: unknown): context is ProgressbarContext;
|
|
12
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<ProgressbarStructureDirective, never>;
|
|
13
26
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ProgressbarStructureDirective, "ng-template[auProgressbarStructure]", never, {}, {}, never, never, true, never>;
|
|
14
27
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Represents the default slot structure for the progress bar component.
|
|
30
|
+
*/
|
|
31
|
+
export declare const progressbarDefaultSlotStructure: SlotContent<ProgressbarContext>;
|
|
32
|
+
/**
|
|
33
|
+
* ProgressbarComponent is a UI component that extends the BaseWidgetDirective
|
|
34
|
+
* to create a customizable progress bar widget. It provides various inputs
|
|
35
|
+
* to configure the appearance and behavior of the progress bar.
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
export declare class ProgressbarComponent extends BaseWidgetDirective<ProgressbarWidget> {
|
|
24
39
|
/**
|
|
25
40
|
* The aria label.
|
|
26
41
|
*
|
|
@@ -55,6 +70,7 @@ export declare class ProgressbarComponent extends BaseWidgetDirective<Progressba
|
|
|
55
70
|
* Label of the progress.
|
|
56
71
|
*/
|
|
57
72
|
children: SlotContent<ProgressbarContext>;
|
|
73
|
+
slotDefaultFromContent: ProgressbarBodyDirective | undefined;
|
|
58
74
|
/**
|
|
59
75
|
* Global template for the Progressbar.
|
|
60
76
|
*/
|
|
@@ -95,10 +111,10 @@ export declare class ProgressbarComponent extends BaseWidgetDirective<Progressba
|
|
|
95
111
|
* Type of the progressbar, following bootstrap types.
|
|
96
112
|
*/
|
|
97
113
|
type: BSContextualClass | undefined;
|
|
98
|
-
|
|
99
|
-
|
|
114
|
+
slotChildren?: TemplateRef<void>;
|
|
115
|
+
constructor();
|
|
100
116
|
static ɵfac: i0.ɵɵFactoryDeclaration<ProgressbarComponent, never>;
|
|
101
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ProgressbarComponent, "[auProgressbar]", never, { "ariaLabel": { "alias": "auAriaLabel"; "required": false; }; "min": { "alias": "auMin"; "required": false; }; "max": { "alias": "auMax"; "required": false; }; "value": { "alias": "auValue"; "required": false; }; "className": { "alias": "auClassName"; "required": false; }; "children": { "alias": "auChildren"; "required": false; }; "structure": { "alias": "auStructure"; "required": false; }; "height": { "alias": "auHeight"; "required": false; }; "animated": { "alias": "auAnimated"; "required": false; }; "striped": { "alias": "auStriped"; "required": false; }; "ariaValueTextFn": { "alias": "auAriaValueTextFn"; "required": false; }; "type": { "alias": "auType"; "required": false; }; }, {}, ["slotStructureFromContent"], ["*"], true, never>;
|
|
117
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ProgressbarComponent, "[auProgressbar]", never, { "ariaLabel": { "alias": "auAriaLabel"; "required": false; }; "min": { "alias": "auMin"; "required": false; }; "max": { "alias": "auMax"; "required": false; }; "value": { "alias": "auValue"; "required": false; }; "className": { "alias": "auClassName"; "required": false; }; "children": { "alias": "auChildren"; "required": false; }; "structure": { "alias": "auStructure"; "required": false; }; "height": { "alias": "auHeight"; "required": false; }; "animated": { "alias": "auAnimated"; "required": false; }; "striped": { "alias": "auStriped"; "required": false; }; "ariaValueTextFn": { "alias": "auAriaValueTextFn"; "required": false; }; "type": { "alias": "auType"; "required": false; }; }, {}, ["slotDefaultFromContent", "slotStructureFromContent"], ["*"], true, never>;
|
|
102
118
|
static ngAcceptInputType_min: unknown;
|
|
103
119
|
static ngAcceptInputType_max: unknown;
|
|
104
120
|
static ngAcceptInputType_value: unknown;
|
|
@@ -6,7 +6,15 @@ import type { BSContextualClass } from '@agnos-ui/core-bootstrap/types';
|
|
|
6
6
|
*/
|
|
7
7
|
declare const export_getProgressbarDefaultConfig: () => ProgressbarProps;
|
|
8
8
|
export { export_getProgressbarDefaultConfig as getProgressbarDefaultConfig };
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Represents the context for a Progressbar widget.
|
|
11
|
+
* This interface is used to define the context object that is passed to the Progressbar widget.
|
|
12
|
+
*/
|
|
13
|
+
export interface ProgressbarContext extends WidgetSlotContext<ProgressbarWidget> {
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Represents the state of a Progressbar component.
|
|
17
|
+
*/
|
|
10
18
|
export interface ProgressbarState {
|
|
11
19
|
/**
|
|
12
20
|
* Percentage of completion.
|
|
@@ -86,6 +94,9 @@ export interface ProgressbarState {
|
|
|
86
94
|
*/
|
|
87
95
|
type: BSContextualClass | undefined;
|
|
88
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Interface representing the properties for the Progressbar component.
|
|
99
|
+
*/
|
|
89
100
|
export interface ProgressbarProps {
|
|
90
101
|
/**
|
|
91
102
|
* Return the value for the 'aria-valuetext' attribute.
|
|
@@ -161,7 +172,12 @@ export interface ProgressbarProps {
|
|
|
161
172
|
*/
|
|
162
173
|
type: BSContextualClass | undefined;
|
|
163
174
|
}
|
|
164
|
-
|
|
175
|
+
/**
|
|
176
|
+
* Represents a Progressbar widget.
|
|
177
|
+
*
|
|
178
|
+
* This type defines the structure of a Progressbar widget, including its properties, state, and directives.
|
|
179
|
+
*/
|
|
180
|
+
export type ProgressbarWidget = Widget<ProgressbarProps, ProgressbarState, object, ProgressbarDirectives>;
|
|
165
181
|
/**
|
|
166
182
|
* Create a Progressbar with given config props
|
|
167
183
|
* @param config - an optional progressbar config
|
|
@@ -169,11 +185,12 @@ export type ProgressbarWidget = Widget<ProgressbarProps, ProgressbarState, Progr
|
|
|
169
185
|
*/
|
|
170
186
|
declare const export_createProgressbar: WidgetFactory<ProgressbarWidget>;
|
|
171
187
|
export { export_createProgressbar as createProgressbar };
|
|
188
|
+
/**
|
|
189
|
+
* Interface representing directives for a progress bar component.
|
|
190
|
+
*/
|
|
172
191
|
export interface ProgressbarDirectives {
|
|
173
192
|
/**
|
|
174
193
|
* A directive to be applied to the main container that handles aria attributes.
|
|
175
194
|
*/
|
|
176
195
|
ariaDirective: Directive;
|
|
177
196
|
}
|
|
178
|
-
export interface ProgressbarApi {
|
|
179
|
-
}
|