@agnos-ui/angular
Version:
Bootstrap-based widget library for Angular.
922 lines (920 loc) • 201 kB
JavaScript
import { SlotDirective, ComponentTemplate, BaseWidgetDirective, callWidgetFactory, createModal, mergeDirectives, auBooleanAttribute, UseDirective, SlotDefaultDirective, CachedProperty, createPagination, auNumberAttribute, createRating, createSelect, useDirectiveForHost, createAlert, createAccordion, createSlider, createProgressbar, createToast } from '@agnos-ui/angular-headless';
export * from '@agnos-ui/angular-headless';
import * as i0 from '@angular/core';
import { inject, TemplateRef, Directive, Component, ChangeDetectionStrategy, ViewChild, EventEmitter, Input, ContentChild, Output, ViewEncapsulation, forwardRef, HostBinding, NgZone, NgModule, Injector, ApplicationRef, createComponent, EnvironmentInjector, Injectable } from '@angular/core';
import { __decorate } from 'tslib';
import { writable } from '@amadeus-it-group/tansu';
import { NG_VALUE_ACCESSOR } from '@angular/forms';
import { NgTemplateOutlet, NgClass } from '@angular/common';
import { take } from 'rxjs';
const _c0$8 = ["header"];
const _c1$7 = ["structure"];
function ModalDefaultSlotsComponent_ng_template_0_ng_template_1_Template(rf, ctx) { }
function ModalDefaultSlotsComponent_ng_template_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
const _r10 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "button", 7);
i0.ɵɵlistener("click", function ModalDefaultSlotsComponent_ng_template_0_Conditional_2_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r10); const widget_r5 = i0.ɵɵnextContext().widget; return i0.ɵɵresetView(widget_r5.actions.closeButtonClick($event)); });
i0.ɵɵelementEnd();
} if (rf & 2) {
const state_r4 = i0.ɵɵnextContext().state;
i0.ɵɵattribute("aria-label", state_r4.ariaCloseButtonLabel);
} }
const _c2$6 = (a0, a1) => ({ state: a0, widget: a1 });
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.ɵɵtemplate(2, ModalDefaultSlotsComponent_ng_template_0_Conditional_2_Template, 1, 1, "button", 6);
} if (rf & 2) {
const state_r4 = ctx.state;
const widget_r5 = ctx.widget;
i0.ɵɵadvance();
i0.ɵɵproperty("auSlot", state_r4.slotTitle)("auSlotProps", i0.ɵɵpureFunction2(3, _c2$6, state_r4, widget_r5));
i0.ɵɵadvance();
i0.ɵɵconditional(2, state_r4.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", 11);
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_r18 = i0.ɵɵnextContext();
const state_r12 = ctx_r18.state;
const widget_r13 = ctx_r18.widget;
i0.ɵɵadvance();
i0.ɵɵproperty("auSlot", state_r12.slotHeader)("auSlotProps", i0.ɵɵpureFunction2(2, _c2$6, state_r12, widget_r13));
} }
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", 12);
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_r20 = i0.ɵɵnextContext();
const state_r12 = ctx_r20.state;
const widget_r13 = ctx_r20.widget;
i0.ɵɵadvance();
i0.ɵɵproperty("auSlot", state_r12.slotFooter)("auSlotProps", i0.ɵɵpureFunction2(2, _c2$6, state_r12, widget_r13));
} }
function ModalDefaultSlotsComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, ModalDefaultSlotsComponent_ng_template_2_Conditional_0_Template, 2, 5, "div", 8);
i0.ɵɵelementStart(1, "div", 9);
i0.ɵɵtemplate(2, ModalDefaultSlotsComponent_ng_template_2_ng_template_2_Template, 0, 0, "ng-template", 5);
i0.ɵɵelementEnd();
i0.ɵɵtemplate(3, ModalDefaultSlotsComponent_ng_template_2_Conditional_3_Template, 2, 5, "div", 10);
} if (rf & 2) {
const state_r12 = ctx.state;
const widget_r13 = ctx.widget;
i0.ɵɵconditional(0, state_r12.slotTitle ? 0 : -1);
i0.ɵɵadvance(2);
i0.ɵɵproperty("auSlot", state_r12.slotDefault)("auSlotProps", i0.ɵɵpureFunction2(4, _c2$6, state_r12, widget_r13));
i0.ɵɵadvance();
i0.ɵɵconditional(3, state_r12.slotFooter ? 3 : -1);
} }
const _c3$5 = ["auModal", ""];
function ModalComponent_ng_template_0_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵprojection(0);
} }
function ModalComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "div", 2);
} if (rf & 2) {
const ctx_r1 = i0.ɵɵnextContext();
i0.ɵɵclassMapInterpolate1("modal-backdrop ", ctx_r1.state().backdropClass, "");
i0.ɵɵproperty("auUse", ctx_r1.backdropDirective);
} }
function ModalComponent_Conditional_2_ng_template_3_Template(rf, ctx) { }
function ModalComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
const _r5 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "div", 3);
i0.ɵɵlistener("click", function ModalComponent_Conditional_2_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r4.widget.actions.modalClick($event)); });
i0.ɵɵelementStart(1, "div", 4)(2, "div", 5);
i0.ɵɵtemplate(3, ModalComponent_Conditional_2_ng_template_3_Template, 0, 0, "ng-template", 6);
i0.ɵɵelementEnd()()();
} if (rf & 2) {
const ctx_r2 = i0.ɵɵnextContext();
i0.ɵɵclassMapInterpolate1("modal d-block ", ctx_r2.state().className, "");
i0.ɵɵproperty("auUse", ctx_r2.modalDirective);
i0.ɵɵadvance(3);
i0.ɵɵproperty("auSlot", ctx_r2.state().slotStructure)("auSlotProps", i0.ɵɵpureFunction2(6, _c2$6, ctx_r2.state(), ctx_r2.widget));
} }
const _c4$2 = ["*"];
/**
* Directive to provide the slot structure for the modal widget.
*/
class ModalStructureDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(dir, context) {
return true;
}
static { this.ɵfac = function ModalStructureDirective_Factory(t) { return new (t || ModalStructureDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ModalStructureDirective, selectors: [["ng-template", "auModalStructure", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalStructureDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auModalStructure]', standalone: true }]
}], null, null); })();
/**
* Directive to provide the slot header for the modal widget.
*/
class ModalHeaderDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function ModalHeaderDirective_Factory(t) { return new (t || ModalHeaderDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ModalHeaderDirective, selectors: [["ng-template", "auModalHeader", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalHeaderDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auModalHeader]', standalone: true }]
}], null, null); })();
/**
* Directive to provide the slot title for the modal widget.
*/
class ModalTitleDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function ModalTitleDirective_Factory(t) { return new (t || ModalTitleDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ModalTitleDirective, selectors: [["ng-template", "auModalTitle", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalTitleDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auModalTitle]', standalone: true }]
}], null, null); })();
/**
* Directive to provide the default slot for the modal widget.
*/
class ModalBodyDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function ModalBodyDirective_Factory(t) { return new (t || ModalBodyDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ModalBodyDirective, selectors: [["ng-template", "auModalBody", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalBodyDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auModalBody]', standalone: true }]
}], null, null); })();
/**
* Directive to provide the slot footer for the modal widget.
*/
class ModalFooterDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function ModalFooterDirective_Factory(t) { return new (t || ModalFooterDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ModalFooterDirective, selectors: [["ng-template", "auModalFooter", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalFooterDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auModalFooter]', standalone: true }]
}], null, null); })();
/**
* Component containing the default slots for the modal.
*/
class ModalDefaultSlotsComponent {
static { this.ɵfac = function ModalDefaultSlotsComponent_Factory(t) { return new (t || ModalDefaultSlotsComponent)(); }; }
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ModalDefaultSlotsComponent, selectors: [["ng-component"]], viewQuery: function ModalDefaultSlotsComponent_Query(rf, ctx) { if (rf & 1) {
i0.ɵɵviewQuery(_c0$8, 7);
i0.ɵɵviewQuery(_c1$7, 7);
} if (rf & 2) {
let _t;
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.header = _t.first);
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.structure = _t.first);
} }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 4, vars: 0, consts: [["auModalHeader", ""], ["header", ""], ["auModalStructure", ""], ["structure", ""], [1, "modal-title"], [3, "auSlot", "auSlotProps"], ["type", "button", "class", "btn-close"], ["type", "button", 1, "btn-close", 3, "click"], ["class", "modal-header"], [1, "modal-body"], ["class", "modal-footer"], [1, "modal-header"], [1, "modal-footer"]], template: function ModalDefaultSlotsComponent_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, ModalDefaultSlotsComponent_ng_template_0_Template, 3, 6, "ng-template", 0, 1, i0.ɵɵtemplateRefExtractor)(2, ModalDefaultSlotsComponent_ng_template_2_Template, 4, 7, "ng-template", 2, 3, i0.ɵɵtemplateRefExtractor);
} }, dependencies: [SlotDirective, ModalHeaderDirective, ModalStructureDirective], encapsulation: 2, changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalDefaultSlotsComponent, [{
type: Component,
args: [{
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [SlotDirective, ModalHeaderDirective, ModalStructureDirective],
template: `
<ng-template auModalHeader #header let-state="state" let-widget="widget">
<h5 class="modal-title">
<ng-template [auSlot]="state.slotTitle" [auSlotProps]="{state, widget}"></ng-template>
</h5>
@if (state.closeButton) {
<button
type="button"
class="btn-close"
[attr.aria-label]="state.ariaCloseButtonLabel"
(click)="widget.actions.closeButtonClick($event)"
></button>
}
</ng-template>
<ng-template auModalStructure #structure let-state="state" let-widget="widget">
@if (state.slotTitle) {
<div class="modal-header">
<ng-template [auSlot]="state.slotHeader" [auSlotProps]="{state, widget}"></ng-template>
</div>
}
<div class="modal-body">
<ng-template [auSlot]="state.slotDefault" [auSlotProps]="{state, widget}"></ng-template>
</div>
@if (state.slotFooter) {
<div class="modal-footer">
<ng-template [auSlot]="state.slotFooter" [auSlotProps]="{state, widget}"></ng-template>
</div>
}
</ng-template>
`,
}]
}], null, { header: [{
type: ViewChild,
args: ['header', { static: true }]
}], structure: [{
type: ViewChild,
args: ['structure', { static: true }]
}] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ModalDefaultSlotsComponent, { className: "ModalDefaultSlotsComponent", filePath: "components/modal/modal.component.ts", lineNumber: 122 }); })();
/**
* Default slot for modal header.
*/
const modalDefaultSlotHeader = new ComponentTemplate(ModalDefaultSlotsComponent, 'header');
/**
* Default slot for modal structure.
*/
const modalDefaultSlotStructure = new ComponentTemplate(ModalDefaultSlotsComponent, 'structure');
const defaultConfig$6 = {
slotHeader: modalDefaultSlotHeader,
slotStructure: modalDefaultSlotStructure,
};
/**
* Modal component.
*/
class ModalComponent extends BaseWidgetDirective {
constructor() {
super(...arguments);
/**
* Event to be triggered when the visible property changes.
*/
this.visibleChange = new EventEmitter();
/**
* Event to be triggered when the modal is about to be closed (i.e. the close method was called).
*/
this.beforeClose = new EventEmitter();
/**
* Event to be triggered when the transition is completed and the modal is not visible.
*/
this.hidden = new EventEmitter();
/**
* Event to be triggered when the transition is completed and the modal is visible.
*/
this.shown = new EventEmitter();
this.defaultSlots = writable(defaultConfig$6);
this._widget = callWidgetFactory({
factory: createModal,
widgetName: 'modal',
defaultConfig: this.defaultSlots,
events: {
onShown: () => this.shown.emit(),
onHidden: () => this.hidden.emit(),
onBeforeClose: (event) => this.beforeClose.emit(event),
onVisibleChange: (event) => this.visibleChange.emit(event),
},
});
}
get modalDirective() {
return mergeDirectives(this._widget.directives.modalPortalDirective, this._widget.directives.modalDirective);
}
get backdropDirective() {
return mergeDirectives(this._widget.directives.backdropPortalDirective, this._widget.directives.backdropDirective);
}
ngAfterContentChecked() {
this._widget.patchSlots({
slotDefault: this.slotDefaultFromContent?.templateRef,
slotFooter: this.slotFooterFromContent?.templateRef,
slotHeader: this.slotHeaderFromContent?.templateRef,
slotStructure: this.slotStructureFromContent?.templateRef,
slotTitle: this.slotTitleFromContent?.templateRef,
});
}
static { this.ɵfac = /*@__PURE__*/ (() => { let ɵModalComponent_BaseFactory; return function ModalComponent_Factory(t) { return (ɵModalComponent_BaseFactory || (ɵModalComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ModalComponent)))(t || ModalComponent); }; })(); }
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ModalComponent, selectors: [["", "auModal", ""]], contentQueries: function ModalComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
i0.ɵɵcontentQuery(dirIndex, ModalStructureDirective, 5);
i0.ɵɵcontentQuery(dirIndex, ModalHeaderDirective, 5);
i0.ɵɵcontentQuery(dirIndex, ModalTitleDirective, 5);
i0.ɵɵcontentQuery(dirIndex, ModalBodyDirective, 5);
i0.ɵɵcontentQuery(dirIndex, ModalFooterDirective, 5);
} if (rf & 2) {
let _t;
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.slotStructureFromContent = _t.first);
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.slotHeaderFromContent = _t.first);
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.slotTitleFromContent = _t.first);
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.slotDefaultFromContent = _t.first);
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.slotFooterFromContent = _t.first);
} }, inputs: { animation: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "auAnimation", "animation", auBooleanAttribute], backdropTransition: [i0.ɵɵInputFlags.None, "auBackdropTransition", "backdropTransition"], modalTransition: [i0.ɵɵInputFlags.None, "auModalTransition", "modalTransition"], visible: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "auVisible", "visible", auBooleanAttribute], backdrop: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "auBackdrop", "backdrop", auBooleanAttribute], closeOnOutsideClick: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "auCloseOnOutsideClick", "closeOnOutsideClick", auBooleanAttribute], container: [i0.ɵɵInputFlags.None, "auContainer", "container"], ariaCloseButtonLabel: [i0.ɵɵInputFlags.None, "auAriaCloseButtonLabel", "ariaCloseButtonLabel"], backdropClass: [i0.ɵɵInputFlags.None, "auBackdropClass", "backdropClass"], closeButton: [i0.ɵɵInputFlags.HasDecoratorInputTransform, "auCloseButton", "closeButton", auBooleanAttribute], className: [i0.ɵɵInputFlags.None, "auClassName", "className"], slotStructure: [i0.ɵɵInputFlags.None, "auSlotStructure", "slotStructure"], slotHeader: [i0.ɵɵInputFlags.None, "auSlotHeader", "slotHeader"], slotTitle: [i0.ɵɵInputFlags.None, "auSlotTitle", "slotTitle"], slotDefault: [i0.ɵɵInputFlags.None, "auSlotDefault", "slotDefault"], slotFooter: [i0.ɵɵInputFlags.None, "auSlotFooter", "slotFooter"], contentData: [i0.ɵɵInputFlags.None, "auContentData", "contentData"] }, outputs: { visibleChange: "auVisibleChange", beforeClose: "auBeforeClose", hidden: "auHidden", shown: "auShown" }, standalone: true, features: [i0.ɵɵInputTransformsFeature, i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature], attrs: _c3$5, ngContentSelectors: _c4$2, decls: 3, vars: 3, consts: [[3, "auSlotDefault"], [3, "class", "auUse"], [3, "auUse"], [3, "auUse", "click"], [1, "modal-dialog"], [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", 0)(1, ModalComponent_Conditional_1_Template, 1, 4, "div", 1)(2, ModalComponent_Conditional_2_Template, 4, 9, "div", 1);
} if (rf & 2) {
i0.ɵɵproperty("auSlotDefault", ctx.defaultSlots);
i0.ɵɵadvance();
i0.ɵɵconditional(1, !ctx.state().backdropHidden ? 1 : -1);
i0.ɵɵadvance();
i0.ɵɵconditional(2, !ctx.state().hidden ? 2 : -1);
} }, dependencies: [UseDirective, SlotDirective, SlotDefaultDirective], encapsulation: 2, changeDetection: 0 }); }
}
__decorate([
CachedProperty
], ModalComponent.prototype, "modalDirective", null);
__decorate([
CachedProperty
], ModalComponent.prototype, "backdropDirective", null);
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ModalComponent, [{
type: Component,
args: [{
selector: '[auModal]',
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [UseDirective, SlotDirective, SlotDefaultDirective],
template: `
<ng-template [auSlotDefault]="defaultSlots"><ng-content></ng-content></ng-template>
@if (!state().backdropHidden) {
<div class="modal-backdrop {{ state().backdropClass }}" [auUse]="backdropDirective"></div>
}
@if (!state().hidden) {
<div class="modal d-block {{ state().className }}" [auUse]="modalDirective" (click)="widget.actions.modalClick($event)">
<div class="modal-dialog">
<div class="modal-content">
<ng-template [auSlot]="state().slotStructure" [auSlotProps]="{state: state(), widget}"></ng-template>
</div>
</div>
</div>
}
`,
}]
}], null, { animation: [{
type: Input,
args: [{ alias: 'auAnimation', transform: auBooleanAttribute }]
}], backdropTransition: [{
type: Input,
args: ['auBackdropTransition']
}], modalTransition: [{
type: Input,
args: ['auModalTransition']
}], visible: [{
type: Input,
args: [{ alias: 'auVisible', transform: auBooleanAttribute }]
}], backdrop: [{
type: Input,
args: [{ alias: 'auBackdrop', transform: auBooleanAttribute }]
}], closeOnOutsideClick: [{
type: Input,
args: [{ alias: 'auCloseOnOutsideClick', transform: auBooleanAttribute }]
}], container: [{
type: Input,
args: ['auContainer']
}], ariaCloseButtonLabel: [{
type: Input,
args: ['auAriaCloseButtonLabel']
}], backdropClass: [{
type: Input,
args: ['auBackdropClass']
}], closeButton: [{
type: Input,
args: [{ alias: 'auCloseButton', transform: auBooleanAttribute }]
}], className: [{
type: Input,
args: ['auClassName']
}], slotStructure: [{
type: Input,
args: ['auSlotStructure']
}], slotStructureFromContent: [{
type: ContentChild,
args: [ModalStructureDirective, { static: false }]
}], slotHeader: [{
type: Input,
args: ['auSlotHeader']
}], slotHeaderFromContent: [{
type: ContentChild,
args: [ModalHeaderDirective, { static: false }]
}], slotTitle: [{
type: Input,
args: ['auSlotTitle']
}], slotTitleFromContent: [{
type: ContentChild,
args: [ModalTitleDirective, { static: false }]
}], slotDefault: [{
type: Input,
args: ['auSlotDefault']
}], slotDefaultFromContent: [{
type: ContentChild,
args: [ModalBodyDirective, { static: false }]
}], slotFooter: [{
type: Input,
args: ['auSlotFooter']
}], slotFooterFromContent: [{
type: ContentChild,
args: [ModalFooterDirective, { static: false }]
}], contentData: [{
type: Input,
args: ['auContentData']
}], visibleChange: [{
type: Output,
args: ['auVisibleChange']
}], beforeClose: [{
type: Output,
args: ['auBeforeClose']
}], hidden: [{
type: Output,
args: ['auHidden']
}], shown: [{
type: Output,
args: ['auShown']
}], modalDirective: [], backdropDirective: [] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ModalComponent, { className: "ModalComponent", filePath: "components/modal/modal.component.ts", lineNumber: 166 }); })();
const _c0$7 = ["pages"];
const _c1$6 = ["structure"];
function PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_1_ng_template_1_Template(rf, ctx) { }
const _c2$5 = (a0, a1) => ({ state: a0, widget: a1 });
function PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "a", 6);
i0.ɵɵtemplate(1, PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_1_ng_template_1_Template, 0, 0, "ng-template", 7);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r15 = i0.ɵɵnextContext(2);
const state_r4 = ctx_r15.state;
const widget_r5 = ctx_r15.widget;
i0.ɵɵadvance();
i0.ɵɵproperty("auSlot", state_r4.slotEllipsis)("auSlotProps", i0.ɵɵpureFunction2(2, _c2$5, state_r4, widget_r5));
} }
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", 10);
i0.ɵɵtext(1);
i0.ɵɵelementEnd();
} if (rf & 2) {
const state_r4 = i0.ɵɵnextContext(3).state;
i0.ɵɵadvance();
i0.ɵɵtextInterpolate(state_r4.activeLabel);
} }
const _c3$4 = (a0, a1, a2) => ({ state: a0, widget: a1, displayedPage: a2 });
function PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
const _r21 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "a", 8);
i0.ɵɵlistener("click", function PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_2_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r21); const page_r7 = i0.ɵɵnextContext().$implicit; const widget_r5 = i0.ɵɵnextContext().widget; return i0.ɵɵresetView(widget_r5.actions.select(page_r7, $event)); });
i0.ɵɵtemplate(1, PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_2_ng_template_1_Template, 0, 0, "ng-template", 7)(2, PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_2_Conditional_2_Template, 2, 1, "span", 9);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r24 = i0.ɵɵnextContext();
const i_r8 = ctx_r24.$index;
const page_r7 = ctx_r24.$implicit;
const ctx_r23 = i0.ɵɵnextContext();
const state_r4 = ctx_r23.state;
const widget_r5 = ctx_r23.widget;
i0.ɵɵattribute("aria-label", state_r4.pagesLabel[i_r8])("href", state_r4.pagesHrefs[i_r8], i0.ɵɵsanitizeUrl)("tabindex", state_r4.disabled ? "-1" : null)("aria-disabled", state_r4.disabled ? "true" : null);
i0.ɵɵadvance();
i0.ɵɵproperty("auSlot", state_r4.slotNumberLabel)("auSlotProps", i0.ɵɵpureFunction3(7, _c3$4, state_r4, widget_r5, page_r7));
i0.ɵɵadvance();
i0.ɵɵconditional(2, state_r4.page === page_r7 ? 2 : -1);
} }
function PaginationDefaultSlotsComponent_ng_template_0_For_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "li", 4);
i0.ɵɵtemplate(1, PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_1_Template, 2, 5, "a", 5)(2, PaginationDefaultSlotsComponent_ng_template_0_For_1_Conditional_2_Template, 3, 11);
i0.ɵɵelementEnd();
} if (rf & 2) {
const page_r7 = ctx.$implicit;
const ctx_r25 = i0.ɵɵnextContext();
const state_r4 = ctx_r25.state;
const widget_r5 = ctx_r25.widget;
i0.ɵɵclassProp("active", page_r7 === state_r4.page)("disabled", widget_r5.api.isEllipsis(page_r7) || state_r4.disabled);
i0.ɵɵattribute("aria-current", page_r7 === state_r4.page ? "page" : null);
i0.ɵɵadvance();
i0.ɵɵconditional(1, widget_r5.api.isEllipsis(page_r7) ? 1 : 2);
} }
function PaginationDefaultSlotsComponent_ng_template_0_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵrepeaterCreate(0, PaginationDefaultSlotsComponent_ng_template_0_For_1_Template, 3, 6, "li", 11, i0.ɵɵrepeaterTrackByIdentity);
} if (rf & 2) {
const state_r4 = ctx.state;
i0.ɵɵrepeater(state_r4.pages);
} }
function PaginationDefaultSlotsComponent_ng_template_2_Conditional_1_ng_template_3_Template(rf, ctx) { }
const _c4$1 = (a0, a1) => ({ widget: a0, state: a1 });
function PaginationDefaultSlotsComponent_ng_template_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
const _r36 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "li", 4)(1, "a", 14);
i0.ɵɵlistener("click", function PaginationDefaultSlotsComponent_ng_template_2_Conditional_1_Template_a_click_1_listener($event) { i0.ɵɵrestoreView(_r36); const widget_r27 = i0.ɵɵnextContext().widget; return i0.ɵɵresetView(widget_r27.actions.first($event)); });
i0.ɵɵelementStart(2, "span", 15);
i0.ɵɵtemplate(3, PaginationDefaultSlotsComponent_ng_template_2_Conditional_1_ng_template_3_Template, 0, 0, "ng-template", 7);
i0.ɵɵelementEnd()()();
} if (rf & 2) {
const ctx_r37 = i0.ɵɵnextContext();
const state_r26 = ctx_r37.state;
const widget_r27 = ctx_r37.widget;
i0.ɵɵclassProp("disabled", state_r26.previousDisabled);
i0.ɵɵadvance();
i0.ɵɵattribute("aria-label", state_r26.ariaFirstLabel)("href", state_r26.pagesHrefs[0], i0.ɵɵsanitizeUrl)("tabindex", state_r26.previousDisabled ? "-1" : null)("aria-disabled", state_r26.previousDisabled ? "true" : null);
i0.ɵɵadvance(2);
i0.ɵɵproperty("auSlot", state_r26.slotFirst)("auSlotProps", i0.ɵɵpureFunction2(8, _c4$1, widget_r27, state_r26));
} }
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) {
const _r41 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "li", 4)(1, "a", 16);
i0.ɵɵlistener("click", function PaginationDefaultSlotsComponent_ng_template_2_Conditional_2_Template_a_click_1_listener($event) { i0.ɵɵrestoreView(_r41); const widget_r27 = i0.ɵɵnextContext().widget; return i0.ɵɵresetView(widget_r27.actions.previous($event)); });
i0.ɵɵelementStart(2, "span", 15);
i0.ɵɵtemplate(3, PaginationDefaultSlotsComponent_ng_template_2_Conditional_2_ng_template_3_Template, 0, 0, "ng-template", 7);
i0.ɵɵelementEnd()()();
} if (rf & 2) {
const ctx_r42 = i0.ɵɵnextContext();
const state_r26 = ctx_r42.state;
const widget_r27 = ctx_r42.widget;
i0.ɵɵclassProp("disabled", state_r26.previousDisabled);
i0.ɵɵadvance();
i0.ɵɵattribute("aria-label", state_r26.ariaPreviousLabel)("href", state_r26.directionsHrefs.previous, i0.ɵɵsanitizeUrl)("tabindex", state_r26.previousDisabled ? "-1" : null)("aria-disabled", state_r26.previousDisabled ? "true" : null);
i0.ɵɵadvance(2);
i0.ɵɵproperty("auSlot", state_r26.slotPrevious)("auSlotProps", i0.ɵɵpureFunction2(8, _c4$1, widget_r27, state_r26));
} }
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) {
const _r46 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "li", 4)(1, "a", 17);
i0.ɵɵlistener("click", function PaginationDefaultSlotsComponent_ng_template_2_Conditional_4_Template_a_click_1_listener($event) { i0.ɵɵrestoreView(_r46); const widget_r27 = i0.ɵɵnextContext().widget; return i0.ɵɵresetView(widget_r27.actions.next($event)); });
i0.ɵɵelementStart(2, "span", 15);
i0.ɵɵtemplate(3, PaginationDefaultSlotsComponent_ng_template_2_Conditional_4_ng_template_3_Template, 0, 0, "ng-template", 7);
i0.ɵɵelementEnd()()();
} if (rf & 2) {
const ctx_r47 = i0.ɵɵnextContext();
const state_r26 = ctx_r47.state;
const widget_r27 = ctx_r47.widget;
i0.ɵɵclassProp("disabled", state_r26.nextDisabled);
i0.ɵɵadvance();
i0.ɵɵattribute("aria-label", state_r26.ariaNextLabel)("href", state_r26.directionsHrefs.next, i0.ɵɵsanitizeUrl)("tabindex", state_r26.nextDisabled ? "-1" : null)("aria-disabled", state_r26.nextDisabled ? "true" : null);
i0.ɵɵadvance(2);
i0.ɵɵproperty("auSlot", state_r26.slotNext)("auSlotProps", i0.ɵɵpureFunction2(8, _c4$1, widget_r27, state_r26));
} }
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) {
const _r51 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "li", 4)(1, "a", 18);
i0.ɵɵlistener("click", function PaginationDefaultSlotsComponent_ng_template_2_Conditional_5_Template_a_click_1_listener($event) { i0.ɵɵrestoreView(_r51); const widget_r27 = i0.ɵɵnextContext().widget; return i0.ɵɵresetView(widget_r27.actions.last($event)); });
i0.ɵɵelementStart(2, "span", 15);
i0.ɵɵtemplate(3, PaginationDefaultSlotsComponent_ng_template_2_Conditional_5_ng_template_3_Template, 0, 0, "ng-template", 7);
i0.ɵɵelementEnd()()();
} if (rf & 2) {
const ctx_r52 = i0.ɵɵnextContext();
const state_r26 = ctx_r52.state;
const widget_r27 = ctx_r52.widget;
i0.ɵɵclassProp("disabled", state_r26.nextDisabled);
i0.ɵɵadvance();
i0.ɵɵattribute("aria-label", state_r26.ariaLastLabel)("href", state_r26.pagesHrefs.at(-1), i0.ɵɵsanitizeUrl)("tabindex", state_r26.nextDisabled ? "-1" : null)("aria-disabled", state_r26.nextDisabled ? "true" : null);
i0.ɵɵadvance(2);
i0.ɵɵproperty("auSlot", state_r26.slotLast)("auSlotProps", i0.ɵɵpureFunction2(8, _c4$1, widget_r27, state_r26));
} }
function PaginationDefaultSlotsComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "ul");
i0.ɵɵtemplate(1, PaginationDefaultSlotsComponent_ng_template_2_Conditional_1_Template, 4, 11, "li", 12)(2, PaginationDefaultSlotsComponent_ng_template_2_Conditional_2_Template, 4, 11, "li", 12)(3, PaginationDefaultSlotsComponent_ng_template_2_ng_template_3_Template, 0, 0, "ng-template", 7)(4, PaginationDefaultSlotsComponent_ng_template_2_Conditional_4_Template, 4, 11, "li", 12)(5, PaginationDefaultSlotsComponent_ng_template_2_Conditional_5_Template, 4, 11, "li", 12);
i0.ɵɵelementEnd();
i0.ɵɵelementStart(6, "div", 13);
i0.ɵɵtext(7);
i0.ɵɵelementEnd();
} if (rf & 2) {
const state_r26 = ctx.state;
const widget_r27 = ctx.widget;
i0.ɵɵclassMap("au-pagination pagination" + (state_r26.size ? " pagination-" + state_r26.size : "") + " " + state_r26.className);
i0.ɵɵadvance();
i0.ɵɵconditional(1, state_r26.boundaryLinks ? 1 : -1);
i0.ɵɵadvance();
i0.ɵɵconditional(2, state_r26.directionLinks ? 2 : -1);
i0.ɵɵadvance();
i0.ɵɵproperty("auSlot", state_r26.slotPages)("auSlotProps", i0.ɵɵpureFunction2(9, _c4$1, widget_r27, state_r26));
i0.ɵɵadvance();
i0.ɵɵconditional(4, state_r26.directionLinks ? 4 : -1);
i0.ɵɵadvance();
i0.ɵɵconditional(5, state_r26.boundaryLinks ? 5 : -1);
i0.ɵɵadvance(2);
i0.ɵɵtextInterpolate1("Current page is ", state_r26.page, "");
} }
const _c5$1 = ["auPagination", ""];
function PaginationComponent_ng_template_0_Template(rf, ctx) { }
/**
* A directive to use to give the 'ellipsis' link template to the pagination component
*/
class PaginationEllipsisDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function PaginationEllipsisDirective_Factory(t) { return new (t || PaginationEllipsisDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PaginationEllipsisDirective, selectors: [["ng-template", "auPaginationEllipsis", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationEllipsisDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auPaginationEllipsis]', standalone: true }]
}], null, null); })();
/**
* A directive to use to give the 'first' link template to the pagination component
*/
class PaginationFirstDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function PaginationFirstDirective_Factory(t) { return new (t || PaginationFirstDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PaginationFirstDirective, selectors: [["ng-template", "auPaginationFirst", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationFirstDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auPaginationFirst]', standalone: true }]
}], null, null); })();
/**
* A directive to use to give the 'last' link template to the pagination component
*/
class PaginationLastDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function PaginationLastDirective_Factory(t) { return new (t || PaginationLastDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PaginationLastDirective, selectors: [["ng-template", "auPaginationLast", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationLastDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auPaginationLast]', standalone: true }]
}], null, null); })();
/**
* A directive to use to give the 'next' link template to the pagination component
*/
class PaginationNextDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function PaginationNextDirective_Factory(t) { return new (t || PaginationNextDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PaginationNextDirective, selectors: [["ng-template", "auPaginationNext", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationNextDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auPaginationNext]', standalone: true }]
}], null, null); })();
/**
* A directive to use to give the page 'number' template to the pagination component
*/
class PaginationNumberDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function PaginationNumberDirective_Factory(t) { return new (t || PaginationNumberDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PaginationNumberDirective, selectors: [["ng-template", "auPaginationNumber", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationNumberDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auPaginationNumber]', standalone: true }]
}], null, null); })();
/**
* A directive to use to give the 'previous' link template to the pagination component
*/
class PaginationPreviousDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function PaginationPreviousDirective_Factory(t) { return new (t || PaginationPreviousDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PaginationPreviousDirective, selectors: [["ng-template", "auPaginationPrevious", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationPreviousDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auPaginationPrevious]', standalone: true }]
}], null, null); })();
/**
* A directive to use to give the 'Pages' template for the Pages slot
*/
class PaginationPagesDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(_dir, context) {
return true;
}
static { this.ɵfac = function PaginationPagesDirective_Factory(t) { return new (t || PaginationPagesDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PaginationPagesDirective, selectors: [["ng-template", "auPaginationPages", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationPagesDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auPaginationPages]', standalone: true }]
}], null, null); })();
/**
* Directive to provide the slot structure for the pagination widget.
*/
class PaginationStructureDirective {
constructor() {
this.templateRef = inject((TemplateRef));
}
static ngTemplateContextGuard(dir, context) {
return true;
}
static { this.ɵfac = function PaginationStructureDirective_Factory(t) { return new (t || PaginationStructureDirective)(); }; }
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: PaginationStructureDirective, selectors: [["ng-template", "auPaginationStructure", ""]], standalone: true }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationStructureDirective, [{
type: Directive,
args: [{ selector: 'ng-template[auPaginationStructure]', standalone: true }]
}], null, null); })();
class PaginationDefaultSlotsComponent {
static { this.ɵfac = function PaginationDefaultSlotsComponent_Factory(t) { return new (t || PaginationDefaultSlotsComponent)(); }; }
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PaginationDefaultSlotsComponent, selectors: [["ng-component"]], viewQuery: function PaginationDefaultSlotsComponent_Query(rf, ctx) { if (rf & 1) {
i0.ɵɵviewQuery(_c0$7, 7);
i0.ɵɵviewQuery(_c1$6, 7);
} if (rf & 2) {
let _t;
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.pages = _t.first);
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.structure = _t.first);
} }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 4, vars: 0, consts: [["auPaginationPages", ""], ["pages", ""], ["auPaginationStructure", ""], ["structure", ""], [1, "page-item"], ["class", "page-link au-ellipsis", "tabindex", "-1", "aria-disabled", "true"], ["tabindex", "-1", "aria-disabled", "true", 1, "page-link", "au-ellipsis"], [3, "auSlot", "auSlotProps"], [1, "page-link", "au-page", 3, "click"], ["class", "visually-hidden"], [1, "visually-hidden"], ["class", "page-item", 3, "active", "disabled"], ["class", "page-item", 3, "disabled"], ["aria-live", "polite", 1, "visually-hidden"], [1, "page-link", "au-first", 3, "click"], ["aria-hidden", "true"], [1, "page-link", "au-previous", 3, "click"], [1, "page-link", "au-next", 3, "click"], [1, "page-link", "au-last", 3, "click"]], template: function PaginationDefaultSlotsComponent_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, PaginationDefaultSlotsComponent_ng_template_0_Template, 2, 0, "ng-template", 0, 1, i0.ɵɵtemplateRefExtractor)(2, PaginationDefaultSlotsComponent_ng_template_2_Template, 8, 12, "ng-template", 2, 3, i0.ɵɵtemplateRefExtractor);
} }, dependencies: [SlotDirective, PaginationPagesDirective, PaginationStructureDirective], encapsulation: 2, changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationDefaultSlotsComponent, [{
type: Component,
args: [{
standalone: true,
imports: [SlotDirective, PaginationPagesDirective, PaginationStructureDirective],
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<ng-template auPaginationPages #pages let-state="state" let-widget="widget">
@for (page of state.pages; track page; let i = $index) {
<li
class="page-item"
[class.active]="page === state.page"
[class.disabled]="widget.api.isEllipsis(page) || state.disabled"
[attr.aria-current]="page === state.page ? 'page' : null"
>
@if (widget.api.isEllipsis(page)) {
<a class="page-link au-ellipsis" tabindex="-1" aria-disabled="true">
<ng-template [auSlot]="state.slotEllipsis" [auSlotProps]="{state, widget}"></ng-template>
</a>
} @else {
<a
[attr.aria-label]="state.pagesLabel[i]"
class="page-link au-page"
[attr.href]="state.pagesHrefs[i]"
(click)="widget.actions.select(page, $event)"
[attr.tabindex]="state.disabled ? '-1' : null"
[attr.aria-disabled]="state.disabled ? 'true' : null"
>
<ng-template [auSlot]="state.slotNumberLabel" [auSlotProps]="{state, widget, displayedPage: page}"></ng-template>
@if (state.page === page) {
<span class="visually-hidden">{{ state.activeLabel }}</span>
}
</a>
}
</li>
}
</ng-template>
<ng-template auPaginationStructure #structure let-state="state" let-widget="widget">
<ul [class]="'au-pagination pagination' + (state.size ? ' pagination-' + state.size : '') + ' ' + state.className">
@if (state.boundaryLinks) {
<li class="page-item" [class.disabled]="state.previousDisabled">
<a
[attr.aria-label]="state.ariaFirstLabel"
class="page-link au-first"
[attr.href]="state.pagesHrefs[0]"
(click)="widget.actions.first($event)"
[attr.tabindex]="state.previousDisabled ? '-1' : null"
[attr.aria-disabled]="state.previousDisabled ? 'true' : null"
>
<span aria-hidden="true">
<ng-template [auSlot]="state.slotFirst" [auSlotProps]="{widget, state}"></ng-template>
</span>
</a>
</li>
}
@if (state.directionLinks) {
<li class="page-item" [class.disabled]="state.previousDisabled">
<a
[attr.aria-label]="state.ariaPreviousLabel"
class="page-link au-previous"
[attr.href]="state.directionsHrefs.previous"
(click)="widget.actions.previous($event)"
[attr.tabindex]="state.previousDisabled ? '-1' : null"
[attr.aria-disabled]="state.previousDisabled ? 'true' : null"
>
<span aria-hidden="true">
<ng-template [auSlot]="state.slotPrevious" [auSlotProps]="{widget, state}"></ng-template>
</span>
</a>
</li>
}
<ng-template [auSlot]="state.slotPages" [auSlotProps]="{widget, state}"></ng-template>
@if (state.directionLinks) {
<li class="page-item" [class.disabled]="state.nextDisabled">
<a
[attr.aria-label]="state.ariaNextLabel"
class="page-link au-next"
[attr.href]="state.directionsHrefs.next"
(click)="widget.actions.next($event)"
[attr.tabindex]="state.nextDisabled ? '-1' : null"
[attr.aria-disabled]="state.nextDisabled ? 'true' : null"
>
<span aria-hidden="true">
<ng-template [auSlot]="state.slotNext" [auSlotProps]="{widget, state}"></ng-template>
</span>
</a>
</li>
}
@if (state.boundaryLinks) {
<li class="page-item" [class.disabled]="state.nextDisabled">
<a
[attr.aria-label]="state.ariaLastLabel"
class="page-link au-last"
[attr.href]="state.pagesHrefs.at(-1)"
(click)="widget.actions.last($event)"
[attr.tabindex]="state.nextDisabled ? '-1' : null"
[attr.aria-disabled]="state.nextDisabled ? 'true' : null"
>
<span aria-hidden="true">
<ng-template [auSlot]="state.slotLast" [auSlotProps]="{widget, state}"></ng-template>
</span>
</a>
</li>
}
</ul>
<div aria-live="polite" class="visually-hidden">Current page is {{ state.page }}</div>
</ng-template>
`,
}]
}], null, { pages: [{
type: ViewChild,
args: ['pages', { static: true }]
}], structure: [{
type: ViewChild,
args: ['structure', { static: true }]
}] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PaginationDefaultSlotsComponent, { className: "PaginationDefaultSlotsComponent", filePath: "components/pagination/pagination.component.ts", lineNumber: 221 }); })();
/**
* The default slot for the pages
*/
const paginationDefaultSlotPages = new ComponentTemplate(PaginationDefaultSlotsComponent, 'pages');
/**
* The default slot for the structure
*/
const paginationDefaultSlotStructure = new ComponentTemplate(PaginationDefaultSlotsComponent, 'structure');
const defaultConfig$5 = {
slotStructure: paginationDefaultSlotStructure,
slotPages: paginationDefaultSlotPages,
};
class PaginationComponent extends BaseWidgetDirective {
constructor() {
super(...arguments);
this._widget = callWidgetFactory({
factory: createPagination,
widgetName: 'pagination',
defaultConfig: defaultConfig$5,
events: {
onPageChange: (page) => this.pageChange.emit(page),
},
});
/**
* An event fired when the page is changed.
*
* Event payload is the number of the newly selected page.
*
* Page numbers start with `1`.
*/
this.pageChange = new EventEmitter();
}
ngAfterContentChecked() {
this._widget.patchSlots({
slotEllipsis: this.slotEllipsisFromContent?.templateRef,
slotFirst: this.slotFirstFromContent?.templateRef,
slotLast: this.slotLastFromContent?.templateRef,
slotNext: this.slotNextFromContent?.templateRef,
slotNumberLabel: this.slotNumberLabelFromContent?.templateRef,
slotPages: this.slotPagesFromContent?.templateRef,
slotPrevious: this.slotPreviousFromContent?.templateRef,
slotStructure: this.slotStructureFromContent?.templateRef,
});
}
static { this.ɵfac = /*@__PURE