formioangular-colfuturo
Version:
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.4.
26 lines • 9.24 kB
JavaScript
import { Component, ViewEncapsulation } from '@angular/core';
import { GridFooterComponent } from '../GridFooterComponent';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/forms";
import * as i3 from "ngx-bootstrap/pagination";
export class FormGridFooterComponent extends GridFooterComponent {
constructor() {
super();
}
ngOnInit() {
if (!this.createText) {
this.createText = 'Create Form';
}
if (!this.size) {
this.size = 7;
}
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormGridFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: FormGridFooterComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<ng-template #footer let-position=\"position\" let-label=\"label\">\r\n <thead class=\"formio-grid-footer\" *ngIf=\"position === footerPositions.top\">\r\n <ng-container [ngTemplateOutlet]=\"defaultFooterTemplate\" [ngTemplateOutletContext]=\"{ label: label }\"></ng-container>\r\n </thead>\r\n <tfoot class=\"formio-grid-footer\" *ngIf=\"position === footerPositions.bottom\">\r\n <ng-container [ngTemplateOutlet]=\"defaultFooterTemplate\" [ngTemplateOutletContext]=\"{ label: label }\"></ng-container>\r\n </tfoot>\r\n</ng-template>\r\n\r\n<ng-template let-label=\"label\" #defaultFooterTemplate>\r\n <tr>\r\n <td *ngIf=\"header\" [colSpan]=\"header.numHeaders\">\r\n <button *ngIf=\"actionAllowed('formCreate')\" class=\"btn btn-primary form-btn-use float-start\" (click)=\"createItem.emit('form')\"><em class=\"fa fa-plus bi bi-plus-lg\"></em> {{ createText }}</button>\r\n <span class=\"pull-right item-counter\"><span class=\"page-num\">{{ body.firstItem }} - {{ body.lastItem }}</span> / {{ body.total }} total</span>\r\n <span [attr.aria-label]=\"label\" role=\"navigation\">\r\n <pagination [totalItems]=\"body.total\" [itemsPerPage]=\"body.limit\" [(ngModel)]=\"body.skip\" (pageChanged)=\"pageChanged.emit($event)\" [maxSize]=\"size\" class=\"justify-content-center pagination-sm\">\r\n </pagination>\r\n </span>\r\n </td>\r\n </tr>\r\n</ng-template>\r\n", styles: ["tfoot.formio-grid-footer td{padding:.3rem}tfoot.formio-grid-footer .page-num{font-size:1.4em}tfoot.formio-grid-footer ul.pagination{margin-top:5px;margin-bottom:0}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.PaginationComponent, selector: "pagination", inputs: ["align", "maxSize", "boundaryLinks", "directionLinks", "firstText", "previousText", "nextText", "lastText", "rotate", "pageBtnClass", "disabled", "customPageTemplate", "customNextTemplate", "customPreviousTemplate", "customFirstTemplate", "customLastTemplate", "itemsPerPage", "totalItems"], outputs: ["numPages", "pageChanged"] }], encapsulation: i0.ViewEncapsulation.None });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FormGridFooterComponent, decorators: [{
type: Component,
args: [{ encapsulation: ViewEncapsulation.None, template: "<ng-template #footer let-position=\"position\" let-label=\"label\">\r\n <thead class=\"formio-grid-footer\" *ngIf=\"position === footerPositions.top\">\r\n <ng-container [ngTemplateOutlet]=\"defaultFooterTemplate\" [ngTemplateOutletContext]=\"{ label: label }\"></ng-container>\r\n </thead>\r\n <tfoot class=\"formio-grid-footer\" *ngIf=\"position === footerPositions.bottom\">\r\n <ng-container [ngTemplateOutlet]=\"defaultFooterTemplate\" [ngTemplateOutletContext]=\"{ label: label }\"></ng-container>\r\n </tfoot>\r\n</ng-template>\r\n\r\n<ng-template let-label=\"label\" #defaultFooterTemplate>\r\n <tr>\r\n <td *ngIf=\"header\" [colSpan]=\"header.numHeaders\">\r\n <button *ngIf=\"actionAllowed('formCreate')\" class=\"btn btn-primary form-btn-use float-start\" (click)=\"createItem.emit('form')\"><em class=\"fa fa-plus bi bi-plus-lg\"></em> {{ createText }}</button>\r\n <span class=\"pull-right item-counter\"><span class=\"page-num\">{{ body.firstItem }} - {{ body.lastItem }}</span> / {{ body.total }} total</span>\r\n <span [attr.aria-label]=\"label\" role=\"navigation\">\r\n <pagination [totalItems]=\"body.total\" [itemsPerPage]=\"body.limit\" [(ngModel)]=\"body.skip\" (pageChanged)=\"pageChanged.emit($event)\" [maxSize]=\"size\" class=\"justify-content-center pagination-sm\">\r\n </pagination>\r\n </span>\r\n </td>\r\n </tr>\r\n</ng-template>\r\n", styles: ["tfoot.formio-grid-footer td{padding:.3rem}tfoot.formio-grid-footer .page-num{font-size:1.4em}tfoot.formio-grid-footer ul.pagination{margin-top:5px;margin-bottom:0}\n"] }]
}], ctorParameters: () => [] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRm9ybUdyaWRGb290ZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5ndWxhci1mb3JtaW8vZ3JpZC9zcmMvZm9ybS9Gb3JtR3JpZEZvb3Rlci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLWZvcm1pby9ncmlkL3NyYy9mb3JtL0Zvcm1HcmlkRm9vdGVyLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9B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