@agnos-ui/angular-bootstrap
Version:
Bootstrap-based component library for Angular.
1 lines • 386 kB
Source Map (JSON)
{"version":3,"file":"agnos-ui-angular-bootstrap.mjs","sources":["../../src/components/modal/modal.gen.ts","../../src/config.ts","../../src/components/modal/modal.component.ts","../../src/components/pagination/pagination.gen.ts","../../src/components/pagination/pagination.component.ts","../../src/components/rating/rating.gen.ts","../../src/components/rating/rating.component.ts","../../src/components/select/select.gen.ts","../../src/components/select/select.component.ts","../../src/components/alert/alert.gen.ts","../../src/components/alert/alert.component.ts","../../src/components/accordion/accordion.gen.ts","../../src/components/accordion/accordion.component.ts","../../src/components/slider/slider.gen.ts","../../src/components/slider/slider.component.ts","../../src/components/progressbar/progressbar.gen.ts","../../src/components/progressbar/progressbar.component.ts","../../src/components/toast/toast.gen.ts","../../src/components/toast/toast.component.ts","../../src/components/collapse/collapse.component.ts","../../src/components/collapse/collapse.gen.ts","../../src/components/tree/tree.gen.ts","../../src/components/tree/tree.component.ts","../../src/components/carousel/carousel.gen.ts","../../src/components/carousel/carousel.component.ts","../../src/components/toast/toaster.service.ts","../../src/components/toast/toaster.component.ts","../../src/agnos-ui-angular.module.ts","../../src/components/modal/modal.service.ts","../../src/index.ts","../../src/agnos-ui-angular-bootstrap.ts"],"sourcesContent":["import {getModalDefaultConfig, createModal, modalOutsideClick, modalCloseButtonClick} from '@agnos-ui/core-bootstrap/components/modal';\nimport type {WidgetSlotContext, SlotContent, TransitionFn, Widget, PropsConfig, Directive} from '@agnos-ui/angular-headless';\n\n\n/**\n * Retrieve a shallow copy of the default modal config\n * @returns the default modal config\n */\nconst export_getModalDefaultConfig: () => ModalProps<any> = getModalDefaultConfig as any;\nexport {export_getModalDefaultConfig as getModalDefaultConfig};\n\n\n\n/**\n * Represents the context for a modal component.\n *\n * @template Data - The type of data associated with the modal.\n */\nexport interface ModalContext<Data> extends WidgetSlotContext<ModalWidget<Data>> {}\n\n/**\n * Represents the state of a modal component.\n *\n * @template Data - The type of the data associated with the modal.\n */\nexport interface ModalState<Data> {\n\t\n\t/**\n\t * Whether the backdrop is fully hidden. This can be true either because {@link ModalProps.backdrop|backdrop} is false or\n\t * because {@link ModalProps.visible|visible} is false and there is no current transition.\n\t */\n\tbackdropHidden: boolean;\n\t\n\n\t/**\n\t * Whether the modal is fully hidden.\n\t */\n\thidden: boolean;\n\t\n\n\t/**\n\t * Whether there is an active transition to either display or hide the modal.\n\t */\n\ttransitioning: boolean;\n\t\n\n\t/**\n\t * DOM element of the modal.\n\t */\n\tmodalElement: HTMLElement | null;\n\t\n\t/**\n\t * Value of the aria-label attribute to put on the close button.\n\t *\n\t * @defaultValue `'Close'`\n\t */\n\tariaCloseButtonLabel: string;\n\t\n\n\t/**\n\t * Classes to add on the backdrop DOM element.\n\t *\n\t * @defaultValue `''`\n\t */\n\tbackdropClass: string;\n\t\n\n\t/**\n\t * Whether to display the close button.\n\t *\n\t * @defaultValue `true`\n\t */\n\tcloseButton: boolean;\n\t\n\n\t/**\n\t * Which element should contain the modal and backdrop DOM elements.\n\t * If it is not null, the modal and backdrop DOM elements are moved to the specified container.\n\t * Otherwise, they stay where the widget is located.\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * typeof window !== 'undefined' ? document.body : null\n\t * ```\n\t */\n\tcontainer: HTMLElement | null;\n\t\n\n\t/**\n\t * Whether the modal should be visible when the transition is completed.\n\t *\n\t * @defaultValue `false`\n\t */\n\tvisible: boolean;\n\t\n\t/**\n\t * CSS classes to be applied on the widget main container\n\t *\n\t * @defaultValue `''`\n\t */\n\tclassName: string;\n\t\n\t/**\n\t * Data to use in content slots\n\t */\n\tcontentData: Data;\n\t\n\t/**\n\t * Body of the modal.\n\t */\n\tchildren: SlotContent<ModalContext<Data>>;\n\t\n\n\t/**\n\t * Footer of the modal.\n\t */\n\tfooter: SlotContent<ModalContext<Data>>;\n\t\n\n\t/**\n\t * Header of the modal. The default header includes {@link ModalProps.title|title}.\n\t */\n\theader: SlotContent<ModalContext<Data>>;\n\t\n\n\t/**\n\t * Structure of the modal.\n\t * The default structure uses {@link ModalProps.header|header}, {@link ModalProps.children|children} and {@link ModalProps.footer|footer}.\n\t */\n\tstructure: SlotContent<ModalContext<Data>>;\n\t\n\n\t/**\n\t * Title of the modal.\n\t */\n\ttitle: SlotContent<ModalContext<Data>>;\n\t\n\t/**\n\t * Option to create a fullscreen modal, according to the bootstrap documentation.\n\t *\n\t * @defaultValue `false`\n\t */\n\tfullscreen: boolean;\n}\n\n/**\n * Interface representing the properties for a modal component.\n *\n * @template Data - The type of data that the modal will handle.\n */\nexport interface ModalProps<Data> {\n\t\n\t/**\n\t * The transition to use for the backdrop behind the modal (if present).\n\t *\n\t * @defaultValue `fadeTransition`\n\t */\n\tbackdropTransition: TransitionFn;\n\t\n\n\t/**\n\t * The transition to use for the modal.\n\t *\n\t * @defaultValue `fadeTransition`\n\t */\n\tmodalTransition: TransitionFn;\n\t\n\t/**\n\t * Whether the modal and its backdrop (if present) should be animated when shown or hidden.\n\t *\n\t * @defaultValue `true`\n\t */\n\tanimated: boolean;\n\t\n\n\t/**\n\t * Whether a backdrop should be created behind the modal.\n\t *\n\t * @defaultValue `true`\n\t */\n\tbackdrop: boolean;\n\t\n\n\t/**\n\t * Whether the modal should be closed when clicking on the viewport outside the modal.\n\t *\n\t * @defaultValue `true`\n\t */\n\tcloseOnOutsideClick: boolean;\n\t\n\n\t/**\n\t * Event to be triggered when the modal is about to be closed (i.e. the {@link ModalApi.close|close} method was called).\n\t *\n\t * @param event - event giving access to the argument given to the {@link ModalApi.close|close} method and allowing\n\t * to cancel the close process.\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * () => {}\n\t * ```\n\t */\n\tonBeforeClose: (event: ModalBeforeCloseEvent) => void;\n\t\n\n\t/**\n\t * Event to be triggered when the visible property changes.\n\t *\n\t * @param visible - new value of the visible propery\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * () => {}\n\t * ```\n\t */\n\tonVisibleChange: (visible: boolean) => void;\n\t\n\n\t/**\n\t * Event to be triggered when the transition is completed and the modal is not visible.\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * () => {}\n\t * ```\n\t */\n\tonHidden: () => void;\n\t\n\n\t/**\n\t * Event to be triggered when the transition is completed and the modal is visible.\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * () => {}\n\t * ```\n\t */\n\tonShown: () => void;\n\t\n\t/**\n\t * Value of the aria-label attribute to put on the close button.\n\t *\n\t * @defaultValue `'Close'`\n\t */\n\tariaCloseButtonLabel: string;\n\t\n\n\t/**\n\t * Classes to add on the backdrop DOM element.\n\t *\n\t * @defaultValue `''`\n\t */\n\tbackdropClass: string;\n\t\n\n\t/**\n\t * Whether to display the close button.\n\t *\n\t * @defaultValue `true`\n\t */\n\tcloseButton: boolean;\n\t\n\n\t/**\n\t * Which element should contain the modal and backdrop DOM elements.\n\t * If it is not null, the modal and backdrop DOM elements are moved to the specified container.\n\t * Otherwise, they stay where the widget is located.\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * typeof window !== 'undefined' ? document.body : null\n\t * ```\n\t */\n\tcontainer: HTMLElement | null;\n\t\n\n\t/**\n\t * Whether the modal should be visible when the transition is completed.\n\t *\n\t * @defaultValue `false`\n\t */\n\tvisible: boolean;\n\t\n\t/**\n\t * CSS classes to be applied on the widget main container\n\t *\n\t * @defaultValue `''`\n\t */\n\tclassName: string;\n\t\n\t/**\n\t * Data to use in content slots\n\t */\n\tcontentData: Data;\n\t\n\t/**\n\t * Body of the modal.\n\t */\n\tchildren: SlotContent<ModalContext<Data>>;\n\t\n\n\t/**\n\t * Footer of the modal.\n\t */\n\tfooter: SlotContent<ModalContext<Data>>;\n\t\n\n\t/**\n\t * Header of the modal. The default header includes {@link ModalProps.title|title}.\n\t */\n\theader: SlotContent<ModalContext<Data>>;\n\t\n\n\t/**\n\t * Structure of the modal.\n\t * The default structure uses {@link ModalProps.header|header}, {@link ModalProps.children|children} and {@link ModalProps.footer|footer}.\n\t */\n\tstructure: SlotContent<ModalContext<Data>>;\n\t\n\n\t/**\n\t * Title of the modal.\n\t */\n\ttitle: SlotContent<ModalContext<Data>>;\n\t\n\t/**\n\t * Option to create a fullscreen modal, according to the bootstrap documentation.\n\t *\n\t * @defaultValue `false`\n\t */\n\tfullscreen: boolean;\n}\n\n/**\n * Interface representing the API for a modal component.\n *\n * @template Data - The type of data associated with the modal.\n */\nexport interface ModalApi<Data> {\n\t\n\t/**\n\t * Method to change some modal properties.\n\t */\n\tpatch: ModalWidget<Data>['patch'];\n\t\n\t/**\n\t * Closes the modal with the given result.\n\t *\n\t * @param result - result of the modal, as passed in the {@link ModalBeforeCloseEvent.result|result} property of the event passed to the\n\t * {@link ModalProps.onBeforeClose|onBeforeClose} event handler (and possibly changed by it) and resolved by the promise returned by the {@link ModalApi.open|open} method.\n\t */\n\tclose(result?: any): void;\n\t\n\n\t/**\n\t * Opens the modal and returns a promise that is resolved when the modal is closed.\n\t * The resolved value is the result passed to the {@link ModalApi.close|close} method and possibly changed by the\n\t * {@link ModalProps.onBeforeClose|onBeforeClose} event handler\n\t */\n\topen(): Promise<any>;\n}\n\n\n\n/**\n * Represents a modal widget with specific data type.\n *\n * @template Data - The type of data that the modal widget will handle.\n */\nexport type ModalWidget<Data> = Widget<ModalProps<Data>, ModalState<Data>, ModalApi<Data>, ModalDirectives>;\n\n\n\n/**\n * Creates a new modal widget instance.\n * @param config - config of the modal, either as a store or as an object containing values or stores.\n * @returns a new modal widget instance\n */\nconst export_createModal: <Data>(config?: PropsConfig<ModalProps<Data>>) => ModalWidget<Data> = createModal as any;\nexport {export_createModal as createModal};\n\n\n\n/**\n * Value present in the {@link ModalBeforeCloseEvent.result|result} property of the {@link ModalProps.onBeforeClose|onBeforeClose} event\n * and returned by the {@link ModalApi.open|open} method, when the modal is closed by a click inside the viewport but outside the modal.\n */\nconst export_modalOutsideClick: typeof modalOutsideClick = modalOutsideClick as any;\nexport {export_modalOutsideClick as modalOutsideClick};\n\n\n\n/**\n * Value present in the {@link ModalBeforeCloseEvent.result|result} property of the {@link ModalProps.onBeforeClose|onBeforeClose} event\n * and returned by the {@link ModalApi.open|open} method, when the modal is closed by a click on the close button.\n */\nconst export_modalCloseButtonClick: typeof modalCloseButtonClick = modalCloseButtonClick as any;\nexport {export_modalCloseButtonClick as modalCloseButtonClick};\n\n/**\n * Type of the parameter of {@link ModalProps.onBeforeClose|onBeforeClose}.\n */\nexport interface ModalBeforeCloseEvent {\n\t\n\t/**\n\t * Result of the modal, which is the value passed to the {@link ModalApi.close|close} method\n\t * and later resolved by the promise returned by the {@link ModalApi.open|open} method.\n\t * If needed, it can be changed from the {@link ModalProps.onBeforeClose|onBeforeClose} event handler.\n\t */\n\tresult: any;\n\t\n\n\t/**\n\t * Whether to cancel the close of the modal.\n\t * It can be changed from the {@link ModalProps.onBeforeClose|onBeforeClose} event handler.\n\t */\n\tcancel: boolean;\n}\n\n/**\n * Directives of the modal widget.\n */\nexport interface ModalDirectives {\n\t\n\t/**\n\t * Directive to put on the modal DOM element.\n\t */\n\tmodalDirective: Directive;\n\t\n\n\t/**\n\t * Directive to put on the backdrop DOM element.\n\t */\n\tbackdropDirective: Directive;\n\t\n\n\t/**\n\t * Portal directive to put on the modal DOM element.\n\t */\n\tmodalPortalDirective: Directive;\n\t\n\n\t/**\n\t * Portal directive to put on the backdrop DOM element.\n\t */\n\tbackdropPortalDirective: Directive;\n\t\n\n\t/**\n\t * Directive that adds all the necessary attributes to the close button\n\t */\n\tcloseButtonDirective: Directive;\n\t\n\t/**\n\t * Directive to apply to the dialog element when using the native {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement | HTMLDialogElement}\n\t */\n\tdialogDirective: Directive;\n}\n\n","import type {\n\tAngularWidget,\n\tIsSlotContent,\n\tPartial2Levels,\n\tSlotContent,\n\tWidget,\n\tWidgetFactory,\n\tWidgetProps,\n\tWidgetsConfigStore,\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tBaseWidgetDirective,\n} from '@agnos-ui/angular-headless';\nimport {widgetsConfigFactory} from '@agnos-ui/angular-headless';\nimport type {BootstrapWidgetsConfig} from '@agnos-ui/core-bootstrap/config';\nimport type {ReadableSignal} from '@amadeus-it-group/tansu';\nimport type {FactoryProvider, TemplateRef} from '@angular/core';\nimport {InjectionToken} from '@angular/core';\n\nimport type {WidgetsConfig} from './config.gen';\nexport type {WidgetsConfig};\n\ntype AdaptParentConfig = (config: Partial2Levels<WidgetsConfig>) => Partial2Levels<WidgetsConfig>;\ntype InjectWidgetsConfig = (config?: Partial2Levels<WidgetsConfig>) => WidgetsConfigStore<WidgetsConfig>;\n\nconst widgetFactories: {\n\twidgetsConfigInjectionToken: InjectionToken<WidgetsConfigStore<WidgetsConfig>>;\n\tprovideWidgetsConfig: (adaptParentConfig?: AdaptParentConfig) => FactoryProvider;\n\tinjectWidgetConfig: <N extends keyof BootstrapWidgetsConfig>(widgetName: N) => ReadableSignal<Partial<WidgetsConfig[N]> | undefined>;\n\tinjectWidgetsConfig: InjectWidgetsConfig;\n\n\tcallWidgetFactory: <W extends Widget<object, object, object, object>>(\n\t\tfactory: WidgetFactory<W>,\n\t\toptions?: {\n\t\t\twidgetName?: keyof BootstrapWidgetsConfig | null | undefined;\n\t\t\tdefaultConfig?: Partial<WidgetProps<W>> | ReadableSignal<Partial<WidgetProps<W>> | undefined> | undefined;\n\t\t\tevents?: Partial<Pick<WidgetProps<W>, keyof WidgetProps<W> & `on${string}`>>;\n\t\t\tafterInit?: (widget: AngularWidget<W>) => void;\n\t\t\tslotTemplates?: () => {\n\t\t\t\t[K in keyof WidgetProps<W> as IsSlotContent<WidgetProps<W>[K]> extends 0 ? never : K]: WidgetProps<W>[K] extends SlotContent<infer U>\n\t\t\t\t\t? TemplateRef<U> | undefined\n\t\t\t\t\t: never;\n\t\t\t};\n\t\t\tslotChildren?: () => TemplateRef<void> | undefined;\n\t\t},\n\t) => AngularWidget<W>;\n} = widgetsConfigFactory<WidgetsConfig>(new InjectionToken<WidgetsConfigStore<WidgetsConfig>>('bootstrapWidgetsConfig')) as any;\n\n/**\n * Dependency Injection token which can be used to provide or inject the widgets default configuration store.\n */\nexport const widgetsConfigInjectionToken = widgetFactories.widgetsConfigInjectionToken;\n\n/**\n * Creates a provider of widgets default configuration that inherits from any widgets default configuration already defined at an upper level\n * in the Angular dependency injection system. It contains its own set of widgets configuration properties that override the same properties form\n * the parent configuration.\n *\n * @remarks\n * The configuration is computed from the parent configuration in two steps:\n * - first step: the parent configuration is transformed by the adaptParentConfig function (if specified).\n * If adaptParentConfig is not specified, this step is skipped.\n * - second step: the configuration from step 1 is merged (2-levels deep) with the own$ store. The own$ store initially contains\n * an empty object (i.e. no property from the parent is overridden). It can be changed by calling set on the store returned by\n * {@link injectWidgetsConfig}.\n *\n * @param adaptParentConfig - optional function that receives a 2-levels copy of the widgets default configuration\n * defined at an upper level in the Angular dependency injection system (or an empty object if there is none) and returns the widgets\n * default configuration to be used.\n * It is called only if the configuration is needed, and was not yet computed for the current value of the parent configuration.\n * It is called in a tansu reactive context, so it can use any tansu store and will be called again if those stores change.\n * It is also called in an Angular injection context, so it can call the Angular inject function to get and use dependencies from the\n * Angular dependency injection system.\n *\n * @returns DI provider to be included a list of `providers` (for example at a component level or\n * any other level of the Angular dependency injection system)\n *\n * @example\n * ```typescript\n * @Component({\n * // ...\n * providers: [\n * provideWidgetsConfig((parentConfig) => {\n * // first step configuration: transforms the parent configuration\n * parentConfig.rating = parentConfig.rating ?? {};\n * parentConfig.rating.className = `${parentConfig.rating.className ?? ''} my-rating-extra-class`\n * return parentConfig;\n * })\n * ]\n * })\n * class MyComponent {\n * widgetsConfig = injectWidgetsConfig();\n * constructor() {\n * this.widgetsConfig.set({\n * // second step configuration: overrides the parent configuration\n * rating: {\n * slotStar: MyCustomSlotStar\n * }\n * });\n * }\n * // ...\n * }\n * ```\n */\nexport const provideWidgetsConfig = widgetFactories.provideWidgetsConfig;\n\n/**\n * Returns the widgets default configuration store that was provided in the current injection context.\n * Throws if the no widgets default configuration store was provided.\n *\n * @param defaultConfig - values to set as soon as the config is injected\n * @remarks\n * This function must be called from an injection context, such as a constructor, a factory function, a field initializer or\n * a function used with {@link https://angular.io/api/core/runInInjectionContext | runInInjectionContext}.\n *\n * @returns the widgets default configuration store.\n */\nexport const injectWidgetsConfig = widgetFactories.injectWidgetsConfig;\n\n/**\n * Injects the configuration for a specific widget.\n *\n * @template N - The key of the widget configuration in the `Config` type.\n * @param widgetName - The name of the widget whose configuration is to be injected.\n * @returns A `ReadableSignal` that provides a partial configuration of the specified widget or `undefined` if the configuration is not available.\n */\nexport const injectWidgetConfig = widgetFactories.injectWidgetConfig;\n\n/**\n * Creates and initializes a widget using the provided factory and configuration options.\n *\n * The resulting widget can be easily hooked into the lifecycle of an Angular component through {@link BaseWidgetDirective}.\n *\n * @template W - The type of the widget.\n * @param factory - The factory function to create the widget.\n * @param options - The options for creating the widget.\n * @param options.defaultConfig - The default configuration for the widget.\n * @param options.events - The event handlers for the widget.\n * @param options.slotTemplates - A function that returns the slot templates for the widget.\n * @param options.slotChildren - A function that returns the slot children for the widget.\n * @param options.afterInit - A callback function to be called after the widget is initialized.\n * @returns The initialized widget.\n */\nexport const callWidgetFactory = widgetFactories.callWidgetFactory;\n","import type {SlotContent, TransitionFn} from '@agnos-ui/angular-headless';\nimport {BaseWidgetDirective, ComponentTemplate, SlotDirective, UseDirective, UseMultiDirective, auBooleanAttribute} from '@agnos-ui/angular-headless';\nimport type {ModalContext, ModalWidget, ModalBeforeCloseEvent} from './modal.gen';\nimport {createModal} from './modal.gen';\nimport {ChangeDetectionStrategy, Component, Directive, TemplateRef, inject, input, output, viewChild, contentChild} from '@angular/core';\nimport {callWidgetFactory} from '../../config';\n\n/**\n * Directive to provide the slot structure for the modal widget.\n * This directive provides a template reference for the {@link ModalContext<Data>}.\n */\n@Directive({selector: 'ng-template[auModalStructure]'})\nexport class ModalStructureDirective<Data> {\n\tpublic templateRef = inject(TemplateRef<ModalContext<Data>>);\n\tstatic ngTemplateContextGuard<Data>(_dir: ModalStructureDirective<Data>, context: unknown): context is ModalContext<Data> {\n\t\treturn true;\n\t}\n}\n\n/**\n * Directive to provide the slot header for the modal widget.\n * This directive provides a template reference for the {@link ModalContext<Data>}.\n */\n@Directive({selector: 'ng-template[auModalHeader]'})\nexport class ModalHeaderDirective<Data> {\n\tpublic templateRef = inject(TemplateRef<ModalContext<Data>>);\n\tstatic ngTemplateContextGuard<Data>(_dir: ModalHeaderDirective<Data>, context: unknown): context is ModalContext<Data> {\n\t\treturn true;\n\t}\n}\n\n/**\n * Directive to provide the slot title for the modal widget.\n * This directive provides a template reference for the {@link ModalContext<Data>}.\n */\n@Directive({selector: 'ng-template[auModalTitle]'})\nexport class ModalTitleDirective<Data> {\n\tpublic templateRef = inject(TemplateRef<ModalContext<Data>>);\n\tstatic ngTemplateContextGuard<Data>(_dir: ModalTitleDirective<Data>, context: unknown): context is ModalContext<Data> {\n\t\treturn true;\n\t}\n}\n\n/**\n * Directive to provide the default slot for the modal widget.\n * This directive provides a template reference for the {@link ModalContext<Data>}.\n */\n@Directive({selector: 'ng-template[auModalBody]'})\nexport class ModalBodyDirective<Data> {\n\tpublic templateRef = inject(TemplateRef<ModalContext<Data>>);\n\tstatic ngTemplateContextGuard<Data>(_dir: ModalBodyDirective<Data>, context: unknown): context is ModalContext<Data> {\n\t\treturn true;\n\t}\n}\n\n/**\n * Directive to provide the slot footer for the modal widget.\n * This directive provides a template reference for the {@link ModalContext<Data>}.\n */\n@Directive({selector: 'ng-template[auModalFooter]'})\nexport class ModalFooterDirective<Data> {\n\tpublic templateRef = inject(TemplateRef<ModalContext<Data>>);\n\tstatic ngTemplateContextGuard<Data>(_dir: ModalFooterDirective<Data>, context: unknown): context is ModalContext<Data> {\n\t\treturn true;\n\t}\n}\n\n/**\n * Component containing the default slots for the modal.\n */\n@Component({\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [SlotDirective, ModalHeaderDirective, ModalStructureDirective, UseDirective],\n\ttemplate: `\n\t\t<ng-template auModalHeader #header let-state=\"state\" let-api=\"api\" let-directives=\"directives\">\n\t\t\t<h5 class=\"modal-title\">\n\t\t\t\t<ng-template [auSlot]=\"state.title()\" [auSlotProps]=\"{state, api, directives}\" />\n\t\t\t</h5>\n\t\t\t@if (state.closeButton()) {\n\t\t\t\t<button class=\"btn-close\" [auUse]=\"directives.closeButtonDirective\"></button>\n\t\t\t}\n\t\t</ng-template>\n\t\t<ng-template auModalStructure #structure let-state=\"state\" let-api=\"api\" let-directives=\"directives\">\n\t\t\t@if (state.title()) {\n\t\t\t\t<div class=\"modal-header\">\n\t\t\t\t\t<ng-template [auSlot]=\"state.header()\" [auSlotProps]=\"{state, api, directives}\" />\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<div class=\"modal-body\">\n\t\t\t\t<ng-template [auSlot]=\"state.children()\" [auSlotProps]=\"{state, api, directives}\" />\n\t\t\t</div>\n\t\t\t@if (state.footer()) {\n\t\t\t\t<div class=\"modal-footer\">\n\t\t\t\t\t<ng-template [auSlot]=\"state.footer()\" [auSlotProps]=\"{state, api, directives}\" />\n\t\t\t\t</div>\n\t\t\t}\n\t\t</ng-template>\n\t`,\n})\nclass ModalDefaultSlotsComponent<Data> {\n\treadonly header = viewChild.required<TemplateRef<ModalContext<Data>>>('header');\n\treadonly structure = viewChild.required<TemplateRef<ModalContext<Data>>>('structure');\n}\n\n/**\n * Default slot for modal header.\n */\nexport const modalDefaultSlotHeader: SlotContent<ModalContext<any>> = new ComponentTemplate(ModalDefaultSlotsComponent, 'header');\n\n/**\n * Default slot for modal structure.\n */\nexport const modalDefaultSlotStructure: SlotContent<ModalContext<any>> = new ComponentTemplate(ModalDefaultSlotsComponent, 'structure');\n\n/**\n * Modal component.\n */\n@Component({\n\tselector: '[auModal]',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [UseMultiDirective, SlotDirective],\n\ttemplate: `\n\t\t<ng-template #content><ng-content /></ng-template>\n\t\t@if (!state.backdropHidden()) {\n\t\t\t<div class=\"modal-backdrop\" [auUseMulti]=\"[directives.backdropPortalDirective, directives.backdropDirective]\"></div>\n\t\t}\n\t\t@if (!state.hidden()) {\n\t\t\t<div class=\"modal d-block\" [auUseMulti]=\"[directives.modalPortalDirective, directives.modalDirective]\">\n\t\t\t\t<div class=\"modal-dialog {{ state.fullscreen() ? 'modal-fullscreen' : '' }}\">\n\t\t\t\t\t<div class=\"modal-content\">\n\t\t\t\t\t\t<ng-template [auSlot]=\"state.structure()\" [auSlotProps]=\"{state, api, directives}\" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t}\n\t`,\n})\nexport class ModalComponent<Data> extends BaseWidgetDirective<ModalWidget<Data>> {\n\t/**\n\t * Whether the modal and its backdrop (if present) should be animated when shown or hidden.\n\t *\n\t * @defaultValue `true`\n\t */\n\treadonly animated = input(undefined, {alias: 'auAnimated', transform: auBooleanAttribute});\n\n\t/**\n\t * The transition to use for the backdrop behind the modal (if present).\n\t *\n\t * @defaultValue `fadeTransition`\n\t */\n\treadonly backdropTransition = input<TransitionFn>(undefined, {alias: 'auBackdropTransition'});\n\n\t/**\n\t * The transition to use for the modal.\n\t *\n\t * @defaultValue `fadeTransition`\n\t */\n\treadonly modalTransition = input<TransitionFn>(undefined, {alias: 'auModalTransition'});\n\n\t/**\n\t * Whether the modal should be visible when the transition is completed.\n\t *\n\t * @defaultValue `false`\n\t */\n\treadonly visible = input(undefined, {alias: 'auVisible', transform: auBooleanAttribute});\n\n\t/**\n\t * Whether a backdrop should be created behind the modal.\n\t *\n\t * @defaultValue `true`\n\t */\n\treadonly backdrop = input(undefined, {alias: 'auBackdrop', transform: auBooleanAttribute});\n\n\t/**\n\t * Whether the modal should be closed when clicking on the viewport outside the modal.\n\t *\n\t * @defaultValue `true`\n\t */\n\treadonly closeOnOutsideClick = input(undefined, {alias: 'auCloseOnOutsideClick', transform: auBooleanAttribute});\n\n\t/**\n\t * Which element should contain the modal and backdrop DOM elements.\n\t * If it is not null, the modal and backdrop DOM elements are moved to the specified container.\n\t * Otherwise, they stay where the widget is located.\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * typeof window !== 'undefined' ? document.body : null\n\t * ```\n\t */\n\treadonly container = input<HTMLElement | null>(undefined, {alias: 'auContainer'});\n\n\t/**\n\t * Value of the aria-label attribute to put on the close button.\n\t *\n\t * @defaultValue `'Close'`\n\t */\n\treadonly ariaCloseButtonLabel = input<string>(undefined, {alias: 'auAriaCloseButtonLabel'});\n\n\t/**\n\t * Classes to add on the backdrop DOM element.\n\t *\n\t * @defaultValue `''`\n\t */\n\treadonly backdropClass = input<string>(undefined, {alias: 'auBackdropClass'});\n\n\t/**\n\t * Whether to display the close button.\n\t *\n\t * @defaultValue `true`\n\t */\n\treadonly closeButton = input(undefined, {alias: 'auCloseButton', transform: auBooleanAttribute});\n\n\t/**\n\t * CSS classes to be applied on the widget main container\n\t *\n\t * @defaultValue `''`\n\t */\n\treadonly className = input<string>(undefined, {alias: 'auClassName'});\n\n\t/**\n\t * Option to create a fullscreen modal, according to the bootstrap documentation.\n\t *\n\t * @defaultValue `false`\n\t */\n\treadonly fullscreen = input(undefined, {alias: 'auFullscreen', transform: auBooleanAttribute});\n\n\t/**\n\t * Structure of the modal.\n\t * The default structure uses {@link ModalProps.header|header}, {@link ModalProps.children|children} and {@link ModalProps.footer|footer}.\n\t */\n\treadonly structure = input<SlotContent<ModalContext<Data>>>(undefined, {alias: 'auStructure'});\n\treadonly slotStructureFromContent = contentChild(ModalStructureDirective);\n\n\t/**\n\t * Header of the modal. The default header includes {@link ModalProps.title|title}.\n\t */\n\treadonly header = input<SlotContent<ModalContext<Data>>>(undefined, {alias: 'auHeader'});\n\treadonly slotHeaderFromContent = contentChild(ModalHeaderDirective);\n\n\t/**\n\t * Title of the modal.\n\t */\n\treadonly title = input<SlotContent<ModalContext<Data>>>(undefined, {alias: 'auTitle'});\n\treadonly slotTitleFromContent = contentChild(ModalTitleDirective);\n\n\t/**\n\t * Body of the modal.\n\t */\n\treadonly children = input<SlotContent<ModalContext<Data>>>(undefined, {alias: 'auChildren'});\n\treadonly slotDefaultFromContent = contentChild(ModalBodyDirective);\n\n\t/**\n\t * Footer of the modal.\n\t */\n\treadonly footer = input<SlotContent<ModalContext<Data>>>(undefined, {alias: 'auFooter'});\n\treadonly slotFooterFromContent = contentChild(ModalFooterDirective);\n\n\t/**\n\t * Data to use in content slots\n\t */\n\treadonly contentData = input<Data>(undefined, {alias: 'auContentData'});\n\n\t/**\n\t * Event to be triggered when the visible property changes.\n\t *\n\t * @param visible - new value of the visible propery\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * () => {}\n\t * ```\n\t */\n\treadonly visibleChange = output<boolean>({alias: 'auVisibleChange'});\n\n\t/**\n\t * Event to be triggered when the modal is about to be closed (i.e. the {@link ModalApi.close|close} method was called).\n\t *\n\t * @param event - event giving access to the argument given to the {@link ModalApi.close|close} method and allowing\n\t * to cancel the close process.\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * () => {}\n\t * ```\n\t */\n\treadonly beforeClose = output<ModalBeforeCloseEvent>({alias: 'auBeforeClose'});\n\n\t/**\n\t * Event to be triggered when the transition is completed and the modal is not visible.\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * () => {}\n\t * ```\n\t */\n\treadonly hidden = output<void>({alias: 'auHidden'});\n\n\t/**\n\t * Event to be triggered when the transition is completed and the modal is visible.\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * () => {}\n\t * ```\n\t */\n\treadonly shown = output<void>({alias: 'auShown'});\n\n\treadonly slotChildren = viewChild<TemplateRef<void>>('content');\n\n\tconstructor() {\n\t\tsuper(\n\t\t\tcallWidgetFactory<ModalWidget<Data>>(createModal, {\n\t\t\t\tdefaultConfig: {\n\t\t\t\t\theader: modalDefaultSlotHeader,\n\t\t\t\t\tstructure: modalDefaultSlotStructure,\n\t\t\t\t},\n\t\t\t\tevents: {\n\t\t\t\t\tonShown: () => this.shown.emit(),\n\t\t\t\t\tonHidden: () => this.hidden.emit(),\n\t\t\t\t\tonBeforeClose: (event) => this.beforeClose.emit(event),\n\t\t\t\t\tonVisibleChange: (event) => this.visibleChange.emit(event),\n\t\t\t\t},\n\t\t\t\tslotTemplates: () =>\n\t\t\t\t\t({\n\t\t\t\t\t\tchildren: this.slotDefaultFromContent()?.templateRef,\n\t\t\t\t\t\tfooter: this.slotFooterFromContent()?.templateRef,\n\t\t\t\t\t\theader: this.slotHeaderFromContent()?.templateRef,\n\t\t\t\t\t\tstructure: this.slotStructureFromContent()?.templateRef,\n\t\t\t\t\t\ttitle: this.slotTitleFromContent()?.templateRef,\n\t\t\t\t\t}) as any,\n\t\t\t\tslotChildren: () => this.slotChildren(),\n\t\t\t}),\n\t\t);\n\t}\n}\n","import {getPaginationDefaultConfig, createPagination} from '@agnos-ui/core-bootstrap/components/pagination';\nimport type {WidgetSlotContext, SlotContent, Widget, WidgetFactory, Directive} from '@agnos-ui/angular-headless';\n\n\n\n/**\n * Retrieve a shallow copy of the default Pagination config\n * @returns the default Pagination config\n */\nconst export_getPaginationDefaultConfig: () => PaginationProps = getPaginationDefaultConfig as any;\nexport {export_getPaginationDefaultConfig as getPaginationDefaultConfig};\n\n\n\n/**\n * A type for the slot context of the pagination widget\n */\nexport interface PaginationContext extends WidgetSlotContext<PaginationWidget> {}\n\n\n\n/**\n * A type for the slot context of the pagination widget when the slot is the number label\n */\nexport interface PaginationNumberContext extends PaginationContext {\n\t/**\n\t * Displayed page\n\t */\n\tdisplayedPage: number;\n}\n\n/**\n * Represents the state of a pagination component.\n */\nexport interface PaginationState {\n\t\n\t/**\n\t * The number of pages.\n\t */\n\tpageCount: number;\n\t\n\t/**\n\t * The current pages, the number in the Array is the number of the page.\n\t */\n\tpages: number[];\n\t\n\t/**\n\t * true if the previous link need to be disabled\n\t */\n\tpreviousDisabled: boolean;\n\t\n\t/**\n\t * true if the next link need to be disabled\n\t */\n\tnextDisabled: boolean;\n\t\n\t/**\n\t * The label for each \"Page\" page link.\n\t */\n\tpagesLabel: string[];\n\t\n\n\t/** The hrefs for each \"Page\" page link */\n\tpagesHrefs: string[];\n\t\n\n\t/** The hrefs for the direction links */\n\tdirectionsHrefs: DirectionsHrefs;\n\t\n\n\t/** The aria-live text */\n\tariaLiveLabelText: string;\n\t\n\t/**\n\t * The current page.\n\t *\n\t * Page numbers start with `1`.\n\t *\n\t * @defaultValue `1`\n\t */\n\tpage: number;\n\t // value of the current/init page to display\n\n\t/**\n\t * The label for the nav element.\n\t *\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue `'Page navigation'`\n\t */\n\tariaLabel: string;\n\t\n\n\t/**\n\t * The label for the \"active\" page.\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * '(current)'\n\t * ```\n\t */\n\tactiveLabel: string;\n\t\n\n\t/**\n\t * The label for the \"First\" page button.\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * 'Action link for first page'\n\t * ```\n\t */\n\tariaFirstLabel: string;\n\t\n\n\t/**\n\t * The label for the \"Previous\" page button.\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * 'Action link for previous page'\n\t * ```\n\t */\n\tariaPreviousLabel: string;\n\t\n\n\t/**\n\t * The label for the \"Next\" page button.\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * 'Action link for next page'\n\t * ```\n\t */\n\tariaNextLabel: string;\n\t\n\n\t/**\n\t * The label for the \"Last\" page button.\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * 'Action link for last page'\n\t * ```\n\t */\n\tariaLastLabel: string;\n\t\n\n\t/**\n\t * The label for the \"Ellipsis\" page.\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue `'Ellipsis page element'`\n\t */\n\tariaEllipsisLabel: string;\n\t\n\n\t/**\n\t * If `true`, pagination links will be disabled.\n\t *\n\t * @defaultValue `false`\n\t */\n\tdisabled: boolean;\n\t\n\n\t/**\n\t * If `true`, the \"Next\" and \"Previous\" page links are shown.\n\t *\n\t * @defaultValue `true`\n\t */\n\tdirectionLinks: boolean;\n\t\n\n\t/**\n\t * If `true`, the \"First\" and \"Last\" page links are shown.\n\t *\n\t * @defaultValue `false`\n\t */\n\tboundaryLinks: boolean;\n\t\n\t/**\n\t * CSS classes to be applied on the widget main container\n\t *\n\t * @defaultValue `''`\n\t */\n\tclassName: string;\n\t\n\t/**\n\t * The template to use for the structure of the pagination component\n\t * The default structure uses {@link PaginationProps.ellipsisLabel|ellipsisLabel}, {@link PaginationProps.firstPageLabel|firstPageLabel},\n\t * {@link PaginationProps.previousPageLabel|previousPageLabel}, {@link PaginationProps.nextPageLabel|nextPageLabel},\n\t * {@link PaginationProps.lastPageLabel|lastPageLabel}, {@link PaginationProps.pagesDisplay|pagesDisplay},\n\t * {@link PaginationProps.numberLabel|numberLabel},\n\t */\n\tstructure: SlotContent<PaginationContext>;\n\t\n\n\t/**\n\t * The template to use for the ellipsis slot\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue `'…'`\n\t */\n\tellipsisLabel: SlotContent<PaginationContext>;\n\t\n\n\t/**\n\t * The template to use for the first slot\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue `'«'`\n\t */\n\tfirstPageLabel: SlotContent<PaginationContext>;\n\t\n\n\t/**\n\t * The template to use for the previous slot\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue `'‹'`\n\t */\n\tpreviousPageLabel: SlotContent<PaginationContext>;\n\t\n\n\t/**\n\t * The template to use for the next slot\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue `'›'`\n\t */\n\tnextPageLabel: SlotContent<PaginationContext>;\n\t\n\n\t/**\n\t * The template to use for the last slot\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue `'»'`\n\t */\n\tlastPageLabel: SlotContent<PaginationContext>;\n\t\n\n\t/**\n\t * The template to use for the pages slot\n\t * To use to customize the pages view\n\t * override any configuration parameters provided for this\n\t */\n\tpagesDisplay: SlotContent<PaginationContext>;\n\t\n\n\t/**\n\t * The template to use for the number slot\n\t * override any configuration parameters provided for this\n\t * for I18n, we suggest to use the global configuration\n\t * @param displayedPage - The current page number\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * ({displayedPage}: PaginationNumberContext) => `${displayedPage}`\n\t * ```\n\t */\n\tnumberLabel: SlotContent<PaginationNumberContext>;\n\t\n\n\t/**\n\t * The pagination display size.\n\t *\n\t * Bootstrap currently supports small and large sizes.\n\t *\n\t * @defaultValue `null`\n\t */\n\tsize: 'sm' | 'lg' | null;\n}\n\n/**\n * Represents the properties for the Pagination component.\n */\nexport interface PaginationProps {\n\t\n\t/**\n\t * The number of items in your paginated collection.\n\t *\n\t * Note, that this is not the number of pages. Page numbers are calculated dynamically based on\n\t * `collectionSize` and `pageSize`.\n\t *\n\t * Ex. if you have 100 items in your collection and displaying 20 items per page, you'll end up with 5 pages.\n\t *\n\t * Whatever the collectionSize the page number is of minimum 1.\n\t *\n\t * @defaultValue `0`\n\t */\n\tcollectionSize: number;\n\t\n\n\t/**\n\t * The number of items per page.\n\t * @remarks min value is 1\n\t *\n\t * @defaultValue `10`\n\t */\n\tpageSize: number;\n\t\n\n\t/**\n\t * An event fired when the page is changed.\n\t *\n\t * Event payload is the number of the newly selected page.\n\t *\n\t * Page numbers start with `1`.\n\t * @defaultValue\n\t * ```ts\n\t * () => {}\n\t * ```\n\t */\n\tonPageChange: (page: number) => void;\n\t\n\n\t/**\n\t * pagesFactory returns a function computing the array of pages to be displayed\n\t * as number (-1 are treated as ellipsis).\n\t * Use Page slot to customize the pages view and not this\n\t * @param page - The current page number\n\t * @param pageCount - The total number of pages\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * (_page: number, pageCount: number) => {\n\t * \t\tconst pages: number[] = [];\n\t * \t\tfor (let i = 1; i <= pageCount; i++) {\n\t * \t\t\tpages.push(i);\n\t * \t\t}\n\t * \t\treturn pages;\n\t * \t}\n\t * ```\n\t */\n\tpagesFactory: (page: number, pageCount: number) => number[];\n\t\n\n\t/**\n\t * Provide the label for each \"Page\" page button.\n\t * This is used for accessibility purposes.\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t * @param processPage - The current page number\n\t * @param pageCount - The total number of pages\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * (processPage: number, pageCount: number) => `Page ${processPage} of ${pageCount}`\n\t * ```\n\t */\n\tariaPageLabel: (processPage: number, pageCount: number) => string;\n\t\n\n\t/**\n\t * Provide the label for the aria-live element\n\t * This is used for accessibility purposes.\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t * @param currentPage - The current page number\n\t * @param pageCount - The total number of pages\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * (currentPage: number) => `Current page is ${currentPage}`\n\t * ```\n\t */\n\tariaLiveLabel: (currentPage: number, pageCount: number) => string;\n\t\n\n\t/**\n\t * Factory function providing the href for a \"Page\" page anchor,\n\t * based on the current page number\n\t * @param pageNumber - The index to use in the link\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * (_page: number) => PAGE_LINK_DEFAULT\n\t * ```\n\t */\n\tpageLink: (pageNumber: number) => string;\n\t\n\t/**\n\t * The current page.\n\t *\n\t * Page numbers start with `1`.\n\t *\n\t * @defaultValue `1`\n\t */\n\tpage: number;\n\t // value of the current/init page to display\n\n\t/**\n\t * The label for the nav element.\n\t *\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue `'Page navigation'`\n\t */\n\tariaLabel: string;\n\t\n\n\t/**\n\t * The label for the \"active\" page.\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * '(current)'\n\t * ```\n\t */\n\tactiveLabel: string;\n\t\n\n\t/**\n\t * The label for the \"First\" page button.\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * 'Action link for first page'\n\t * ```\n\t */\n\tariaFirstLabel: string;\n\t\n\n\t/**\n\t * The label for the \"Previous\" page button.\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * 'Action link for previous page'\n\t * ```\n\t */\n\tariaPreviousLabel: string;\n\t\n\n\t/**\n\t * The label for the \"Next\" page button.\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * 'Action link for next page'\n\t * ```\n\t */\n\tariaNextLabel: string;\n\t\n\n\t/**\n\t * The label for the \"Last\" page button.\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * 'Action link for last page'\n\t * ```\n\t */\n\tariaLastLabel: string;\n\t\n\n\t/**\n\t * The label for the \"Ellipsis\" page.\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue `'Ellipsis page element'`\n\t */\n\tariaEllipsisLabel: string;\n\t\n\n\t/**\n\t * If `true`, pagination links will be disabled.\n\t *\n\t * @defaultValue `false`\n\t */\n\tdisabled: boolean;\n\t\n\n\t/**\n\t * If `true`, the \"Next\" and \"Previous\" page links are shown.\n\t *\n\t * @defaultValue `true`\n\t */\n\tdirectionLinks: boolean;\n\t\n\n\t/**\n\t * If `true`, the \"First\" and \"Last\" page links are shown.\n\t *\n\t * @defaultValue `false`\n\t */\n\tboundaryLinks: boolean;\n\t\n\t/**\n\t * CSS classes to be applied on the widget main container\n\t *\n\t * @defaultValue `''`\n\t */\n\tclassName: string;\n\t\n\t/**\n\t * The template to use for the structure of the pagination component\n\t * The default structure uses {@link PaginationProps.ellipsisLabel|ellipsisLabel}, {@link PaginationProps.firstPageLabel|firstPageLabel},\n\t * {@link PaginationProps.previousPageLabel|previousPageLabel}, {@link PaginationProps.nextPageLabel|nextPageLabel},\n\t * {@link PaginationProps.lastPageLabel|lastPageLabel}, {@link PaginationProps.pagesDisplay|pagesDisplay},\n\t * {@link PaginationProps.numberLabel|numberLabel},\n\t */\n\tstructure: SlotContent<PaginationContext>;\n\t\n\n\t/**\n\t * The template to use for the ellipsis slot\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue `'…'`\n\t */\n\tellipsisLabel: SlotContent<PaginationContext>;\n\t\n\n\t/**\n\t * The template to use for the first slot\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue `'«'`\n\t */\n\tfirstPageLabel: SlotContent<PaginationContext>;\n\t\n\n\t/**\n\t * The template to use for the previous slot\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue `'‹'`\n\t */\n\tpreviousPageLabel: SlotContent<PaginationContext>;\n\t\n\n\t/**\n\t * The template to use for the next slot\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue `'›'`\n\t */\n\tnextPageLabel: SlotContent<PaginationContext>;\n\t\n\n\t/**\n\t * The template to use for the last slot\n\t * for I18n, we suggest to use the global configuration\n\t * override any configuration parameters provided for this\n\t *\n\t * @defaultValue `'»'`\n\t */\n\tlastPageLabel: SlotContent<PaginationContext>;\n\t\n\n\t/**\n\t * The template to use for the pages slot\n\t * To use to customize the pages view\n\t * override any configuration parameters provided for this\n\t */\n\tpagesDisplay: SlotContent<PaginationContext>;\n\t\n\n\t/**\n\t * The template to use for the number slot\n\t * override any configuration parameters provided for this\n\t * for I18n, we suggest to use the global configuration\n\t * @param displayedPage - The current page number\n\t *\n\t * @defaultValue\n\t * ```ts\n\t * ({displayedPage}: PaginationNumberContext) => `${displayedPage}`\n\t * ```\n\t */\n\tnumberLabel: SlotContent<PaginationNumberContext>;\n\t\n\n\t/**\n\t * The pagination display size.\n\t *\n\t * Bootstrap currently supports small and large sizes.\n\t *\n\t * @defaultValue `null`\n\t */\n\tsize: 'sm' | 'lg' | null;\n}\n\n\n\n/**\n * Represents a pagination widget component.\n *\n * This type defines a widget that handles pagination functionality,\n * including properties, state, api and directives specific to pagination.\n */\nexport type PaginationWidget = Widget<PaginationProps, PaginationState, PaginationApi, PaginationDirectives>;\n\n\n\n/**\n * Create a PaginationWidget with given config props\n * @param config - an optional alert config\n * @returns a PaginationWidget\n */\nconst export_createPagination: WidgetFactory<PaginationWidget> = createPagination as any;\nexport {export_createPagination as createPagination};\n\n/**\n * Interface representing the hrefs for pagination navigation links.\n */\nexport interface DirectionsHrefs {\n\t\n\t/**\n\t * The href for the 'Previous' navigation link\n\t */\n\tprevious: string;\n\t\n\t/**\n\t * The href for the 'Next' direction link\n\t */\n\tnext: string;\n}\n\n/**\n * Interface representing pagination API for navigating through pages.\n */\nexport interface PaginationApi {\n\t\n\t/**\n\t * To \"go\" to a specific page\n\t * @param page - The page number to select\n\t */\n\tselect(page: number): void;\n\t\n\t/**\n\t * To \"go\" to the first page\n\t */\n\tfirst(): void;\n\t\n\t/**\n\t * To \"go\" to the previous page\n\t */\n\tprevious(): void;\n\t\n\t/**\n\t * To \"go\" to the next page\n\t */\n\tnext(): void;\n\t\n\t/**\n\t * To \"go\" to the last page\n\t */\n\tlast(): void;\n}\n\n/**\n * Interface representing the directives for pagination components.\n */\nexport interface PaginationDirectives {\n\t\n\t/**\n\t * A directive to be applied to each page link\n\t * This will handle the click, tabindex and aria attributes\n\t */\n\tpageLink: Directive<{\n\t\tpage: number;\n\t}>;\n\t\n\n\t/**\n\t * A directive to be applied on the previous link\n\t */\n\tpagePrev: Directive;\n\t\n\n\t/**\n\t * A directive to be applied on the first link\n\t */\n\tpageFirst: Directive;\n\t\n\n\t/**\n\t * A directive to be applied on the next link\n\t */\n\tpageNext: Directive;\n\t\n\n\t/**\n\t * A directive to be applied on the Last link\n\t */\n\tpageLast: Directive;\n}\n\n","import type {SlotContent} from '@agnos-ui/angular-headless';\nimport {BaseWidgetDirective, ComponentTemplate, SlotDirective, Use