@agnos-ui/angular-bootstrap 0.3.1 → 0.4.0-next.1
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/agnos-ui-angular.module.d.ts +1 -1
- package/components/accordion/accordion.component.d.ts +63 -97
- package/components/accordion/accordion.d.ts +5 -10
- package/components/accordion/accordion.gen.d.ts +342 -0
- package/components/alert/alert.component.d.ts +11 -5
- package/components/alert/alert.d.ts +4 -6
- package/components/alert/alert.gen.d.ts +118 -0
- package/components/modal/modal.component.d.ts +28 -12
- package/components/modal/modal.d.ts +5 -8
- package/components/modal/modal.gen.d.ts +238 -0
- package/components/pagination/pagination.component.d.ts +51 -9
- package/components/pagination/pagination.d.ts +4 -7
- package/components/pagination/pagination.gen.d.ts +394 -0
- package/components/progressbar/progressbar.component.d.ts +9 -3
- package/components/progressbar/progressbar.d.ts +4 -6
- package/components/progressbar/progressbar.gen.d.ts +126 -0
- package/components/rating/rating.component.d.ts +6 -3
- package/components/rating/rating.d.ts +4 -5
- package/components/rating/rating.gen.d.ts +179 -0
- package/components/select/select.component.d.ts +16 -8
- package/components/select/select.d.ts +4 -7
- package/components/select/select.gen.d.ts +291 -0
- package/components/slider/slider.component.d.ts +13 -4
- package/components/slider/slider.d.ts +4 -8
- package/components/slider/slider.gen.d.ts +293 -0
- package/components/toast/toast.component.d.ts +15 -6
- package/components/toast/toast.d.ts +4 -6
- package/components/toast/toast.gen.d.ts +145 -0
- package/config.d.ts +3 -5
- package/config.gen.d.ts +47 -0
- package/esm2022/agnos-ui-angular.module.mjs +5 -5
- package/esm2022/components/accordion/accordion.component.mjs +121 -155
- package/esm2022/components/accordion/accordion.gen.mjs +2 -0
- package/esm2022/components/accordion/accordion.mjs +4 -3
- package/esm2022/components/alert/alert.component.mjs +20 -20
- package/esm2022/components/alert/alert.gen.mjs +2 -0
- package/esm2022/components/alert/alert.mjs +3 -3
- package/esm2022/components/modal/modal.component.mjs +42 -42
- package/esm2022/components/modal/modal.gen.mjs +2 -0
- package/esm2022/components/modal/modal.mjs +4 -3
- package/esm2022/components/pagination/pagination.component.mjs +67 -67
- package/esm2022/components/pagination/pagination.gen.mjs +2 -0
- package/esm2022/components/pagination/pagination.mjs +3 -3
- package/esm2022/components/progressbar/progressbar.component.mjs +18 -18
- package/esm2022/components/progressbar/progressbar.gen.mjs +2 -0
- package/esm2022/components/progressbar/progressbar.mjs +3 -3
- package/esm2022/components/rating/rating.component.mjs +11 -12
- package/esm2022/components/rating/rating.gen.mjs +2 -0
- package/esm2022/components/rating/rating.mjs +3 -3
- package/esm2022/components/select/select.component.mjs +24 -24
- package/esm2022/components/select/select.gen.mjs +2 -0
- package/esm2022/components/select/select.mjs +3 -3
- package/esm2022/components/slider/slider.component.mjs +42 -42
- package/esm2022/components/slider/slider.gen.mjs +2 -0
- package/esm2022/components/slider/slider.mjs +3 -3
- package/esm2022/components/toast/toast.component.mjs +31 -31
- package/esm2022/components/toast/toast.gen.mjs +2 -0
- package/esm2022/components/toast/toast.mjs +3 -3
- package/esm2022/config.gen.mjs +2 -0
- package/esm2022/config.mjs +1 -1
- package/esm2022/index.mjs +1 -1
- package/fesm2022/agnos-ui-angular-bootstrap.mjs +391 -434
- package/fesm2022/agnos-ui-angular-bootstrap.mjs.map +1 -1
- package/index.d.ts +9 -9
- package/package.json +7 -7
|
@@ -38,7 +38,7 @@ export declare class AlertComponent extends BaseWidgetDirective<AlertWidget> imp
|
|
|
38
38
|
/**
|
|
39
39
|
* The transition function will be executed when the alert is displayed or hidden.
|
|
40
40
|
*
|
|
41
|
-
* Depending on the value of
|
|
41
|
+
* Depending on the value of `animatedOnInit`, the animation can be optionally skipped during the showing process.
|
|
42
42
|
*/
|
|
43
43
|
transition: TransitionFn | undefined;
|
|
44
44
|
/**
|
|
@@ -63,9 +63,15 @@ export declare class AlertComponent extends BaseWidgetDirective<AlertWidget> imp
|
|
|
63
63
|
* Accessibility close button label
|
|
64
64
|
*/
|
|
65
65
|
ariaCloseButtonLabel: string | undefined;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Template for the alert content
|
|
68
|
+
*/
|
|
69
|
+
children: SlotContent<AlertContext>;
|
|
70
|
+
slotDefaultFromContent: AlertBodyDirective | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Global template for the alert component
|
|
73
|
+
*/
|
|
74
|
+
structure: SlotContent<AlertContext>;
|
|
69
75
|
slotStructureFromContent: AlertStructureDirective | undefined;
|
|
70
76
|
/**
|
|
71
77
|
* Callback called when the alert visibility changed.
|
|
@@ -87,7 +93,7 @@ export declare class AlertComponent extends BaseWidgetDirective<AlertWidget> imp
|
|
|
87
93
|
readonly _widget: import("@agnos-ui/angular-headless").AngularWidget<AlertWidget>;
|
|
88
94
|
ngAfterContentChecked(): void;
|
|
89
95
|
static ɵfac: i0.ɵɵFactoryDeclaration<AlertComponent, never>;
|
|
90
|
-
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; }; "
|
|
96
|
+
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>;
|
|
91
97
|
static ngAcceptInputType_dismissible: unknown;
|
|
92
98
|
static ngAcceptInputType_visible: unknown;
|
|
93
99
|
static ngAcceptInputType_animatedOnInit: unknown;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export type
|
|
4
|
-
export type AlertProps = WidgetProps<AlertWidget>;
|
|
5
|
-
export type AlertState = WidgetState<AlertWidget>;
|
|
6
|
-
export type AlertContext = AdaptSlotContentProps<import('@agnos-ui/core-bootstrap/components/alert').AlertContext>;
|
|
1
|
+
import type { WidgetFactory } from '@agnos-ui/angular-headless';
|
|
2
|
+
import type { AlertProps, AlertWidget } from './alert.gen';
|
|
3
|
+
export type * from './alert.gen';
|
|
7
4
|
export declare const createAlert: WidgetFactory<AlertWidget>;
|
|
5
|
+
export declare const getAlertDefaultConfig: () => AlertProps;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { WidgetSlotContext, SlotContent, TransitionFn, Widget, Directive } from '@agnos-ui/angular-headless';
|
|
2
|
+
import type { BSContextualClass } from '@agnos-ui/core-bootstrap/types';
|
|
3
|
+
export type AlertContext = WidgetSlotContext<AlertWidget>;
|
|
4
|
+
export interface AlertState {
|
|
5
|
+
/**
|
|
6
|
+
* Is `true` when the alert is hidden. Compared to `visible`, this is updated after the transition is executed.
|
|
7
|
+
*/
|
|
8
|
+
hidden: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* If `true`, alert can be dismissed by the user.
|
|
11
|
+
* The close button (×) will be displayed and you can be notified of the event with the (close) output.
|
|
12
|
+
*/
|
|
13
|
+
dismissible: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* If `true` the alert is visible to the user
|
|
16
|
+
*/
|
|
17
|
+
visible: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Accessibility close button label
|
|
20
|
+
*/
|
|
21
|
+
ariaCloseButtonLabel: string;
|
|
22
|
+
/**
|
|
23
|
+
* CSS classes to be applied on the widget main container
|
|
24
|
+
*/
|
|
25
|
+
className: string;
|
|
26
|
+
/**
|
|
27
|
+
* Global template for the alert component
|
|
28
|
+
*/
|
|
29
|
+
structure: SlotContent<AlertContext>;
|
|
30
|
+
/**
|
|
31
|
+
* Template for the alert content
|
|
32
|
+
*/
|
|
33
|
+
children: SlotContent<AlertContext>;
|
|
34
|
+
/**
|
|
35
|
+
* Type of the alert, following bootstrap types.
|
|
36
|
+
*/
|
|
37
|
+
type: BSContextualClass;
|
|
38
|
+
}
|
|
39
|
+
export interface AlertProps {
|
|
40
|
+
/**
|
|
41
|
+
* Callback called when the alert visibility changed.
|
|
42
|
+
*/
|
|
43
|
+
onVisibleChange: (visible: boolean) => void;
|
|
44
|
+
/**
|
|
45
|
+
* Callback called when the alert is hidden.
|
|
46
|
+
*/
|
|
47
|
+
onHidden: () => void;
|
|
48
|
+
/**
|
|
49
|
+
* Callback called when the alert is shown.
|
|
50
|
+
*/
|
|
51
|
+
onShown: () => void;
|
|
52
|
+
/**
|
|
53
|
+
* The transition function will be executed when the alert is displayed or hidden.
|
|
54
|
+
*
|
|
55
|
+
* Depending on the value of `animatedOnInit`, the animation can be optionally skipped during the showing process.
|
|
56
|
+
*/
|
|
57
|
+
transition: TransitionFn;
|
|
58
|
+
/**
|
|
59
|
+
* If `true`, alert opening will be animated.
|
|
60
|
+
*
|
|
61
|
+
* Animation is triggered when the `.open()` function is called
|
|
62
|
+
* or the visible prop is changed
|
|
63
|
+
*/
|
|
64
|
+
animatedOnInit: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* If `true`, alert closing will be animated.
|
|
67
|
+
*
|
|
68
|
+
* Animation is triggered when clicked on the close button (×),
|
|
69
|
+
* via the `.close()` function or the visible prop is changed
|
|
70
|
+
*/
|
|
71
|
+
animated: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* If `true`, alert can be dismissed by the user.
|
|
74
|
+
* The close button (×) will be displayed and you can be notified of the event with the (close) output.
|
|
75
|
+
*/
|
|
76
|
+
dismissible: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* If `true` the alert is visible to the user
|
|
79
|
+
*/
|
|
80
|
+
visible: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Accessibility close button label
|
|
83
|
+
*/
|
|
84
|
+
ariaCloseButtonLabel: string;
|
|
85
|
+
/**
|
|
86
|
+
* CSS classes to be applied on the widget main container
|
|
87
|
+
*/
|
|
88
|
+
className: string;
|
|
89
|
+
/**
|
|
90
|
+
* Global template for the alert component
|
|
91
|
+
*/
|
|
92
|
+
structure: SlotContent<AlertContext>;
|
|
93
|
+
/**
|
|
94
|
+
* Template for the alert content
|
|
95
|
+
*/
|
|
96
|
+
children: SlotContent<AlertContext>;
|
|
97
|
+
/**
|
|
98
|
+
* Type of the alert, following bootstrap types.
|
|
99
|
+
*/
|
|
100
|
+
type: BSContextualClass;
|
|
101
|
+
}
|
|
102
|
+
export type AlertWidget = Widget<AlertProps, AlertState, AlertApi, object, AlertDirectives>;
|
|
103
|
+
export interface AlertApi {
|
|
104
|
+
/**
|
|
105
|
+
* Triggers alert closing programmatically (same as clicking on the close button (×)).
|
|
106
|
+
*/
|
|
107
|
+
close(): void;
|
|
108
|
+
/**
|
|
109
|
+
* Triggers the alert to be displayed for the user.
|
|
110
|
+
*/
|
|
111
|
+
open(): void;
|
|
112
|
+
}
|
|
113
|
+
export interface AlertDirectives {
|
|
114
|
+
/**
|
|
115
|
+
* the transition directive, piloting what is the visual effect of going from hidden to visible
|
|
116
|
+
*/
|
|
117
|
+
transitionDirective: Directive;
|
|
118
|
+
}
|
|
@@ -120,16 +120,32 @@ export declare class ModalComponent<Data> extends BaseWidgetDirective<ModalWidge
|
|
|
120
120
|
* Option to create a fullscreen modal, according to the bootstrap documentation.
|
|
121
121
|
*/
|
|
122
122
|
fullscreen: boolean | undefined;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
123
|
+
/**
|
|
124
|
+
* Structure of the modal.
|
|
125
|
+
* The default structure uses ModalCommonPropsAndState.header header, ModalCommonPropsAndState.children children and ModalCommonPropsAndState.footer footer.
|
|
126
|
+
*/
|
|
127
|
+
structure: SlotContent<ModalContext<Data>>;
|
|
128
|
+
slotStructureFromContent: ModalStructureDirective<Data> | undefined;
|
|
129
|
+
/**
|
|
130
|
+
* Header of the modal. The default header includes ModalCommonPropsAndState.title title.
|
|
131
|
+
*/
|
|
132
|
+
header: SlotContent<ModalContext<Data>>;
|
|
133
|
+
slotHeaderFromContent: ModalHeaderDirective<Data> | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* Title of the modal.
|
|
136
|
+
*/
|
|
137
|
+
title: SlotContent<ModalContext<Data>>;
|
|
138
|
+
slotTitleFromContent: ModalTitleDirective<Data> | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* Body of the modal.
|
|
141
|
+
*/
|
|
142
|
+
children: SlotContent<ModalContext<Data>>;
|
|
143
|
+
slotDefaultFromContent: ModalBodyDirective<Data> | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* Footer of the modal.
|
|
146
|
+
*/
|
|
147
|
+
footer: SlotContent<ModalContext<Data>>;
|
|
148
|
+
slotFooterFromContent: ModalFooterDirective<Data> | undefined;
|
|
133
149
|
/**
|
|
134
150
|
* Data to use in content slots
|
|
135
151
|
*/
|
|
@@ -139,7 +155,7 @@ export declare class ModalComponent<Data> extends BaseWidgetDirective<ModalWidge
|
|
|
139
155
|
*/
|
|
140
156
|
visibleChange: EventEmitter<boolean>;
|
|
141
157
|
/**
|
|
142
|
-
* Event to be triggered when the modal is about to be closed (i.e. the
|
|
158
|
+
* Event to be triggered when the modal is about to be closed (i.e. the ModalApi.closeclose method was called).
|
|
143
159
|
*/
|
|
144
160
|
beforeClose: EventEmitter<ModalBeforeCloseEvent>;
|
|
145
161
|
/**
|
|
@@ -154,7 +170,7 @@ export declare class ModalComponent<Data> extends BaseWidgetDirective<ModalWidge
|
|
|
154
170
|
readonly _widget: import("@agnos-ui/angular-headless").AngularWidget<ModalWidget<Data>>;
|
|
155
171
|
ngAfterContentChecked(): void;
|
|
156
172
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent<any>, never>;
|
|
157
|
-
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; }; "
|
|
173
|
+
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>;
|
|
158
174
|
static ngAcceptInputType_animated: unknown;
|
|
159
175
|
static ngAcceptInputType_visible: unknown;
|
|
160
176
|
static ngAcceptInputType_backdrop: unknown;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
}
|
|
5
|
-
export type ModalProps<Data> = WidgetProps<ModalWidget<Data>>;
|
|
6
|
-
export type ModalState<Data> = WidgetState<ModalWidget<Data>>;
|
|
7
|
-
export interface ModalContext<Data> extends AdaptSlotContentProps<import('@agnos-ui/core-bootstrap/components/modal').ModalContext<Data>> {
|
|
8
|
-
}
|
|
1
|
+
import type { PropsConfig } from '@agnos-ui/angular-headless';
|
|
2
|
+
import type { ModalProps, ModalWidget } from './modal.gen';
|
|
3
|
+
export type * from './modal.gen';
|
|
4
|
+
export { modalCloseButtonClick, modalOutsideClick } from '@agnos-ui/angular-headless';
|
|
9
5
|
export declare const createModal: <Data>(config?: PropsConfig<ModalProps<Data>>) => ModalWidget<Data>;
|
|
6
|
+
export declare const getModalDefaultConfig: () => ModalProps<any>;
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import type { WidgetSlotContext, SlotContent, TransitionFn, Widget, Directive } from '@agnos-ui/angular-headless';
|
|
2
|
+
export type ModalContext<Data> = WidgetSlotContext<ModalWidget<Data>>;
|
|
3
|
+
export interface ModalState<Data> {
|
|
4
|
+
/**
|
|
5
|
+
* Whether the backdrop is fully hidden. This can be true either because {@link ModalProps.backdropbackdrop} is false or
|
|
6
|
+
* because {@link ModalCommonPropsAndState.visiblevisible} is false and there is no current transition.
|
|
7
|
+
*/
|
|
8
|
+
backdropHidden: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the modal is fully hidden.
|
|
11
|
+
*/
|
|
12
|
+
hidden: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Whether there is an active transition to either display or hide the modal.
|
|
15
|
+
*/
|
|
16
|
+
transitioning: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* DOM element of the modal.
|
|
19
|
+
*/
|
|
20
|
+
modalElement: HTMLElement | null;
|
|
21
|
+
/**
|
|
22
|
+
* Value of the aria-label attribute to put on the close button.
|
|
23
|
+
*/
|
|
24
|
+
ariaCloseButtonLabel: string;
|
|
25
|
+
/**
|
|
26
|
+
* Classes to add on the backdrop DOM element.
|
|
27
|
+
*/
|
|
28
|
+
backdropClass: string;
|
|
29
|
+
/**
|
|
30
|
+
* Whether to display the close button.
|
|
31
|
+
*/
|
|
32
|
+
closeButton: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Which element should contain the modal and backdrop DOM elements.
|
|
35
|
+
* If it is not null, the modal and backdrop DOM elements are moved to the specified container.
|
|
36
|
+
* Otherwise, they stay where the widget is located.
|
|
37
|
+
*/
|
|
38
|
+
container: HTMLElement | null;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the modal should be visible when the transition is completed.
|
|
41
|
+
*/
|
|
42
|
+
visible: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* CSS classes to be applied on the widget main container
|
|
45
|
+
*/
|
|
46
|
+
className: string;
|
|
47
|
+
/**
|
|
48
|
+
* Data to use in content slots
|
|
49
|
+
*/
|
|
50
|
+
contentData: Data;
|
|
51
|
+
/**
|
|
52
|
+
* Body of the modal.
|
|
53
|
+
*/
|
|
54
|
+
children: SlotContent<ModalContext<Data>>;
|
|
55
|
+
/**
|
|
56
|
+
* Footer of the modal.
|
|
57
|
+
*/
|
|
58
|
+
footer: SlotContent<ModalContext<Data>>;
|
|
59
|
+
/**
|
|
60
|
+
* Header of the modal. The default header includes {@link ModalCommonPropsAndState.title title}.
|
|
61
|
+
*/
|
|
62
|
+
header: SlotContent<ModalContext<Data>>;
|
|
63
|
+
/**
|
|
64
|
+
* Structure of the modal.
|
|
65
|
+
* The default structure uses {@link ModalCommonPropsAndState.header header}, {@link ModalCommonPropsAndState.children children} and {@link ModalCommonPropsAndState.footer footer}.
|
|
66
|
+
*/
|
|
67
|
+
structure: SlotContent<ModalContext<Data>>;
|
|
68
|
+
/**
|
|
69
|
+
* Title of the modal.
|
|
70
|
+
*/
|
|
71
|
+
title: SlotContent<ModalContext<Data>>;
|
|
72
|
+
/**
|
|
73
|
+
* Option to create a fullscreen modal, according to the bootstrap documentation.
|
|
74
|
+
*/
|
|
75
|
+
fullscreen: boolean;
|
|
76
|
+
}
|
|
77
|
+
export interface ModalProps<Data> {
|
|
78
|
+
/**
|
|
79
|
+
* Whether the modal and its backdrop (if present) should be animated when shown or hidden.
|
|
80
|
+
*/
|
|
81
|
+
animated: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Whether a backdrop should be created behind the modal.
|
|
84
|
+
*/
|
|
85
|
+
backdrop: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* The transition to use for the backdrop behind the modal (if present).
|
|
88
|
+
*/
|
|
89
|
+
backdropTransition: TransitionFn;
|
|
90
|
+
/**
|
|
91
|
+
* Whether the modal should be closed when clicking on the viewport outside the modal.
|
|
92
|
+
*/
|
|
93
|
+
closeOnOutsideClick: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* The transition to use for the modal.
|
|
96
|
+
*/
|
|
97
|
+
modalTransition: TransitionFn;
|
|
98
|
+
/**
|
|
99
|
+
* Event to be triggered when the modal is about to be closed (i.e. the {@link ModalApi.closeclose} method was called).
|
|
100
|
+
*/
|
|
101
|
+
onBeforeClose: (event: ModalBeforeCloseEvent) => void;
|
|
102
|
+
/**
|
|
103
|
+
* Event to be triggered when the visible property changes.
|
|
104
|
+
*/
|
|
105
|
+
onVisibleChange: (visible: boolean) => void;
|
|
106
|
+
/**
|
|
107
|
+
* Event to be triggered when the transition is completed and the modal is not visible.
|
|
108
|
+
*/
|
|
109
|
+
onHidden: () => void;
|
|
110
|
+
/**
|
|
111
|
+
* Event to be triggered when the transition is completed and the modal is visible.
|
|
112
|
+
*/
|
|
113
|
+
onShown: () => void;
|
|
114
|
+
/**
|
|
115
|
+
* Value of the aria-label attribute to put on the close button.
|
|
116
|
+
*/
|
|
117
|
+
ariaCloseButtonLabel: string;
|
|
118
|
+
/**
|
|
119
|
+
* Classes to add on the backdrop DOM element.
|
|
120
|
+
*/
|
|
121
|
+
backdropClass: string;
|
|
122
|
+
/**
|
|
123
|
+
* Whether to display the close button.
|
|
124
|
+
*/
|
|
125
|
+
closeButton: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Which element should contain the modal and backdrop DOM elements.
|
|
128
|
+
* If it is not null, the modal and backdrop DOM elements are moved to the specified container.
|
|
129
|
+
* Otherwise, they stay where the widget is located.
|
|
130
|
+
*/
|
|
131
|
+
container: HTMLElement | null;
|
|
132
|
+
/**
|
|
133
|
+
* Whether the modal should be visible when the transition is completed.
|
|
134
|
+
*/
|
|
135
|
+
visible: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* CSS classes to be applied on the widget main container
|
|
138
|
+
*/
|
|
139
|
+
className: string;
|
|
140
|
+
/**
|
|
141
|
+
* Data to use in content slots
|
|
142
|
+
*/
|
|
143
|
+
contentData: Data;
|
|
144
|
+
/**
|
|
145
|
+
* Body of the modal.
|
|
146
|
+
*/
|
|
147
|
+
children: SlotContent<ModalContext<Data>>;
|
|
148
|
+
/**
|
|
149
|
+
* Footer of the modal.
|
|
150
|
+
*/
|
|
151
|
+
footer: SlotContent<ModalContext<Data>>;
|
|
152
|
+
/**
|
|
153
|
+
* Header of the modal. The default header includes {@link ModalCommonPropsAndState.title title}.
|
|
154
|
+
*/
|
|
155
|
+
header: SlotContent<ModalContext<Data>>;
|
|
156
|
+
/**
|
|
157
|
+
* Structure of the modal.
|
|
158
|
+
* The default structure uses {@link ModalCommonPropsAndState.header header}, {@link ModalCommonPropsAndState.children children} and {@link ModalCommonPropsAndState.footer footer}.
|
|
159
|
+
*/
|
|
160
|
+
structure: SlotContent<ModalContext<Data>>;
|
|
161
|
+
/**
|
|
162
|
+
* Title of the modal.
|
|
163
|
+
*/
|
|
164
|
+
title: SlotContent<ModalContext<Data>>;
|
|
165
|
+
/**
|
|
166
|
+
* Option to create a fullscreen modal, according to the bootstrap documentation.
|
|
167
|
+
*/
|
|
168
|
+
fullscreen: boolean;
|
|
169
|
+
}
|
|
170
|
+
export interface ModalApi<Data> {
|
|
171
|
+
/**
|
|
172
|
+
* Method to change some modal properties.
|
|
173
|
+
*/
|
|
174
|
+
patch: ModalWidget<Data>['patch'];
|
|
175
|
+
/**
|
|
176
|
+
* Closes the modal with the given result.
|
|
177
|
+
*/
|
|
178
|
+
close(result?: any): void;
|
|
179
|
+
/**
|
|
180
|
+
* Opens the modal and returns a promise that is resolved when the modal is closed.
|
|
181
|
+
* The resolved value is the result passed to the {@link ModalApi.closeclose} method and possibly changed by the
|
|
182
|
+
* {@link ModalProps.onBeforeCloseonBeforeClose} event handler
|
|
183
|
+
*/
|
|
184
|
+
open(): Promise<any>;
|
|
185
|
+
}
|
|
186
|
+
export type ModalWidget<Data> = Widget<ModalProps<Data>, ModalState<Data>, ModalApi<Data>, ModalActions, ModalDirectives>;
|
|
187
|
+
export interface ModalBeforeCloseEvent {
|
|
188
|
+
/**
|
|
189
|
+
* Result of the modal, which is the value passed to the {@link ModalApi.closeclose} method
|
|
190
|
+
* and later resolved by the promise returned by the {@link ModalApi.openopen} method.
|
|
191
|
+
* If needed, it can be changed from the {@link ModalProps.onBeforeCloseonBeforeClose} event handler.
|
|
192
|
+
*/
|
|
193
|
+
result: any;
|
|
194
|
+
/**
|
|
195
|
+
* Whether to cancel the close of the modal.
|
|
196
|
+
* It can be changed from the {@link ModalProps.onBeforeCloseonBeforeClose} event handler.
|
|
197
|
+
*/
|
|
198
|
+
cancel: boolean;
|
|
199
|
+
}
|
|
200
|
+
export interface ModalActions {
|
|
201
|
+
/**
|
|
202
|
+
* Action to be called when the user clicks on the close button. It closes the modal with the {@link modalCloseButtonClick} result.
|
|
203
|
+
*/
|
|
204
|
+
closeButtonClick(event: Pick<MouseEvent, never>): void;
|
|
205
|
+
/**
|
|
206
|
+
* Action to be called when the user clicks on the modal DOM element (which is supposed to have the size of the full viewport).
|
|
207
|
+
* If the click is not done on a descendant of the modal DOM element, it is considered to be done outside the modal
|
|
208
|
+
* and, depending on the value of the {@link ModalProps.closeOnOutsideClickcloseOnOutsideClick} prop, the modal is or isn't closed
|
|
209
|
+
* (with the {@link modalOutsideClick} result).
|
|
210
|
+
*/
|
|
211
|
+
modalClick(event: Pick<MouseEvent, 'target' | 'currentTarget'>): void;
|
|
212
|
+
}
|
|
213
|
+
export interface ModalDirectives {
|
|
214
|
+
/**
|
|
215
|
+
* Directive to put on the modal DOM element.
|
|
216
|
+
*/
|
|
217
|
+
modalDirective: Directive;
|
|
218
|
+
/**
|
|
219
|
+
* Directive to put on the backdrop DOM element.
|
|
220
|
+
*/
|
|
221
|
+
backdropDirective: Directive;
|
|
222
|
+
/**
|
|
223
|
+
* Portal directive to put on the modal DOM element.
|
|
224
|
+
*/
|
|
225
|
+
modalPortalDirective: Directive;
|
|
226
|
+
/**
|
|
227
|
+
* Portal directive to put on the backdrop DOM element.
|
|
228
|
+
*/
|
|
229
|
+
backdropPortalDirective: Directive;
|
|
230
|
+
/**
|
|
231
|
+
* Directive that adds all the necessary attributes to the close button
|
|
232
|
+
*/
|
|
233
|
+
closeButtonDirective: Directive;
|
|
234
|
+
/**
|
|
235
|
+
* Directive to apply to the dialog element when using the native [HTMLDialogElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement)
|
|
236
|
+
*/
|
|
237
|
+
dialogDirective: Directive;
|
|
238
|
+
}
|
|
@@ -165,21 +165,63 @@ export declare class PaginationComponent extends BaseWidgetDirective<PaginationW
|
|
|
165
165
|
*/
|
|
166
166
|
pageLink: ((pageNumber: number) => string) | undefined;
|
|
167
167
|
readonly _widget: import("@agnos-ui/angular-headless").AngularWidget<PaginationWidget>;
|
|
168
|
-
|
|
168
|
+
/**
|
|
169
|
+
* The template to use for the ellipsis slot
|
|
170
|
+
* for I18n, we suggest to use the global configuration
|
|
171
|
+
* override any configuration parameters provided for this
|
|
172
|
+
*/
|
|
173
|
+
ellipsisLabel: SlotContent<PaginationContext>;
|
|
169
174
|
slotEllipsisFromContent: PaginationEllipsisDirective | undefined;
|
|
170
|
-
|
|
175
|
+
/**
|
|
176
|
+
* The template to use for the first slot
|
|
177
|
+
* for I18n, we suggest to use the global configuration
|
|
178
|
+
* override any configuration parameters provided for this
|
|
179
|
+
*/
|
|
180
|
+
firstPageLabel: SlotContent<PaginationContext>;
|
|
171
181
|
slotFirstFromContent: PaginationFirstDirective | undefined;
|
|
172
|
-
|
|
182
|
+
/**
|
|
183
|
+
* The template to use for the previous slot
|
|
184
|
+
* for I18n, we suggest to use the global configuration
|
|
185
|
+
* override any configuration parameters provided for this
|
|
186
|
+
*/
|
|
187
|
+
previousPageLabel: SlotContent<PaginationContext>;
|
|
173
188
|
slotPreviousFromContent: PaginationPreviousDirective | undefined;
|
|
174
|
-
|
|
189
|
+
/**
|
|
190
|
+
* The template to use for the next slot
|
|
191
|
+
* for I18n, we suggest to use the global configuration
|
|
192
|
+
* override any configuration parameters provided for this
|
|
193
|
+
*/
|
|
194
|
+
nextPageLabel: SlotContent<PaginationContext>;
|
|
175
195
|
slotNextFromContent: PaginationNextDirective | undefined;
|
|
176
|
-
|
|
196
|
+
/**
|
|
197
|
+
* The template to use for the last slot
|
|
198
|
+
* for I18n, we suggest to use the global configuration
|
|
199
|
+
* override any configuration parameters provided for this
|
|
200
|
+
*/
|
|
201
|
+
lastPageLabel: SlotContent<PaginationContext>;
|
|
177
202
|
slotLastFromContent: PaginationLastDirective | undefined;
|
|
178
|
-
|
|
203
|
+
/**
|
|
204
|
+
* The template to use for the pages slot
|
|
205
|
+
* To use to customize the pages view
|
|
206
|
+
* override any configuration parameters provided for this
|
|
207
|
+
*/
|
|
208
|
+
pagesDisplay: SlotContent<PaginationContext>;
|
|
179
209
|
slotPagesFromContent: PaginationPagesDirective | undefined;
|
|
180
|
-
|
|
210
|
+
/**
|
|
211
|
+
* The template to use for the number slot
|
|
212
|
+
* override any configuration parameters provided for this
|
|
213
|
+
* for I18n, we suggest to use the global configuration
|
|
214
|
+
*/
|
|
215
|
+
numberLabel: SlotContent<PaginationNumberContext>;
|
|
181
216
|
slotNumberLabelFromContent: PaginationNumberDirective | undefined;
|
|
182
|
-
|
|
217
|
+
/**
|
|
218
|
+
* The template to use for the structure of the pagination component
|
|
219
|
+
* The default structure uses PaginationProps.ellipsisLabelellipsisLabel , PaginationProps.firstPageLabelfirstPageLabel ,
|
|
220
|
+
* PaginationProps.previousPageLabelpreviousPageLabel , PaginationProps.nextPageLabelnextPageLabel ,
|
|
221
|
+
* PaginationProps.lastPageLabellastPageLabel , PaginationProps.pagesDisplaypagesDisplay ,
|
|
222
|
+
* PaginationProps.numberLabelnumberLabel ,
|
|
223
|
+
*/
|
|
224
|
+
structure: SlotContent<PaginationContext>;
|
|
183
225
|
slotStructureFromContent: PaginationStructureDirective | undefined;
|
|
184
226
|
/**
|
|
185
227
|
* If `true`, pagination links will be disabled.
|
|
@@ -242,7 +284,7 @@ export declare class PaginationComponent extends BaseWidgetDirective<PaginationW
|
|
|
242
284
|
className: string | undefined;
|
|
243
285
|
ngAfterContentChecked(): void;
|
|
244
286
|
static ɵfac: i0.ɵɵFactoryDeclaration<PaginationComponent, never>;
|
|
245
|
-
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; }; "
|
|
287
|
+
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>;
|
|
246
288
|
static ngAcceptInputType_disabled: unknown;
|
|
247
289
|
static ngAcceptInputType_boundaryLinks: unknown;
|
|
248
290
|
static ngAcceptInputType_directionLinks: unknown;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export type
|
|
4
|
-
export type PaginationProps = WidgetProps<PaginationWidget>;
|
|
5
|
-
export type PaginationState = WidgetState<PaginationWidget>;
|
|
6
|
-
export type PaginationContext = AdaptSlotContentProps<import('@agnos-ui/core-bootstrap/components/pagination').PaginationContext>;
|
|
7
|
-
export type PaginationNumberContext = AdaptSlotContentProps<import('@agnos-ui/core-bootstrap/components/pagination').PaginationNumberContext>;
|
|
1
|
+
import type { WidgetFactory } from '@agnos-ui/angular-headless';
|
|
2
|
+
import type { PaginationProps, PaginationWidget } from './pagination.gen';
|
|
3
|
+
export type * from './pagination.gen';
|
|
8
4
|
export declare const createPagination: WidgetFactory<PaginationWidget>;
|
|
5
|
+
export declare const getPaginationDefaultConfig: () => PaginationProps;
|