{"version":3,"file":"pagination.d.ts","sources":["pagination.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA","sourcesContent":["import { EventEmitter, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';\r\nimport { NgbPaginationConfig } from './pagination-config';\r\n/**\r\n * A context for the\r\n * * `NgbPaginationFirst`\r\n * * `NgbPaginationPrevious`\r\n * * `NgbPaginationNext`\r\n * * `NgbPaginationLast`\r\n * * `NgbPaginationEllipsis`\r\n *\r\n * link templates in case you want to override one.\r\n *\r\n * @since 4.1.0\r\n */\r\nexport interface NgbPaginationLinkContext {\r\n    /**\r\n     * The currently selected page number\r\n     */\r\n    currentPage: number;\r\n    /**\r\n     * If `true`, the current link is disabled\r\n     */\r\n    disabled: boolean;\r\n}\r\n/**\r\n * A context for the `NgbPaginationNumber` link template in case you want to override one.\r\n *\r\n * Extends `NgbPaginationLinkContext`.\r\n *\r\n * @since 4.1.0\r\n */\r\nexport interface NgbPaginationNumberContext extends NgbPaginationLinkContext {\r\n    /**\r\n     * The page number, displayed by the current page link.\r\n     */\r\n    $implicit: number;\r\n}\r\n/**\r\n * A directive to match the 'ellipsis' link template\r\n *\r\n * @since 4.1.0\r\n */\r\nexport declare class NgbPaginationEllipsis {\r\n    templateRef: TemplateRef<NgbPaginationLinkContext>;\r\n    constructor(templateRef: TemplateRef<NgbPaginationLinkContext>);\r\n}\r\n/**\r\n * A directive to match the 'first' link template\r\n *\r\n * @since 4.1.0\r\n */\r\nexport declare class NgbPaginationFirst {\r\n    templateRef: TemplateRef<NgbPaginationLinkContext>;\r\n    constructor(templateRef: TemplateRef<NgbPaginationLinkContext>);\r\n}\r\n/**\r\n * A directive to match the 'last' link template\r\n *\r\n * @since 4.1.0\r\n */\r\nexport declare class NgbPaginationLast {\r\n    templateRef: TemplateRef<NgbPaginationLinkContext>;\r\n    constructor(templateRef: TemplateRef<NgbPaginationLinkContext>);\r\n}\r\n/**\r\n * A directive to match the 'next' link template\r\n *\r\n * @since 4.1.0\r\n */\r\nexport declare class NgbPaginationNext {\r\n    templateRef: TemplateRef<NgbPaginationLinkContext>;\r\n    constructor(templateRef: TemplateRef<NgbPaginationLinkContext>);\r\n}\r\n/**\r\n * A directive to match the page 'number' link template\r\n *\r\n * @since 4.1.0\r\n */\r\nexport declare class NgbPaginationNumber {\r\n    templateRef: TemplateRef<NgbPaginationNumberContext>;\r\n    constructor(templateRef: TemplateRef<NgbPaginationNumberContext>);\r\n}\r\n/**\r\n * A directive to match the 'previous' link template\r\n *\r\n * @since 4.1.0\r\n */\r\nexport declare class NgbPaginationPrevious {\r\n    templateRef: TemplateRef<NgbPaginationLinkContext>;\r\n    constructor(templateRef: TemplateRef<NgbPaginationLinkContext>);\r\n}\r\n/**\r\n * A component that displays page numbers and allows to customize them in several ways.\r\n */\r\nexport declare class NgbPagination implements OnChanges {\r\n    pageCount: number;\r\n    pages: number[];\r\n    tplEllipsis: NgbPaginationEllipsis;\r\n    tplFirst: NgbPaginationFirst;\r\n    tplLast: NgbPaginationLast;\r\n    tplNext: NgbPaginationNext;\r\n    tplNumber: NgbPaginationNumber;\r\n    tplPrevious: NgbPaginationPrevious;\r\n    /**\r\n     * If `true`, pagination links will be disabled.\r\n     */\r\n    disabled: boolean;\r\n    /**\r\n     * If `true`, the \"First\" and \"Last\" page links are shown.\r\n     */\r\n    boundaryLinks: boolean;\r\n    /**\r\n     * If `true`, the \"Next\" and \"Previous\" page links are shown.\r\n     */\r\n    directionLinks: boolean;\r\n    /**\r\n     * If `true`, the ellipsis symbols and first/last page numbers will be shown when `maxSize` > number of pages.\r\n     */\r\n    ellipses: boolean;\r\n    /**\r\n     * Whether to rotate pages when `maxSize` > number of pages.\r\n     *\r\n     * The current page always stays in the middle if `true`.\r\n     */\r\n    rotate: boolean;\r\n    /**\r\n     *  The number of items in your paginated collection.\r\n     *\r\n     *  Note, that this is not the number of pages. Page numbers are calculated dynamically based on\r\n     *  `collectionSize` and `pageSize`. Ex. if you have 100 items in your collection and displaying 20 items per page,\r\n     *  you'll end up with 5 pages.\r\n     */\r\n    collectionSize: number;\r\n    /**\r\n     *  The maximum number of pages to display.\r\n     */\r\n    maxSize: number;\r\n    /**\r\n     *  The current page.\r\n     *\r\n     *  Page numbers start with `1`.\r\n     */\r\n    page: number;\r\n    /**\r\n     *  The number of items per page.\r\n     */\r\n    pageSize: number;\r\n    /**\r\n     *  An event fired when the page is changed. Will fire only if collection size is set and all values are valid.\r\n     *\r\n     *  Event payload is the number of the newly selected page.\r\n     *\r\n     *  Page numbers start with `1`.\r\n     */\r\n    pageChange: EventEmitter<number>;\r\n    /**\r\n     * The pagination display size.\r\n     *\r\n     * Bootstrap currently supports small and large sizes.\r\n     */\r\n    size: 'sm' | 'lg';\r\n    constructor(config: NgbPaginationConfig);\r\n    hasPrevious(): boolean;\r\n    hasNext(): boolean;\r\n    nextDisabled(): boolean;\r\n    previousDisabled(): boolean;\r\n    selectPage(pageNumber: number): void;\r\n    ngOnChanges(changes: SimpleChanges): void;\r\n    isEllipsis(pageNumber: any): boolean;\r\n    /**\r\n     * Appends ellipses and first/last page number to the displayed pages\r\n     */\r\n    private _applyEllipses;\r\n    /**\r\n     * Rotates page numbers based on maxSize items visible.\r\n     * Currently selected page stays in the middle:\r\n     *\r\n     * Ex. for selected page = 6:\r\n     * [5,*6*,7] for maxSize = 3\r\n     * [4,5,*6*,7] for maxSize = 4\r\n     */\r\n    private _applyRotation;\r\n    /**\r\n     * Paginates page numbers based on maxSize items per page.\r\n     */\r\n    private _applyPagination;\r\n    private _setPageInRange;\r\n    private _updatePages;\r\n}\r\n"]}