@agnos-ui/angular-bootstrap
Version:
Bootstrap-based component library for Angular.
941 lines (935 loc) • 286 kB
JavaScript
import { widgetsConfigFactory, SlotDirective, UseDirective, ComponentTemplate, BaseWidgetDirective, auBooleanAttribute, UseMultiDirective, auNumberAttribute, useDirectiveForHost, callWidgetFactory as callWidgetFactory$1, ToasterService as ToasterService$1 } from '@agnos-ui/angular-headless';
export * from '@agnos-ui/angular-headless';
import * as i0 from '@angular/core';
import { InjectionToken, inject, TemplateRef, Directive, viewChild, ChangeDetectionStrategy, Component, input, contentChild, output, ViewEncapsulation, forwardRef, Injector, runInInjectionContext, Injectable, computed, effect, NgModule, ApplicationRef, createComponent, outputBinding, inputBinding, EnvironmentInjector } from '@angular/core';
import { getModalDefaultConfig, createModal, modalOutsideClick, modalCloseButtonClick } from '@agnos-ui/core-bootstrap/components/modal';
import { getPaginationDefaultConfig, createPagination } from '@agnos-ui/core-bootstrap/components/pagination';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { getRatingDefaultConfig, createRating } from '@agnos-ui/core-bootstrap/components/rating';
import { getSelectDefaultConfig, createSelect } from '@agnos-ui/core-bootstrap/components/select';
import { getAlertDefaultConfig, createAlert } from '@agnos-ui/core-bootstrap/components/alert';
import { NgTemplateOutlet, NgClass } from '@angular/common';
import { getAccordionDefaultConfig, createAccordionItem, createAccordion, factoryCreateAccordion } from '@agnos-ui/core-bootstrap/components/accordion';
import { getSliderDefaultConfig, createSlider } from '@agnos-ui/core-bootstrap/components/slider';
import { getProgressbarDefaultConfig, createProgressbar } from '@agnos-ui/core-bootstrap/components/progressbar';
import { getToastDefaultConfig, createToast, toastPositions, defaultToasterProps } from '@agnos-ui/core-bootstrap/components/toast';
import { createCollapse, getCollapseDefaultConfig } from '@agnos-ui/core-bootstrap/components/collapse';
import { getTreeDefaultConfig, createTree } from '@agnos-ui/core-bootstrap/components/tree';
import { getCarouselDefaultConfig, createCarousel } from '@agnos-ui/core-bootstrap/components/carousel';
export * from '@agnos-ui/core-bootstrap/services/transitions';
export * from '@agnos-ui/core-bootstrap/types';
/**
* Retrieve a shallow copy of the default modal config
* @returns the default modal config
*/
const export_getModalDefaultConfig = getModalDefaultConfig;
/**
* Creates a new modal widget instance.
* @param config - config of the modal, either as a store or as an object containing values or stores.
* @returns a new modal widget instance
*/
const export_createModal = createModal;
/**
* Value present in the {@link ModalBeforeCloseEvent.result|result} property of the {@link ModalProps.onBeforeClose|onBeforeClose} event
* and returned by the {@link ModalApi.open|open} method, when the modal is closed by a click inside the viewport but outside the modal.
*/
const export_modalOutsideClick = modalOutsideClick;
/**
* Value present in the {@link ModalBeforeCloseEvent.result|result} property of the {@link ModalProps.onBeforeClose|onBeforeClose} event
* and returned by the {@link ModalApi.open|open} method, when the modal is closed by a click on the close button.
*/
const export_modalCloseButtonClick = modalCloseButtonClick;
const widgetFactories = widgetsConfigFactory(new InjectionToken('bootstrapWidgetsConfig'));
/**
* Dependency Injection token which can be used to provide or inject the widgets default configuration store.
*/
const widgetsConfigInjectionToken = widgetFactories.widgetsConfigInjectionToken;
/**
* Creates a provider of widgets default configuration that inherits from any widgets default configuration already defined at an upper level
* in the Angular dependency injection system. It contains its own set of widgets configuration properties that override the same properties form
* the parent configuration.
*
* @remarks
* The configuration is computed from the parent configuration in two steps:
* - first step: the parent configuration is transformed by the adaptParentConfig function (if specified).
* If adaptParentConfig is not specified, this step is skipped.
* - second step: the configuration from step 1 is merged (2-levels deep) with the own$ store. The own$ store initially contains
* an empty object (i.e. no property from the parent is overridden). It can be changed by calling set on the store returned by
* {@link injectWidgetsConfig}.
*
* @param adaptParentConfig - optional function that receives a 2-levels copy of the widgets default configuration
* defined at an upper level in the Angular dependency injection system (or an empty object if there is none) and returns the widgets
* default configuration to be used.
* It is called only if the configuration is needed, and was not yet computed for the current value of the parent configuration.
* It is called in a tansu reactive context, so it can use any tansu store and will be called again if those stores change.
* It is also called in an Angular injection context, so it can call the Angular inject function to get and use dependencies from the
* Angular dependency injection system.
*
* @returns DI provider to be included a list of `providers` (for example at a component level or
* any other level of the Angular dependency injection system)
*
* @example
* ```typescript
* @Component({
* // ...
* providers: [
* provideWidgetsConfig((parentConfig) => {
* // first step configuration: transforms the parent configuration
* parentConfig.rating = parentConfig.rating ?? {};
* parentConfig.rating.className = `${parentConfig.rating.className ?? ''} my-rating-extra-class`
* return parentConfig;
* })
* ]
* })
* class MyComponent {
* widgetsConfig = injectWidgetsConfig();
* constructor() {
* this.widgetsConfig.set({
* // second step configuration: overrides the parent configuration
* rating: {
* slotStar: MyCustomSlotStar
* }
* });
* }
* // ...
* }
* ```
*/
const provideWidgetsConfig = widgetFactories.provideWidgetsConfig;
/**
* Returns the widgets default configuration store that was provided in the current injection context.
* Throws if the no widgets default configuration store was provided.
*
* @param defaultConfig - values to set as soon as the config is injected
* @remarks
* This function must be called from an injection context, such as a constructor, a factory function, a field initializer or
* a function used with {@link https://angular.io/api/core/runInInjectionContext | runInInjectionContext}.
*
* @returns the widgets default configuration store.
*/
const injectWidgetsConfig = widgetFactories.injectWidgetsConfig;
/**
* Injects the configuration for a specific widget.
*
* @template N - The key of the widget configuration in the `Config` type.
* @param widgetName - The name of the widget whose configuration is to be injected.
* @returns A `ReadableSignal` that provides a partial configuration of the specified widget or `undefined` if the configuration is not available.
*/
const injectWidgetConfig = widgetFactories.injectWidgetConfig;
/**
* Creates and initializes a widget using the provided factory and configuration options.
*
* The resulting widget can be easily hooked into the lifecycle of an Angular component through {@link BaseWidgetDirective}.
*
* @template W - The type of the widget.
* @param factory - The factory function to create the widget.
* @param options - The options for creating the widget.
* @param options.defaultConfig - The default configuration for the widget.
* @param options.events - The event handlers for the widget.
* @param options.slotTemplates - A function that returns the slot templates for the widget.
* @param options.slotChildren - A function that returns the slot children for the widget.
* @param options.afterInit - A callback function to be called after the widget is initialized.
* @returns The initialized widget.
*/
const callWidgetFactory = widgetFactories.callWidgetFactory;
const _c0$b = ["header"];
const _c1$b = ["structure"];
const _c2$a = (a0, a1, a2) => ({ state: a0, api: a1, directives: a2 });
function ModalDefaultSlotsComponent_ng_template_0_ng_template_1_Template(rf, ctx) { }
function ModalDefaultSlotsComponent_ng_template_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "button", 6);
} if (rf & 2) {
const directives_r1 = i0.ɵɵnextContext().directives;
i0.ɵɵproperty("auUse", directives_r1.closeButtonDirective);
} }
function ModalDefaultSlotsComponent_ng_template_0_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "h5", 4);
i0.ɵɵtemplate(1, ModalDefaultSlotsComponent_ng_template_0_ng_template_1_Template, 0, 0, "ng-template", 5);
i0.ɵɵelementEnd();
i0.ɵɵconditionalCreate(2, ModalDefaultSlotsComponent_ng_template_0_Conditional_2_Template, 1, 1, "button", 6);
} if (rf & 2) {
const state_r2 = ctx.state;
const api_r3 = ctx.api;
const directives_r1 = ctx.directives;
i0.ɵɵadvance();
i0.ɵɵproperty("auSlot", state_r2.title())("auSlotProps", i0.ɵɵpureFunction3(3, _c2$a, state_r2, api_r3, directives_r1));
i0.ɵɵadvance();
i0.ɵɵconditional(state_r2.closeButton() ? 2 : -1);
} }
function ModalDefaultSlotsComponent_ng_template_2_Conditional_0_ng_template_1_Template(rf, ctx) { }
function ModalDefaultSlotsComponent_ng_template_2_Conditional_0_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "div", 7);
i0.ɵɵtemplate(1, ModalDefaultSlotsComponent_ng_template_2_Conditional_0_ng_template_1_Template, 0, 0, "ng-template", 5);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r3 = i0.ɵɵnextContext();
const state_r5 = ctx_r3.state;
const api_r6 = ctx_r3.api;
const directives_r7 = ctx_r3.directives;
i0.ɵɵadvance();
i0.ɵɵproperty("auSlot", state_r5.header())("auSlotProps", i0.ɵɵpureFunction3(2, _c2$a, state_r5, api_r6, directives_r7));
} }
function ModalDefaultSlotsComponent_ng_template_2_ng_template_2_Template(rf, ctx) { }
function ModalDefaultSlotsComponent_ng_template_2_Conditional_3_ng_template_1_Template(rf, ctx) { }
function ModalDefaultSlotsComponent_ng_template_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "div", 9);
i0.ɵɵtemplate(1, ModalDefaultSlotsComponent_ng_template_2_Conditional_3_ng_template_1_Template, 0, 0, "ng-template", 5);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r3 = i0.ɵɵnextContext();
const state_r5 = ctx_r3.state;
const api_r6 = ctx_r3.api;
const directives_r7 = ctx_r3.directives;
i0.ɵɵadvance();
i0.ɵɵproperty("auSlot", state_r5.footer())("auSlotProps", i0.ɵɵpureFunction3(2, _c2$a, state_r5, api_r6, directives_r7));
} }
function ModalDefaultSlotsComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵconditionalCreate(0, ModalDefaultSlotsComponent_ng_template_2_Conditional_0_Template, 2, 6, "div", 7);
i0.ɵɵelementStart(1, "div", 8);
i0.ɵɵtemplate(2, ModalDefaultSlotsComponent_ng_template_2_ng_template_2_Template, 0, 0, "ng-template", 5);
i0.ɵɵelementEnd();
i0.ɵɵconditionalCreate(3, ModalDefaultSlotsComponent_ng_template_2_Conditional_3_Template, 2, 6, "div", 9);
} if (rf & 2) {
const state_r5 = ctx.state;
const api_r6 = ctx.api;
const directives_r7 = ctx.directives;
i0.ɵɵconditional(state_r5.title() ? 0 : -1);
i0.ɵɵadvance(2);
i0.ɵɵproperty("auSlot", state_r5.children())("auSlotProps", i0.ɵɵpureFunction3(4, _c2$a, state_r5, api_r6, directives_r7));
i0.ɵɵadvance();
i0.ɵɵconditional(state_r5.footer() ? 3 : -1);
} }
const _c3$9 = ["content"];
const _c4$8 = ["auModal", ""];
const _c5$6 = ["*"];
const _c6$3 = (a0, a1) => [a0, a1];
function ModalComponent_ng_template_0_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵprojection(0);
} }
function ModalComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "div", 1);
} if (rf & 2) {
const ctx_r0 = i0.ɵɵnextContext();
i0.ɵɵproperty("auUseMulti", i0.ɵɵpureFunction2(1, _c6$3, ctx_r0.directives.backdropPortalDirective, ctx_r0.directives.backdropDirective));
} }
function ModalComponent_Conditional_3_ng_template_3_Template(rf, ctx) { }
function ModalComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "div", 2)(1, "div")(2, "div", 3);
i0.ɵɵtemplate(3, ModalComponent_Conditional_3_ng_template_3_Template, 0, 0, "ng-template", 4);
i0.ɵɵelementEnd()()();
} if (rf & 2) {
const ctx_r0 = i0.ɵɵnextContext();
i0.ɵɵproperty("auUseMulti", i0.ɵɵpureFunction2(6, _c6$3, ctx_r0.directives.modalPortalDirective, ctx_r0.directives.modalDirective));
i0.ɵɵadvance();
i0.ɵɵclassMap(i0.ɵɵinterpolate1("modal-dialog ", ctx_r0.state.fullscreen() ? "modal-fullscreen" : ""));
i0.ɵɵadvance(2);
i0.ɵɵproperty("auSlot", ctx_r0.state.structure())("auSlotProps", i0.ɵɵpureFunction3(9, _c2$a, ctx_r0.state, ctx_r0.api, ctx_r0.directives));
} }
/**
* Directive to provide the slot structure for the modal widget.
* This directive provides a template reference for the {@link ModalContext<Data>}.
*/
class ModalStructureDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function ModalStructureDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ModalStructureDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ModalStructureDirective, selectors: [["ng-template", "auModalStructure", ""]] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalStructureDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auModalStructure]' }]
}], null, null); })();
/**
* Directive to provide the slot header for the modal widget.
* This directive provides a template reference for the {@link ModalContext<Data>}.
*/
class ModalHeaderDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function ModalHeaderDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ModalHeaderDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ModalHeaderDirective, selectors: [["ng-template", "auModalHeader", ""]] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalHeaderDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auModalHeader]' }]
}], null, null); })();
/**
* Directive to provide the slot title for the modal widget.
* This directive provides a template reference for the {@link ModalContext<Data>}.
*/
class ModalTitleDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function ModalTitleDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ModalTitleDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ModalTitleDirective, selectors: [["ng-template", "auModalTitle", ""]] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalTitleDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auModalTitle]' }]
}], null, null); })();
/**
* Directive to provide the default slot for the modal widget.
* This directive provides a template reference for the {@link ModalContext<Data>}.
*/
class ModalBodyDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function ModalBodyDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ModalBodyDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ModalBodyDirective, selectors: [["ng-template", "auModalBody", ""]] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalBodyDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auModalBody]' }]
}], null, null); })();
/**
* Directive to provide the slot footer for the modal widget.
* This directive provides a template reference for the {@link ModalContext<Data>}.
*/
class ModalFooterDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function ModalFooterDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ModalFooterDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ModalFooterDirective, selectors: [["ng-template", "auModalFooter", ""]] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalFooterDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auModalFooter]' }]
}], null, null); })();
/**
* Component containing the default slots for the modal.
*/
class ModalDefaultSlotsComponent {
constructor() {
this.header = viewChild.required('header');
this.structure = viewChild.required('structure');
}
static { this.ɵfac = function ModalDefaultSlotsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ModalDefaultSlotsComponent)(); }; }
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ModalDefaultSlotsComponent, selectors: [["ng-component"]], viewQuery: function ModalDefaultSlotsComponent_Query(rf, ctx) { if (rf & 1) {
i0.ɵɵviewQuerySignal(ctx.header, _c0$b, 5);
i0.ɵɵviewQuerySignal(ctx.structure, _c1$b, 5);
} if (rf & 2) {
i0.ɵɵqueryAdvance(2);
} }, decls: 4, vars: 0, consts: [["header", ""], ["structure", ""], ["auModalHeader", ""], ["auModalStructure", ""], [1, "modal-title"], [3, "auSlot", "auSlotProps"], [1, "btn-close", 3, "auUse"], [1, "modal-header"], [1, "modal-body"], [1, "modal-footer"]], template: function ModalDefaultSlotsComponent_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, ModalDefaultSlotsComponent_ng_template_0_Template, 3, 7, "ng-template", 2, 0, i0.ɵɵtemplateRefExtractor)(2, ModalDefaultSlotsComponent_ng_template_2_Template, 4, 8, "ng-template", 3, 1, i0.ɵɵtemplateRefExtractor);
} }, dependencies: [SlotDirective, ModalHeaderDirective, ModalStructureDirective, UseDirective], encapsulation: 2, changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalDefaultSlotsComponent, [{
type: Component,
args: [{
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [SlotDirective, ModalHeaderDirective, ModalStructureDirective, UseDirective],
template: `
<ng-template auModalHeader #header let-state="state" let-api="api" let-directives="directives">
<h5 class="modal-title">
<ng-template [auSlot]="state.title()" [auSlotProps]="{state, api, directives}" />
</h5>
@if (state.closeButton()) {
<button class="btn-close" [auUse]="directives.closeButtonDirective"></button>
}
</ng-template>
<ng-template auModalStructure #structure let-state="state" let-api="api" let-directives="directives">
@if (state.title()) {
<div class="modal-header">
<ng-template [auSlot]="state.header()" [auSlotProps]="{state, api, directives}" />
</div>
}
<div class="modal-body">
<ng-template [auSlot]="state.children()" [auSlotProps]="{state, api, directives}" />
</div>
@if (state.footer()) {
<div class="modal-footer">
<ng-template [auSlot]="state.footer()" [auSlotProps]="{state, api, directives}" />
</div>
}
</ng-template>
`,
}]
}], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ModalDefaultSlotsComponent, { className: "ModalDefaultSlotsComponent", filePath: "components/modal/modal.component.ts", lineNumber: 100 }); })();
/**
* Default slot for modal header.
*/
const modalDefaultSlotHeader = new ComponentTemplate(ModalDefaultSlotsComponent, 'header');
/**
* Default slot for modal structure.
*/
const modalDefaultSlotStructure = new ComponentTemplate(ModalDefaultSlotsComponent, 'structure');
/**
* Modal component.
*/
class ModalComponent extends BaseWidgetDirective {
constructor() {
super(callWidgetFactory(export_createModal, {
defaultConfig: {
header: modalDefaultSlotHeader,
structure: modalDefaultSlotStructure,
},
events: {
onShown: () => this.shown.emit(),
onHidden: () => this.hidden.emit(),
onBeforeClose: (event) => this.beforeClose.emit(event),
onVisibleChange: (event) => this.visibleChange.emit(event),
},
slotTemplates: () => ({
children: this.slotDefaultFromContent()?.templateRef,
footer: this.slotFooterFromContent()?.templateRef,
header: this.slotHeaderFromContent()?.templateRef,
structure: this.slotStructureFromContent()?.templateRef,
title: this.slotTitleFromContent()?.templateRef,
}),
slotChildren: () => this.slotChildren(),
}));
/**
* Whether the modal and its backdrop (if present) should be animated when shown or hidden.
*
* @defaultValue `true`
*/
this.animated = input(undefined, { alias: 'auAnimated', transform: auBooleanAttribute });
/**
* The transition to use for the backdrop behind the modal (if present).
*
* @defaultValue `fadeTransition`
*/
this.backdropTransition = input(undefined, { alias: 'auBackdropTransition' });
/**
* The transition to use for the modal.
*
* @defaultValue `fadeTransition`
*/
this.modalTransition = input(undefined, { alias: 'auModalTransition' });
/**
* Whether the modal should be visible when the transition is completed.
*
* @defaultValue `false`
*/
this.visible = input(undefined, { alias: 'auVisible', transform: auBooleanAttribute });
/**
* Whether a backdrop should be created behind the modal.
*
* @defaultValue `true`
*/
this.backdrop = input(undefined, { alias: 'auBackdrop', transform: auBooleanAttribute });
/**
* Whether the modal should be closed when clicking on the viewport outside the modal.
*
* @defaultValue `true`
*/
this.closeOnOutsideClick = input(undefined, { alias: 'auCloseOnOutsideClick', transform: auBooleanAttribute });
/**
* Which element should contain the modal and backdrop DOM elements.
* If it is not null, the modal and backdrop DOM elements are moved to the specified container.
* Otherwise, they stay where the widget is located.
*
* @defaultValue
* ```ts
* typeof window !== 'undefined' ? document.body : null
* ```
*/
this.container = input(undefined, { alias: 'auContainer' });
/**
* Value of the aria-label attribute to put on the close button.
*
* @defaultValue `'Close'`
*/
this.ariaCloseButtonLabel = input(undefined, { alias: 'auAriaCloseButtonLabel' });
/**
* Classes to add on the backdrop DOM element.
*
* @defaultValue `''`
*/
this.backdropClass = input(undefined, { alias: 'auBackdropClass' });
/**
* Whether to display the close button.
*
* @defaultValue `true`
*/
this.closeButton = input(undefined, { alias: 'auCloseButton', transform: auBooleanAttribute });
/**
* CSS classes to be applied on the widget main container
*
* @defaultValue `''`
*/
this.className = input(undefined, { alias: 'auClassName' });
/**
* Option to create a fullscreen modal, according to the bootstrap documentation.
*
* @defaultValue `false`
*/
this.fullscreen = input(undefined, { alias: 'auFullscreen', transform: auBooleanAttribute });
/**
* Structure of the modal.
* The default structure uses {@link ModalProps.header|header}, {@link ModalProps.children|children} and {@link ModalProps.footer|footer}.
*/
this.structure = input(undefined, { alias: 'auStructure' });
this.slotStructureFromContent = contentChild(ModalStructureDirective);
/**
* Header of the modal. The default header includes {@link ModalProps.title|title}.
*/
this.header = input(undefined, { alias: 'auHeader' });
this.slotHeaderFromContent = contentChild(ModalHeaderDirective);
/**
* Title of the modal.
*/
this.title = input(undefined, { alias: 'auTitle' });
this.slotTitleFromContent = contentChild(ModalTitleDirective);
/**
* Body of the modal.
*/
this.children = input(undefined, { alias: 'auChildren' });
this.slotDefaultFromContent = contentChild(ModalBodyDirective);
/**
* Footer of the modal.
*/
this.footer = input(undefined, { alias: 'auFooter' });
this.slotFooterFromContent = contentChild(ModalFooterDirective);
/**
* Data to use in content slots
*/
this.contentData = input(undefined, { alias: 'auContentData' });
/**
* Event to be triggered when the visible property changes.
*
* @param visible - new value of the visible propery
*
* @defaultValue
* ```ts
* () => {}
* ```
*/
this.visibleChange = output({ alias: 'auVisibleChange' });
/**
* Event to be triggered when the modal is about to be closed (i.e. the {@link ModalApi.close|close} method was called).
*
* @param event - event giving access to the argument given to the {@link ModalApi.close|close} method and allowing
* to cancel the close process.
*
* @defaultValue
* ```ts
* () => {}
* ```
*/
this.beforeClose = output({ alias: 'auBeforeClose' });
/**
* Event to be triggered when the transition is completed and the modal is not visible.
*
* @defaultValue
* ```ts
* () => {}
* ```
*/
this.hidden = output({ alias: 'auHidden' });
/**
* Event to be triggered when the transition is completed and the modal is visible.
*
* @defaultValue
* ```ts
* () => {}
* ```
*/
this.shown = output({ alias: 'auShown' });
this.slotChildren = viewChild('content');
}
static { this.ɵfac = function ModalComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ModalComponent)(); }; }
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ModalComponent, selectors: [["", "auModal", ""]], contentQueries: function ModalComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
i0.ɵɵcontentQuerySignal(dirIndex, ctx.slotStructureFromContent, ModalStructureDirective, 5);
i0.ɵɵcontentQuerySignal(dirIndex, ctx.slotHeaderFromContent, ModalHeaderDirective, 5);
i0.ɵɵcontentQuerySignal(dirIndex, ctx.slotTitleFromContent, ModalTitleDirective, 5);
i0.ɵɵcontentQuerySignal(dirIndex, ctx.slotDefaultFromContent, ModalBodyDirective, 5);
i0.ɵɵcontentQuerySignal(dirIndex, ctx.slotFooterFromContent, ModalFooterDirective, 5);
} if (rf & 2) {
i0.ɵɵqueryAdvance(5);
} }, viewQuery: function ModalComponent_Query(rf, ctx) { if (rf & 1) {
i0.ɵɵviewQuerySignal(ctx.slotChildren, _c3$9, 5);
} if (rf & 2) {
i0.ɵɵqueryAdvance();
} }, inputs: { animated: [1, "auAnimated", "animated"], backdropTransition: [1, "auBackdropTransition", "backdropTransition"], modalTransition: [1, "auModalTransition", "modalTransition"], visible: [1, "auVisible", "visible"], backdrop: [1, "auBackdrop", "backdrop"], closeOnOutsideClick: [1, "auCloseOnOutsideClick", "closeOnOutsideClick"], container: [1, "auContainer", "container"], ariaCloseButtonLabel: [1, "auAriaCloseButtonLabel", "ariaCloseButtonLabel"], backdropClass: [1, "auBackdropClass", "backdropClass"], closeButton: [1, "auCloseButton", "closeButton"], className: [1, "auClassName", "className"], fullscreen: [1, "auFullscreen", "fullscreen"], structure: [1, "auStructure", "structure"], header: [1, "auHeader", "header"], title: [1, "auTitle", "title"], children: [1, "auChildren", "children"], footer: [1, "auFooter", "footer"], contentData: [1, "auContentData", "contentData"] }, outputs: { visibleChange: "auVisibleChange", beforeClose: "auBeforeClose", hidden: "auHidden", shown: "auShown" }, features: [i0.ɵɵInheritDefinitionFeature], attrs: _c4$8, ngContentSelectors: _c5$6, decls: 4, vars: 2, consts: [["content", ""], [1, "modal-backdrop", 3, "auUseMulti"], [1, "modal", "d-block", 3, "auUseMulti"], [1, "modal-content"], [3, "auSlot", "auSlotProps"]], template: function ModalComponent_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵprojectionDef();
i0.ɵɵtemplate(0, ModalComponent_ng_template_0_Template, 1, 0, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
i0.ɵɵconditionalCreate(2, ModalComponent_Conditional_2_Template, 1, 4, "div", 1);
i0.ɵɵconditionalCreate(3, ModalComponent_Conditional_3_Template, 4, 13, "div", 2);
} if (rf & 2) {
i0.ɵɵadvance(2);
i0.ɵɵconditional(!ctx.state.backdropHidden() ? 2 : -1);
i0.ɵɵadvance();
i0.ɵɵconditional(!ctx.state.hidden() ? 3 : -1);
} }, dependencies: [UseMultiDirective, SlotDirective], encapsulation: 2, changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalComponent, [{
type: Component,
args: [{
selector: '[auModal]',
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [UseMultiDirective, SlotDirective],
template: `
<ng-template #content><ng-content /></ng-template>
@if (!state.backdropHidden()) {
<div class="modal-backdrop" [auUseMulti]="[directives.backdropPortalDirective, directives.backdropDirective]"></div>
}
@if (!state.hidden()) {
<div class="modal d-block" [auUseMulti]="[directives.modalPortalDirective, directives.modalDirective]">
<div class="modal-dialog {{ state.fullscreen() ? 'modal-fullscreen' : '' }}">
<div class="modal-content">
<ng-template [auSlot]="state.structure()" [auSlotProps]="{state, api, directives}" />
</div>
</div>
</div>
}
`,
}]
}], () => [], null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ModalComponent, { className: "ModalComponent", filePath: "components/modal/modal.component.ts", lineNumber: 138 }); })();
/**
* Retrieve a shallow copy of the default Pagination config
* @returns the default Pagination config
*/
const export_getPaginationDefaultConfig = getPaginationDefaultConfig;
/**
* Create a PaginationWidget with given config props
* @param config - an optional alert config
* @returns a PaginationWidget
*/
const export_createPagination = createPagination;
const _c0$a = ["pages"];
const _c1$a = ["structure"];
const _c2$9 = (a0, a1, a2) => ({ state: a0, api: a1, directives: a2 });
const _c3$8 = a0 => ({ page: a0 });
const _c4$7 = (a0, a1) => [a0, a1];
const _c5$5 = (a0, a1, a2, a3) => ({ state: a0, api: a1, directives: a2, displayedPage: a3 });
function PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_1_ng_template_1_Template(rf, ctx) { }
function PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "div", 7);
i0.ɵɵtemplate(1, PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_1_ng_template_1_Template, 0, 0, "ng-template", 8);
i0.ɵɵelementEnd();
i0.ɵɵelementStart(2, "span", 9);
i0.ɵɵtext(3);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r0 = i0.ɵɵnextContext(2);
const state_r2 = ctx_r0.state;
const api_r3 = ctx_r0.api;
const directives_r4 = ctx_r0.directives;
i0.ɵɵadvance();
i0.ɵɵproperty("auSlot", state_r2.ellipsisLabel())("auSlotProps", i0.ɵɵpureFunction3(3, _c2$9, state_r2, api_r3, directives_r4));
i0.ɵɵadvance(2);
i0.ɵɵtextInterpolate(state_r2.ariaEllipsisLabel());
} }
function PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_2_ng_template_1_Template(rf, ctx) { }
function PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "span", 9);
i0.ɵɵtext(1);
i0.ɵɵelementEnd();
} if (rf & 2) {
const state_r2 = i0.ɵɵnextContext(3).state;
i0.ɵɵadvance();
i0.ɵɵtextInterpolate(state_r2.activeLabel());
} }
function PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "a", 6);
i0.ɵɵtemplate(1, PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_2_ng_template_1_Template, 0, 0, "ng-template", 8);
i0.ɵɵconditionalCreate(2, PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_2_Conditional_2_Template, 2, 1, "span", 9);
i0.ɵɵelementEnd();
} if (rf & 2) {
const page_r5 = i0.ɵɵnextContext().$implicit;
const ctx_r0 = i0.ɵɵnextContext();
const state_r2 = ctx_r0.state;
const api_r3 = ctx_r0.api;
const directives_r4 = ctx_r0.directives;
i0.ɵɵproperty("auUse", i0.ɵɵpureFunction2(6, _c4$7, directives_r4.pageLink, i0.ɵɵpureFunction1(4, _c3$8, page_r5)));
i0.ɵɵadvance();
i0.ɵɵproperty("auSlot", state_r2.numberLabel())("auSlotProps", i0.ɵɵpureFunction4(9, _c5$5, state_r2, api_r3, directives_r4, page_r5));
i0.ɵɵadvance();
i0.ɵɵconditional(state_r2.page() === page_r5 ? 2 : -1);
} }
function PaginationDefaultSlotsComponent_ng_template_0_For_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "li", 5);
i0.ɵɵconditionalCreate(1, PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_1_Template, 4, 7)(2, PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_2_Template, 3, 14, "a", 6);
i0.ɵɵelementEnd();
} if (rf & 2) {
const page_r5 = ctx.$implicit;
const state_r2 = i0.ɵɵnextContext().state;
i0.ɵɵclassProp("active", page_r5 === state_r2.page())("disabled", page_r5 === -1 || state_r2.disabled());
i0.ɵɵadvance();
i0.ɵɵconditional(page_r5 === -1 ? 1 : 2);
} }
function PaginationDefaultSlotsComponent_ng_template_0_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵrepeaterCreate(0, PaginationDefaultSlotsComponent_ng_template_0_For_1_Template, 3, 5, "li", 4, i0.ɵɵrepeaterTrackByIdentity);
} if (rf & 2) {
const state_r2 = ctx.state;
i0.ɵɵrepeater(state_r2.pages());
} }
function PaginationDefaultSlotsComponent_ng_template_2_Conditional_1_ng_template_3_Template(rf, ctx) { }
function PaginationDefaultSlotsComponent_ng_template_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "li", 5)(1, "a", 6)(2, "span", 12);
i0.ɵɵtemplate(3, PaginationDefaultSlotsComponent_ng_template_2_Conditional_1_ng_template_3_Template, 0, 0, "ng-template", 8);
i0.ɵɵelementEnd()()();
} if (rf & 2) {
const ctx_r5 = i0.ɵɵnextContext();
const state_r7 = ctx_r5.state;
const api_r8 = ctx_r5.api;
const directives_r9 = ctx_r5.directives;
i0.ɵɵclassProp("disabled", state_r7.previousDisabled());
i0.ɵɵadvance();
i0.ɵɵproperty("auUse", directives_r9.pageFirst);
i0.ɵɵadvance(2);
i0.ɵɵproperty("auSlot", state_r7.firstPageLabel())("auSlotProps", i0.ɵɵpureFunction3(5, _c2$9, state_r7, api_r8, directives_r9));
} }
function PaginationDefaultSlotsComponent_ng_template_2_Conditional_2_ng_template_3_Template(rf, ctx) { }
function PaginationDefaultSlotsComponent_ng_template_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "li", 5)(1, "a", 6)(2, "span", 12);
i0.ɵɵtemplate(3, PaginationDefaultSlotsComponent_ng_template_2_Conditional_2_ng_template_3_Template, 0, 0, "ng-template", 8);
i0.ɵɵelementEnd()()();
} if (rf & 2) {
const ctx_r5 = i0.ɵɵnextContext();
const state_r7 = ctx_r5.state;
const api_r8 = ctx_r5.api;
const directives_r9 = ctx_r5.directives;
i0.ɵɵclassProp("disabled", state_r7.previousDisabled());
i0.ɵɵadvance();
i0.ɵɵproperty("auUse", directives_r9.pagePrev);
i0.ɵɵadvance(2);
i0.ɵɵproperty("auSlot", state_r7.previousPageLabel())("auSlotProps", i0.ɵɵpureFunction3(5, _c2$9, state_r7, api_r8, directives_r9));
} }
function PaginationDefaultSlotsComponent_ng_template_2_ng_template_3_Template(rf, ctx) { }
function PaginationDefaultSlotsComponent_ng_template_2_Conditional_4_ng_template_3_Template(rf, ctx) { }
function PaginationDefaultSlotsComponent_ng_template_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "li", 5)(1, "a", 6)(2, "span", 12);
i0.ɵɵtemplate(3, PaginationDefaultSlotsComponent_ng_template_2_Conditional_4_ng_template_3_Template, 0, 0, "ng-template", 8);
i0.ɵɵelementEnd()()();
} if (rf & 2) {
const ctx_r5 = i0.ɵɵnextContext();
const state_r7 = ctx_r5.state;
const api_r8 = ctx_r5.api;
const directives_r9 = ctx_r5.directives;
i0.ɵɵclassProp("disabled", state_r7.nextDisabled());
i0.ɵɵadvance();
i0.ɵɵproperty("auUse", directives_r9.pageNext);
i0.ɵɵadvance(2);
i0.ɵɵproperty("auSlot", state_r7.nextPageLabel())("auSlotProps", i0.ɵɵpureFunction3(5, _c2$9, state_r7, api_r8, directives_r9));
} }
function PaginationDefaultSlotsComponent_ng_template_2_Conditional_5_ng_template_3_Template(rf, ctx) { }
function PaginationDefaultSlotsComponent_ng_template_2_Conditional_5_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "li", 5)(1, "a", 6)(2, "span", 12);
i0.ɵɵtemplate(3, PaginationDefaultSlotsComponent_ng_template_2_Conditional_5_ng_template_3_Template, 0, 0, "ng-template", 8);
i0.ɵɵelementEnd()()();
} if (rf & 2) {
const ctx_r5 = i0.ɵɵnextContext();
const state_r7 = ctx_r5.state;
const api_r8 = ctx_r5.api;
const directives_r9 = ctx_r5.directives;
i0.ɵɵclassProp("disabled", state_r7.nextDisabled());
i0.ɵɵadvance();
i0.ɵɵproperty("auUse", directives_r9.pageLast);
i0.ɵɵadvance(2);
i0.ɵɵproperty("auSlot", state_r7.lastPageLabel())("auSlotProps", i0.ɵɵpureFunction3(5, _c2$9, state_r7, api_r8, directives_r9));
} }
function PaginationDefaultSlotsComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "ul");
i0.ɵɵconditionalCreate(1, PaginationDefaultSlotsComponent_ng_template_2_Conditional_1_Template, 4, 9, "li", 10);
i0.ɵɵconditionalCreate(2, PaginationDefaultSlotsComponent_ng_template_2_Conditional_2_Template, 4, 9, "li", 10);
i0.ɵɵtemplate(3, PaginationDefaultSlotsComponent_ng_template_2_ng_template_3_Template, 0, 0, "ng-template", 8);
i0.ɵɵconditionalCreate(4, PaginationDefaultSlotsComponent_ng_template_2_Conditional_4_Template, 4, 9, "li", 10);
i0.ɵɵconditionalCreate(5, PaginationDefaultSlotsComponent_ng_template_2_Conditional_5_Template, 4, 9, "li", 10);
i0.ɵɵelementEnd();
i0.ɵɵelementStart(6, "div", 11);
i0.ɵɵtext(7);
i0.ɵɵelementEnd();
} if (rf & 2) {
const state_r7 = ctx.state;
const api_r8 = ctx.api;
const directives_r9 = ctx.directives;
i0.ɵɵclassMap("au-pagination pagination" + (state_r7.size() ? " pagination-" + state_r7.size() : "") + " " + state_r7.className());
i0.ɵɵadvance();
i0.ɵɵconditional(state_r7.boundaryLinks() ? 1 : -1);
i0.ɵɵadvance();
i0.ɵɵconditional(state_r7.directionLinks() ? 2 : -1);
i0.ɵɵadvance();
i0.ɵɵproperty("auSlot", state_r7.pagesDisplay())("auSlotProps", i0.ɵɵpureFunction3(9, _c2$9, state_r7, api_r8, directives_r9));
i0.ɵɵadvance();
i0.ɵɵconditional(state_r7.directionLinks() ? 4 : -1);
i0.ɵɵadvance();
i0.ɵɵconditional(state_r7.boundaryLinks() ? 5 : -1);
i0.ɵɵadvance(2);
i0.ɵɵtextInterpolate(state_r7.ariaLiveLabelText());
} }
const _c6$2 = ["auPagination", ""];
function PaginationComponent_ng_template_0_Template(rf, ctx) { }
/**
* A directive to use to give the 'ellipsis' link template to the pagination component
* This directive provides a template reference for the {@link PaginationContext}.
*/
class PaginationEllipsisDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function PaginationEllipsisDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaginationEllipsisDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PaginationEllipsisDirective, selectors: [["ng-template", "auPaginationEllipsis", ""]] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationEllipsisDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auPaginationEllipsis]' }]
}], null, null); })();
/**
* A directive to use to give the 'first' link template to the pagination component
* This directive provides a template reference for the {@link PaginationContext}.
*/
class PaginationFirstDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function PaginationFirstDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaginationFirstDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PaginationFirstDirective, selectors: [["ng-template", "auPaginationFirst", ""]] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationFirstDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auPaginationFirst]' }]
}], null, null); })();
/**
* A directive to use to give the 'last' link template to the pagination component
* This directive provides a template reference for the {@link PaginationContext}.
*/
class PaginationLastDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function PaginationLastDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaginationLastDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PaginationLastDirective, selectors: [["ng-template", "auPaginationLast", ""]] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationLastDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auPaginationLast]' }]
}], null, null); })();
/**
* A directive to use to give the 'next' link template to the pagination component
* This directive provides a template reference for the {@link PaginationContext}.
*/
class PaginationNextDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function PaginationNextDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaginationNextDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PaginationNextDirective, selectors: [["ng-template", "auPaginationNext", ""]] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationNextDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auPaginationNext]' }]
}], null, null); })();
/**
* A directive to use to give the page 'number' template to the pagination component
* This directive provides a template reference for the {@link PaginationNumberContext}.
*/
class PaginationNumberDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function PaginationNumberDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaginationNumberDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PaginationNumberDirective, selectors: [["ng-template", "auPaginationNumber", ""]] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationNumberDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auPaginationNumber]' }]
}], null, null); })();
/**
* A directive to use to give the 'previous' link template to the pagination component
* This directive provides a template reference for the {@link PaginationContext}.
*/
class PaginationPreviousDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function PaginationPreviousDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaginationPreviousDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PaginationPreviousDirective, selectors: [["ng-template", "auPaginationPrevious", ""]] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationPreviousDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auPaginationPrevious]' }]
}], null, null); })();
/**
* A directive to use to give the 'Pages' template for the Pages slot
* This directive provides a template reference for the {@link PaginationContext}.
*/
class PaginationPagesDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function PaginationPagesDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaginationPagesDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PaginationPagesDirective, selectors: [["ng-template", "auPaginationPages", ""]] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationPagesDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auPaginationPages]' }]
}], null, null); })();
/**
* Directive to provide the slot structure for the pagination widget.
* This directive provides a template reference for the {@link PaginationContext}.
*/
class PaginationStructureDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function PaginationStructureDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaginationStructureDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PaginationStructureDirective, selectors: [["ng-template", "auPaginationStructure", ""]] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationStructureDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auPaginationStructure]' }]
}], null, null); })();
class PaginationDefaultSlotsComponent {
constructor() {
this.pages = viewChild.required('pages');
this.structure = viewChild.required('structure');
}
static { this.ɵfac = function PaginationDefaultSlotsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaginationDefaultSlotsComponent)(); }; }
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PaginationDefaultSlotsComponent, selectors: [["ng-component"]], viewQuery: function PaginationDefaultSlotsComponent_Query(rf, ctx) { if (rf & 1) {
i0.ɵɵviewQuerySignal(ctx.pages, _c0$a, 5);
i0.ɵɵviewQuerySignal(ctx.structure, _c1$a, 5);
} if (rf & 2) {
i0.ɵɵqueryAdvance(2);
} }, decls: 4, vars: 0, consts: [["pages", ""], ["structure", ""], ["auPaginationPages", ""], ["auPaginationStructure", ""], [1, "page-item", 3, "active", "disabled"], [1, "page-item"], [1, "page-link", 3, "auUse"], ["aria-hidden", "true", 1, "page-link", "au-ellipsis"], [3, "auSlot", "auSlotProps"], [1, "visually-hidden"], [1, "page-item", 3, "disabled"], ["aria-live", "polite", 1, "visually-hidden"], ["aria-hidden", "true"]], template: function PaginationDefaultSlotsComponent_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, PaginationDefaultSlotsComponent_ng_template_0_Template, 2, 0, "ng-template", 2, 0, i0.ɵɵtemplateRefExtractor)(2, PaginationDefaultSlotsComponent_ng_template_2_Template, 8, 13, "ng-template", 3, 1, i0.ɵɵtemplateRefExtractor);
} }, dependencies: [SlotDirective, PaginationPagesDirective, PaginationStructureDirective, UseDirective], encapsulation: 2, changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationDefaultSlotsComponent, [{