@agnos-ui/angular-bootstrap 0.8.0-next.1 → 0.8.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 +5 -3
- package/components/carousel/carousel.component.d.ts +207 -0
- package/components/carousel/carousel.gen.d.ts +358 -0
- package/components/carousel/index.d.ts +2 -0
- package/components/toast/index.d.ts +2 -0
- package/components/toast/toast.gen.d.ts +85 -0
- package/components/toast/toaster.component.d.ts +17 -0
- package/components/toast/toaster.service.d.ts +7 -0
- package/config.gen.d.ts +5 -0
- package/fesm2022/agnos-ui-angular-bootstrap.mjs +724 -134
- package/fesm2022/agnos-ui-angular-bootstrap.mjs.map +1 -1
- package/index.d.ts +5 -0
- package/package.json +5 -3
|
@@ -187,6 +187,21 @@ export type ToastWidget = Widget<ToastProps, ToastState, ToastApi, ToastDirectiv
|
|
|
187
187
|
*/
|
|
188
188
|
declare const export_createToast: WidgetFactory<ToastWidget>;
|
|
189
189
|
export { export_createToast as createToast };
|
|
190
|
+
/**
|
|
191
|
+
* A mapping of toast position keys to their corresponding CSS class strings of bootstrap.
|
|
192
|
+
* These classes define the positioning of toast notifications on the screen.
|
|
193
|
+
*
|
|
194
|
+
* The keys represent various positions on the screen, such as top-left, top-center,
|
|
195
|
+
* middle-right, etc., and the values are the CSS classes of bootstrap that apply the respective
|
|
196
|
+
* positioning styles.
|
|
197
|
+
*
|
|
198
|
+
* Example usage:
|
|
199
|
+
* ```typescript
|
|
200
|
+
* const positionClass = toastPositions.topLeft; // "top-0 start-0"
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
203
|
+
declare const export_toastPositions: Record<ToastPositions, string>;
|
|
204
|
+
export { export_toastPositions as toastPositions };
|
|
190
205
|
/**
|
|
191
206
|
* Represents the API for the toast component.
|
|
192
207
|
*/
|
|
@@ -221,3 +236,73 @@ export interface ToastDirectives {
|
|
|
221
236
|
*/
|
|
222
237
|
closeButtonDirective: Directive;
|
|
223
238
|
}
|
|
239
|
+
/**
|
|
240
|
+
* Represents the possible positions for displaying a toast notification.
|
|
241
|
+
*
|
|
242
|
+
* The positions are defined based on a grid layout with three horizontal
|
|
243
|
+
* alignments (left, center, right) and three vertical alignments (top, middle, bottom).
|
|
244
|
+
*
|
|
245
|
+
* Available positions:
|
|
246
|
+
* - `topLeft`: Top-left corner of the screen.
|
|
247
|
+
* - `topCenter`: Top-center of the screen.
|
|
248
|
+
* - `topRight`: Top-right corner of the screen.
|
|
249
|
+
* - `middleLeft`: Middle-left side of the screen.
|
|
250
|
+
* - `middleCenter`: Center of the screen.
|
|
251
|
+
* - `middleRight`: Middle-right side of the screen.
|
|
252
|
+
* - `bottomLeft`: Bottom-left corner of the screen.
|
|
253
|
+
* - `bottomCenter`: Bottom-center of the screen.
|
|
254
|
+
* - `bottomRight`: Bottom-right corner of the screen.
|
|
255
|
+
*/
|
|
256
|
+
export type ToastPositions = 'topLeft' | 'topCenter' | 'topRight' | 'middleLeft' | 'middleCenter' | 'middleRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
|
257
|
+
/**
|
|
258
|
+
* Props of the toaster
|
|
259
|
+
*/
|
|
260
|
+
export interface ToasterProps {
|
|
261
|
+
/** How much time (ms) a toast is displayed; 0 means it won't be removed until a manual action */
|
|
262
|
+
duration: number;
|
|
263
|
+
/** Where to position the toasts */
|
|
264
|
+
position: ToastPositions;
|
|
265
|
+
/** Maximum number of toasts displayed */
|
|
266
|
+
limit?: number;
|
|
267
|
+
/** Pause toast when hover */
|
|
268
|
+
pauseOnHover?: boolean;
|
|
269
|
+
/** Display a dismiss button on each toast. When duration = 0, this is enforced to true */
|
|
270
|
+
dismissible: boolean;
|
|
271
|
+
/** Add a button to close all the toasts at once */
|
|
272
|
+
closeAll?: boolean;
|
|
273
|
+
/** Close all label */
|
|
274
|
+
closeAllLabel?: string;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Toast object
|
|
278
|
+
* @template Props Type of the toast properties.
|
|
279
|
+
*/
|
|
280
|
+
export interface ToasterToast<Props> {
|
|
281
|
+
/** Identifier of the toasts in the toaster */
|
|
282
|
+
id: number;
|
|
283
|
+
/** Properties of the toast */
|
|
284
|
+
props: Props;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Represents a timer used by the toaster service.
|
|
288
|
+
*/
|
|
289
|
+
export interface ToasterTimer {
|
|
290
|
+
/**
|
|
291
|
+
* The timeout identifier returned by `setTimeout`.
|
|
292
|
+
*/
|
|
293
|
+
timeout: ReturnType<typeof setTimeout> | null;
|
|
294
|
+
/**
|
|
295
|
+
* The timestamp when the timer was started.
|
|
296
|
+
*/
|
|
297
|
+
started: number;
|
|
298
|
+
/**
|
|
299
|
+
* The timestamp when the timer was paused (optional).
|
|
300
|
+
*/
|
|
301
|
+
paused?: number;
|
|
302
|
+
/**
|
|
303
|
+
* The duration for which the timer is set (optional). Used internally to compute the remaining time.
|
|
304
|
+
*/
|
|
305
|
+
duration: number;
|
|
306
|
+
}
|
|
307
|
+
declare const export_defaultToasterProps: ToasterProps;
|
|
308
|
+
export { export_defaultToasterProps as defaultToasterProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ToasterService } from './toaster.service';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ToasterComponent {
|
|
4
|
+
readonly toasterService: ToasterService;
|
|
5
|
+
readonly auDismissible: import("@angular/core").InputSignal<boolean>;
|
|
6
|
+
readonly auDuration: import("@angular/core").InputSignal<number>;
|
|
7
|
+
readonly auPosition: import("@angular/core").InputSignal<import("@agnos-ui/angular-headless").ToastPositions>;
|
|
8
|
+
readonly auLimit: import("@angular/core").InputSignal<number | undefined>;
|
|
9
|
+
readonly auPauseOnHover: import("@angular/core").InputSignal<boolean | undefined>;
|
|
10
|
+
readonly auCloseAll: import("@angular/core").InputSignal<boolean | undefined>;
|
|
11
|
+
readonly auCloseAllLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
12
|
+
readonly positionClass: import("@angular/core").Signal<string>;
|
|
13
|
+
constructor();
|
|
14
|
+
handleHidden(toast: any): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToasterComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToasterComponent, "[auToaster]", never, { "auDismissible": { "alias": "auDismissible"; "required": false; "isSignal": true; }; "auDuration": { "alias": "auDuration"; "required": false; "isSignal": true; }; "auPosition": { "alias": "auPosition"; "required": false; "isSignal": true; }; "auLimit": { "alias": "auLimit"; "required": false; "isSignal": true; }; "auPauseOnHover": { "alias": "auPauseOnHover"; "required": false; "isSignal": true; }; "auCloseAll": { "alias": "auCloseAll"; "required": false; "isSignal": true; }; "auCloseAllLabel": { "alias": "auCloseAllLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ToastProps } from './toast.gen';
|
|
2
|
+
import { ToasterService as headlessToaster } from '@agnos-ui/angular-headless';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ToasterService extends headlessToaster<Partial<ToastProps>> {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToasterService, never>;
|
|
6
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ToasterService>;
|
|
7
|
+
}
|
package/config.gen.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AccordionProps } from './components/accordion';
|
|
2
2
|
import type { AlertProps } from './components/alert';
|
|
3
|
+
import type { CarouselProps } from './components/carousel';
|
|
3
4
|
import type { CollapseProps } from './components/collapse';
|
|
4
5
|
import type { ModalProps } from './components/modal';
|
|
5
6
|
import type { PaginationProps } from './components/pagination';
|
|
@@ -18,6 +19,10 @@ export type WidgetsConfig = {
|
|
|
18
19
|
* the alert widget config
|
|
19
20
|
*/
|
|
20
21
|
alert: AlertProps;
|
|
22
|
+
/**
|
|
23
|
+
* the carousel widget config
|
|
24
|
+
*/
|
|
25
|
+
carousel: CarouselProps<any>;
|
|
21
26
|
/**
|
|
22
27
|
* the collapse widget config
|
|
23
28
|
*/
|