@cngx/ui 0.1.0-rc.3 → 0.1.0-rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/accordion/README.md +86 -0
  2. package/collection/README.md +167 -0
  3. package/data-grid-accordion/README.md +137 -0
  4. package/fesm2022/cngx-ui-accordion.mjs +853 -0
  5. package/fesm2022/cngx-ui-accordion.mjs.map +1 -0
  6. package/fesm2022/cngx-ui-action-button.mjs +2 -2
  7. package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
  8. package/fesm2022/cngx-ui-breadcrumb.mjs +1044 -0
  9. package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -0
  10. package/fesm2022/cngx-ui-collection.mjs +645 -0
  11. package/fesm2022/cngx-ui-collection.mjs.map +1 -0
  12. package/fesm2022/cngx-ui-data-grid-accordion.mjs +1135 -0
  13. package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -0
  14. package/fesm2022/cngx-ui-empty-state.mjs +2 -2
  15. package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
  16. package/fesm2022/cngx-ui-feedback.mjs +10 -10
  17. package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
  18. package/fesm2022/cngx-ui-mat-accordion.mjs +229 -0
  19. package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -0
  20. package/fesm2022/cngx-ui-paginator.mjs +324 -255
  21. package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
  22. package/fesm2022/cngx-ui-sidenav.mjs +547 -65
  23. package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
  24. package/fesm2022/cngx-ui-tabs.mjs +6 -6
  25. package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
  26. package/fesm2022/cngx-ui.mjs +1 -1
  27. package/mat-accordion/README.md +48 -0
  28. package/package.json +21 -1
  29. package/paginator/README.md +9 -6
  30. package/sidenav/README.md +89 -3
  31. package/types/cngx-ui-accordion.d.ts +801 -0
  32. package/types/cngx-ui-breadcrumb.d.ts +890 -0
  33. package/types/cngx-ui-collection.d.ts +396 -0
  34. package/types/cngx-ui-data-grid-accordion.d.ts +912 -0
  35. package/types/cngx-ui-mat-accordion.d.ts +63 -0
  36. package/types/cngx-ui-paginator.d.ts +258 -146
  37. package/types/cngx-ui-sidenav.d.ts +429 -21
@@ -1 +1 @@
1
- {"version":3,"file":"cngx-ui-paginator.mjs","sources":["../../../projects/ui/paginator/paginator-config.ts","../../../projects/ui/paginator/paginator-host.token.ts","../../../projects/ui/paginator/paginator-announcer.ts","../../../projects/ui/paginator/paginator-loading.directive.ts","../../../projects/ui/paginator/paginator.component.ts","../../../projects/ui/paginator/paginator.component.html","../../../projects/ui/paginator/paginator-glyphs.ts","../../../projects/ui/paginator/segments/paginator-nav.component.ts","../../../projects/ui/paginator/segments/page-model.ts","../../../projects/ui/paginator/segments/paginator-page-window.token.ts","../../../projects/ui/paginator/segments/paginator-pages.component.ts","../../../projects/ui/paginator/segments/paginator-range.component.ts","../../../projects/ui/paginator/segments/paginator-goto.component.ts","../../../projects/ui/paginator/segments/paginator-page-size.component.ts","../../../projects/ui/paginator/segments/paginator-page-of-pages.component.ts","../../../projects/ui/paginator/segments/paginator-dots.component.ts","../../../projects/ui/paginator/segments/paginator-status.component.ts","../../../projects/ui/paginator/segments/paginator-rail.component.ts","../../../projects/ui/paginator/segments/paginator-load-more.component.ts","../../../projects/ui/paginator/segments/paginator-infinite.component.ts","../../../projects/ui/paginator/segments/paginator-alpha.component.ts","../../../projects/ui/paginator/cngx-ui-paginator.ts"],"sourcesContent":["import {\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n Optional,\n SkipSelf,\n type EnvironmentProviders,\n type Provider,\n type TemplateRef,\n} from '@angular/core';\n\n/**\n * Accessible-name strings for the paginator landmark and its segment parts.\n * Library defaults are English; consumers localise via\n * {@link withPaginatorAriaLabels}.\n *\n * @category ui/paginator\n */\nexport interface CngxPaginatorAriaLabels {\n /** Accessible name for the `role=\"navigation\"` landmark. */\n readonly label: string;\n /** First-page button. */\n readonly first: string;\n /** Previous-page button. */\n readonly previous: string;\n /** Next-page button. */\n readonly next: string;\n /** Last-page button. */\n readonly last: string;\n /** A page button, given its 1-based display number. */\n readonly page: (page: number) => string;\n /** The ellipsis overflow trigger that reveals hidden pages. */\n readonly morePages: string;\n /** Page-size selector. */\n readonly itemsPerPage: string;\n /** Go-to-page input. */\n readonly goToPage: string;\n /** Page-of-pages selector (the `current / total` jump dropdown). */\n readonly pageOfPages: string;\n /** Load-more trigger while pages remain (the append-style \"reveal next page\" button). */\n readonly loadMore: string;\n /**\n * Load-more trigger once every page is revealed, given the total item count.\n * Replaces the actionable `loadMore` name on the exhausted (last-page) button\n * so AT does not announce a \"Load more\" action on a disabled control.\n */\n readonly allLoaded: (total: number) => string;\n /** A category/range chip, given its bucket label (e.g. `'A-C'`). */\n readonly bucket: (label: string) => string;\n /**\n * A category/range chip with no matching items, given its bucket label.\n * Names the disabled chip AND states why it is disabled, so an empty bucket\n * is not a silent dead control.\n */\n readonly emptyBucket: (label: string) => string;\n /** Accessible name for the category/range chip strip (`role=\"group\"`). */\n readonly bucketGroup: string;\n /**\n * Accessible name for the `rail` skin's progress rail. Becomes the composed\n * `cngx-progress` `[label]`, so AT reads \"Page position\" with the progressbar\n * value the atom exposes.\n */\n readonly railPosition: string;\n}\n\n/**\n * Display-text formatters for the data-readout segments. Library defaults are\n * English; consumers localise via {@link withPaginatorRangeFormat}.\n *\n * @category ui/paginator\n */\nexport interface CngxPaginatorFormats {\n /**\n * Range-readout text, given the 1-based first item, last item, and total.\n * The `cngx-pgn-range` segment renders the returned string as sanitised HTML,\n * so inline emphasis (e.g. `<b>` around the current range) is honoured; the\n * default bolds the range. Angular's sanitiser strips anything unsafe.\n */\n readonly range: (start: number, end: number, total: number) => string;\n /**\n * Page-status text, given the 1-based current page and total page count.\n * The `cngx-pgn-status` segment renders the returned string as sanitised HTML\n * (the default bolds the page); it is the visible twin of the\n * `announcements.pageChange` live-region phrasing, which stays plain text.\n */\n readonly pageStatus: (page: number, totalPages: number) => string;\n}\n\n/**\n * Live-region announcement phrasing. The paginator announces the effective page\n * on every change (navigation or a `total`-shrink clamp, so the clamp is never\n * silent) and the async busy / settle transitions. Library defaults are\n * English; consumers localise via {@link withPaginatorAnnouncements}.\n *\n * @category ui/paginator\n */\nexport interface CngxPaginatorAnnouncements {\n /** Announced on every page change, given the 1-based page and total pages. */\n readonly pageChange: (page: number, totalPages: number) => string;\n /** Announced when the bound async state becomes busy. */\n readonly loading: string;\n /** Announced when the bound async state settles after being busy. */\n readonly updated: string;\n}\n\n/**\n * Application-wide template-slot defaults. The instance `*cngxPaginatorLoading`\n * slot still wins over the cascade; this tier supplies a shared override when no\n * per-instance slot is projected. Library default is unset (the built-in\n * `CngxProgress` bar renders).\n *\n * @category ui/paginator\n */\nexport interface CngxPaginatorTemplates {\n /** Busy indicator shown while the bound async state is busy. */\n readonly loading?: TemplateRef<unknown>;\n}\n\n/**\n * Resolved paginator configuration. Three required sub-trees - accessible-name\n * strings, live-region announcement phrasing, and data-readout formatters -\n * plus an optional `templates` slot tree, each merged independently by the\n * reducer in {@link provideCngxPaginatorConfig}.\n *\n * @category ui/paginator\n */\nexport interface CngxPaginatorConfig {\n readonly ariaLabels: CngxPaginatorAriaLabels;\n readonly announcements: CngxPaginatorAnnouncements;\n readonly formats: CngxPaginatorFormats;\n readonly templates?: CngxPaginatorTemplates;\n}\n\n/** Library defaults - English. Override via {@link provideCngxPaginatorConfig}. */\nexport const CNGX_PAGINATOR_DEFAULTS: CngxPaginatorConfig = {\n ariaLabels: {\n label: 'Pagination',\n first: 'First page',\n previous: 'Previous page',\n next: 'Next page',\n last: 'Last page',\n page: (page) => `Page ${page}`,\n morePages: 'More pages',\n itemsPerPage: 'Items per page',\n goToPage: 'Go to page',\n pageOfPages: 'Select page',\n loadMore: 'Load more',\n allLoaded: (total) => `All ${total} loaded`,\n bucket: (label) => label,\n emptyBucket: (label) => `${label}, no items`,\n bucketGroup: 'Categories',\n railPosition: 'Page position',\n },\n announcements: {\n pageChange: (page, totalPages) => `Page ${page} of ${totalPages}`,\n loading: 'Loading',\n updated: 'Updated',\n },\n formats: {\n // The readout segments render the formatter output as sanitised HTML, so the\n // current value (the page, or the item range) is emphasised with `<b>`;\n // Angular's sanitiser keeps `<b>` and strips anything dangerous.\n range: (start, end, total) => `<b>${start}-${end}</b> of ${total}`,\n pageStatus: (page, totalPages) => `Page <b>${page}</b> of ${totalPages}`,\n },\n};\n\n/**\n * Configuration cascade token. Resolution priority (high to low):\n * per-instance Input, then `provideCngxPaginatorConfig(...)` at the\n * application root, then the library defaults.\n *\n * @category ui/paginator\n */\nexport const CNGX_PAGINATOR_CONFIG = new InjectionToken<CngxPaginatorConfig>('CngxPaginatorConfig', {\n providedIn: 'root',\n factory: () => CNGX_PAGINATOR_DEFAULTS,\n});\n\n/**\n * A single configuration override produced by a `with*` feature factory.\n * The reducer in {@link provideCngxPaginatorConfig} matches on `kind` and\n * shallow-merges `payload` into the matching sub-tree.\n *\n * @category ui/paginator\n */\nexport type CngxPaginatorConfigFeature =\n | { readonly kind: 'ariaLabels'; readonly payload: Partial<CngxPaginatorAriaLabels> }\n | { readonly kind: 'announcements'; readonly payload: Partial<CngxPaginatorAnnouncements> }\n | { readonly kind: 'formats'; readonly payload: Partial<CngxPaginatorFormats> }\n | { readonly kind: 'templates'; readonly payload: Partial<CngxPaginatorTemplates> };\n\n/** Reduce a feature list onto a base config, merging each sub-tree in isolation. */\nfunction applyFeatures(\n base: CngxPaginatorConfig,\n features: readonly CngxPaginatorConfigFeature[],\n): CngxPaginatorConfig {\n let ariaLabels = base.ariaLabels;\n let announcements = base.announcements;\n let formats = base.formats;\n let templates = base.templates;\n for (const feature of features) {\n if (feature.kind === 'ariaLabels') {\n ariaLabels = { ...ariaLabels, ...feature.payload };\n } else if (feature.kind === 'announcements') {\n announcements = { ...announcements, ...feature.payload };\n } else if (feature.kind === 'formats') {\n formats = { ...formats, ...feature.payload };\n } else {\n templates = { ...templates, ...feature.payload };\n }\n }\n return { ariaLabels, announcements, formats, templates };\n}\n\n/**\n * Override any subset of the paginator accessible-name strings. Per-instance\n * `aria-label` bindings still win over the cascade for the landmark name.\n *\n * ```ts\n * provideCngxPaginatorConfig(\n * withPaginatorAriaLabels({ next: 'Nächste Seite', previous: 'Vorige Seite' }),\n * );\n * ```\n *\n * @category ui/paginator\n */\nexport function withPaginatorAriaLabels(\n payload: Partial<CngxPaginatorAriaLabels>,\n): CngxPaginatorConfigFeature {\n return { kind: 'ariaLabels', payload };\n}\n\n/**\n * Override any subset of the paginator live-region announcement phrasing.\n *\n * ```ts\n * provideCngxPaginatorConfig(\n * withPaginatorAnnouncements({\n * pageChange: (page, total) => `Seite ${page} von ${total}`,\n * loading: 'Wird geladen',\n * updated: 'Aktualisiert',\n * }),\n * );\n * ```\n *\n * @category ui/paginator\n */\nexport function withPaginatorAnnouncements(\n payload: Partial<CngxPaginatorAnnouncements>,\n): CngxPaginatorConfigFeature {\n return { kind: 'announcements', payload };\n}\n\n/**\n * Override the range-readout format. The `cngx-pgn-range` segment renders the\n * returned string verbatim, so this also localises the `of` connector.\n *\n * ```ts\n * provideCngxPaginatorConfig(\n * withPaginatorRangeFormat((start, end, total) => `${start}-${end} von ${total}`),\n * );\n * ```\n *\n * @category ui/paginator\n */\nexport function withPaginatorRangeFormat(\n range: CngxPaginatorFormats['range'],\n): CngxPaginatorConfigFeature {\n return { kind: 'formats', payload: { range } };\n}\n\n/**\n * Override the page-status format. The `cngx-pgn-status` segment renders the\n * returned string verbatim, so this localises the \"Page n of m\" readout that\n * the responsive collapse reveals.\n *\n * ```ts\n * provideCngxPaginatorConfig(\n * withPaginatorPageStatusFormat((page, totalPages) => `Seite ${page} von ${totalPages}`),\n * );\n * ```\n *\n * @category ui/paginator\n */\nexport function withPaginatorPageStatusFormat(\n pageStatus: CngxPaginatorFormats['pageStatus'],\n): CngxPaginatorConfigFeature {\n return { kind: 'formats', payload: { pageStatus } };\n}\n\n/**\n * Supply application-wide template-slot defaults for the paginator. The\n * per-instance `*cngxPaginatorLoading` slot still wins over this tier; it only\n * applies where no instance slot is projected.\n *\n * ```ts\n * provideCngxPaginatorConfig(\n * withPaginatorTemplates({ loading: myBrandedSpinnerTemplate }),\n * );\n * ```\n *\n * @category ui/paginator\n */\nexport function withPaginatorTemplates(\n payload: Partial<CngxPaginatorTemplates>,\n): CngxPaginatorConfigFeature {\n return { kind: 'templates', payload };\n}\n\n/**\n * Application-root configuration cascade for the paginator. Pass any\n * combination of `with*` features in `bootstrapApplication`'s providers.\n * Supplied features deep-merge with the library defaults, so consumers only\n * declare the keys they want to override.\n *\n * @category ui/paginator\n */\nexport function provideCngxPaginatorConfig(\n ...features: CngxPaginatorConfigFeature[]\n): EnvironmentProviders {\n // Empty-features: leave the root default reference untouched so downstream\n // identity comparisons stay stable.\n if (features.length === 0) {\n return makeEnvironmentProviders([]);\n }\n return makeEnvironmentProviders([\n { provide: CNGX_PAGINATOR_CONFIG, useValue: applyFeatures(CNGX_PAGINATOR_DEFAULTS, features) },\n ]);\n}\n\n/**\n * Component-scoped paginator configuration override. Pass into a component's\n * or directive's `viewProviders`; features merge on top of the parent config\n * (an enclosing scope or the application root), so a region can re-phrase its\n * announcements or labels without disturbing the rest of the app.\n *\n * @category ui/paginator\n */\nexport function provideCngxPaginatorConfigAt(\n ...features: CngxPaginatorConfigFeature[]\n): Provider[] {\n return [\n {\n provide: CNGX_PAGINATOR_CONFIG,\n useFactory: (parent: CngxPaginatorConfig | null) =>\n applyFeatures(parent ?? CNGX_PAGINATOR_DEFAULTS, features),\n deps: [[new SkipSelf(), new Optional(), CNGX_PAGINATOR_CONFIG]],\n },\n ];\n}\n\n/**\n * Convenience accessor for the paginator configuration. Runs in injection\n * context; resolves through the cascade. Equivalent to\n * `inject(CNGX_PAGINATOR_CONFIG)`.\n *\n * @category ui/paginator\n */\nexport function injectPaginatorConfig(): CngxPaginatorConfig {\n return inject(CNGX_PAGINATOR_CONFIG);\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/**\n * Read-mostly state-and-navigation contract every paginator segment part\n * injects instead of the concrete `CngxPaginator` shell. \\\n * A structural subset of the `CngxPaginate` brain\n * (`@cngx/common/data`) - the brain provides it via `useExisting`, so a\n * decomposed skin keeps talking to the same token without depending on the\n * organism class (Atomic Decompose, DI abstraction).\n *\n * The signals are the single derivation source for every segment's disabled\n * state, label, and `aria-current`; the methods are the only write paths,\n * each routing through the brain so the clamp-`computed()` and busy-gate\n * invariants hold.\n *\n * @category ui/paginator\n */\nexport interface CngxPaginatorHost {\n /** Current page index (0-based), auto-clamped to `totalPages`. */\n readonly pageIndex: Signal<number>;\n /** Current page size. */\n readonly pageSize: Signal<number>;\n /** Total item count (before pagination). */\n readonly total: Signal<number>;\n /** Total number of pages (minimum 1). */\n readonly totalPages: Signal<number>;\n /** `[start, end]` slice indices for the current page - always in-bounds. */\n readonly range: Signal<readonly [number, number]>;\n /**\n * `[0, end]` cumulative slice indices for append-don't-replace (load-more)\n * consumers - every page revealed so far, sliced from the top.\n */\n readonly cumulativeRange: Signal<readonly [number, number]>;\n /** `true` when on the first page. */\n readonly isFirst: Signal<boolean>;\n /** `true` when on the last page. */\n readonly isLast: Signal<boolean>;\n /** `true` while the bound async state is busy - navigation is gated. */\n readonly isBusy: Signal<boolean>;\n\n /** Navigate to `index`, clamped to `[0, totalPages - 1]`. No-op while busy. */\n setPage(index: number): void;\n /** Change page size; resets to page 0 unless `resetPage` is `false`. No-op while busy. */\n setPageSize(size: number, resetPage?: boolean): void;\n /** Navigate to the next page (no-op on the last page). */\n next(): void;\n /** Navigate to the previous page (no-op on the first page). */\n previous(): void;\n /** Navigate to the first page. */\n first(): void;\n /** Navigate to the last page. */\n last(): void;\n}\n\n/**\n * DI token the `CngxPaginator` shell provides via `useExisting`. Segment\n * parts (`cngx-pgn-prev`, `cngx-pgn-pages`, ...) inject this rather than the\n * concrete component class, keeping the organism decompose-ready.\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-host.token.ts\n * @since 0.1.0\n */\nexport const CNGX_PAGINATOR_HOST = new InjectionToken<CngxPaginatorHost>('CngxPaginatorHost');\n","import { computed, inject, InjectionToken, linkedSignal, type Signal } from '@angular/core';\n\nimport { injectPaginatorConfig } from './paginator-config';\nimport { CNGX_PAGINATOR_HOST } from './paginator-host.token';\n\n/**\n * Reactive announcement source for the paginator live region.\n *\n * @category ui/paginator\n */\nexport interface CngxPaginatorAnnouncer {\n /**\n * The current message to render inside the `cngxLiveRegion` span. Changes\n * (and only changes) are spoken by assistive technology.\n */\n readonly message: Signal<string>;\n}\n\n/** What the announcer is reacting to, sampled together so transitions are atomic. */\ninterface AnnouncerSource {\n readonly page: number;\n readonly totalPages: number;\n readonly busy: boolean;\n}\n\n/**\n * Builds the paginator live-region message as a single derived signal - no\n * class logic baked into the shell, so the skin still ejects cleanly. The\n * message is a `linkedSignal` over `[pageIndex, totalPages, isBusy]` from\n * {@link CNGX_PAGINATOR_HOST}: it speaks \"Page N of M\" on every effective-page\n * change (navigation OR a `total`-shrink clamp, so the clamp is never silent),\n * \"Loading\" while busy, and \"Updated\" on the first settle after busy. Phrasing\n * comes from {@link injectPaginatorConfig}.\n *\n * The previous source value (held by `linkedSignal`) is what distinguishes a\n * settle from a steady state, so there is no signal write in an `effect` and no\n * imperative `previous` tracking. Identical consecutive messages dedupe through\n * the signal's value equality, so the live region never re-announces a no-op.\n *\n * Must run in an injection context (call as a field initialiser on the shell).\n *\n * @category ui/paginator\n */\nexport function createPaginatorAnnouncer(): CngxPaginatorAnnouncer {\n const host = inject(CNGX_PAGINATOR_HOST);\n const config = injectPaginatorConfig();\n\n // Sample the three drivers together so a transition is atomic. The field-wise\n // `equal` keeps the source reference stable across a recompute that yields an\n // identical tuple, so the linkedSignal computation never re-runs on a no-op\n // (equality rule: an object-returning computed carries an explicit equal).\n const source = computed<AnnouncerSource>(\n () => ({\n page: host.pageIndex(),\n totalPages: host.totalPages(),\n busy: host.isBusy(),\n }),\n { equal: (a, b) => a.page === b.page && a.totalPages === b.totalPages && a.busy === b.busy },\n );\n\n const message = linkedSignal<AnnouncerSource, string>({\n source,\n computation: (current, previous) => {\n const { announcements } = config;\n if (current.busy) {\n return announcements.loading;\n }\n // Just left a busy state: announce the settle once, before page phrasing.\n if (previous?.source.busy) {\n return announcements.updated;\n }\n return announcements.pageChange(current.page + 1, current.totalPages);\n },\n });\n\n return { message };\n}\n\n/** The shape an override must match to swap the announcer derivation. */\nexport type CngxPaginatorAnnouncerFactory = () => CngxPaginatorAnnouncer;\n\n/**\n * Swap token for the live-region announcer derivation. The default resolves to\n * {@link createPaginatorAnnouncer}; the shell builds its announcer via\n * `inject(CNGX_PAGINATOR_ANNOUNCER_FACTORY)()` rather than calling the factory\n * directly. Override it to wrap the busy / settle / page-change derivation - a\n * telemetry tap, politeness escalation, or custom phrasing branch - without\n * forking the shell (mirrors `CNGX_COMMIT_ERROR_ANNOUNCER_FACTORY` in the\n * select family). The override runs in the shell's injection context, so it can\n * still `inject(CNGX_PAGINATOR_HOST)` / {@link injectPaginatorConfig}.\n *\n * @category ui/paginator\n */\nexport const CNGX_PAGINATOR_ANNOUNCER_FACTORY =\n new InjectionToken<CngxPaginatorAnnouncerFactory>('CngxPaginatorAnnouncerFactory', {\n providedIn: 'root',\n factory: () => createPaginatorAnnouncer,\n });\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Overrides the paginator's built-in busy indicator. Project a structural\n * `*cngxPaginatorLoading` template inside `<cngx-paginator>` and the shell\n * renders it - instead of the default `<cngx-progress>` bar - while the bound\n * async state is busy. Resolution cascades instance slot ->\n * `CngxPaginatorConfig.templates.loading` -> built-in `CngxProgress`.\n *\n * ```html\n * <cngx-paginator [state]=\"state\">\n * <ng-template cngxPaginatorLoading>\n * <my-branded-spinner />\n * </ng-template>\n * <cngx-pgn-pages />\n * </cngx-paginator>\n * ```\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-loading.directive.ts\n * @since 0.1.0\n * @relatedTo CngxPaginator, CngxProgress\n */\n@Directive({ selector: '[cngxPaginatorLoading]', standalone: true, exportAs: 'cngxPaginatorLoading' })\nexport class CngxPaginatorLoading {\n readonly templateRef = inject(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n DestroyRef,\n effect,\n inject,\n input,\n output,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxLiveRegion } from '@cngx/common/a11y';\nimport { CngxPaginate, connectPaginateResetOn } from '@cngx/common/data';\nimport { CngxProgress } from '@cngx/ui/feedback';\n\nimport { CNGX_PAGINATOR_ANNOUNCER_FACTORY } from './paginator-announcer';\nimport { injectPaginatorConfig } from './paginator-config';\nimport { CNGX_PAGINATOR_HOST } from './paginator-host.token';\nimport { CngxPaginatorLoading } from './paginator-loading.directive';\n\n/** Visual skin. Paint-only - structure, ARIA, and keyboard behaviour are identical across values. */\nexport type CngxPaginatorSkin =\n | 'numbered'\n | 'minimal'\n | 'pill'\n | 'segmented'\n | 'rail'\n | 'dots'\n | 'bar';\n\n/** Density preset. Shifts spacing/hit-target tokens; orthogonal to skin. */\nexport type CngxPaginatorDensity = 'compact' | 'default' | 'comfortable';\n\n/**\n * Declarative, skinnable pagination organism. A thin shell over the\n * `CngxPaginate` brain (applied as a `hostDirective`), assembled by the\n * consumer from projected segment parts in DOM order - no `show*` config\n * inputs. `skin` / `density` are single paint attributes reflected onto\n * `[data-skin]` / `[data-density]`.\n *\n * Two-way `[(pageIndex)]` / `[(pageSize)]`: the brain's controlled inputs are\n * aliased through `hostDirectives` (`cngxPageIndex` -> `pageIndex`,\n * `cngxPageSize` -> `pageSize`); the shell owns the matching\n * `pageIndexChange` / `pageSizeChange` outputs and is their single emitter,\n * guarded by the shared `lastEmitted*` fields. Two paths feed each output once:\n * (1) a subscription forwards the brain's nav-only `pageChange` /\n * `pageSizeChange` - the only signal that captures a controlled-mode `setPage`,\n * because the brain's `pageIndex()` stays pinned to the input until the\n * consumer feeds it back; (2) an `effect()` reads the effective\n * `pageIndex()` / `pageSize()` and covers a `total`-shrink clamp the nav-only\n * output misses. The brain output is forwarded, NOT aliased through\n * `hostDirectives`: a raw alias would bypass the shared guard and double-emit\n * on uncontrolled navigation. The guard makes every distinct value emit exactly\n * once across both paths and both modes, so the clamp echoes back to controlled\n * consumers (and, from Phase E, is announced) without a double-fire.\n *\n * All ARIA attributes are signal-driven. `aria-busy` has a single owner here.\n *\n * @category ui/paginator\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator.component.ts\n * @since 0.1.0\n * @relatedTo CngxPaginate, CngxMatPaginator\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-behaviors/reset-on-filter</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-behaviors/url-synced-paging</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-contexts/card-grid</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-contexts/paginated-list</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-contexts/select-panel-footer</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-modes/infinite</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-modes/load-more</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/async-loading</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/ellipsis-overflow</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/first-and-last</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/go-to-page</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/page-size-and-range</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/bar</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/dots</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/minimal</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/numbered</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/pill</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/rail</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/segmented</example-url>\n */\n@Component({\n selector: 'cngx-paginator',\n exportAs: 'cngxPaginator',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxProgress, CngxLiveRegion, NgTemplateOutlet],\n templateUrl: './paginator.component.html',\n styleUrls: ['../../common/data/paginate/styles/paginator-base.css', './paginator.component.css'],\n hostDirectives: [\n {\n directive: CngxPaginate,\n inputs: ['cngxPageIndex: pageIndex', 'cngxPageSize: pageSize', 'total', 'state'],\n },\n ],\n providers: [{ provide: CNGX_PAGINATOR_HOST, useExisting: CngxPaginate }],\n host: {\n class: 'cngx-paginator',\n role: 'navigation',\n '[attr.aria-label]': 'resolvedAriaLabel()',\n '[attr.aria-busy]': 'paginate.isBusy()',\n '[attr.data-skin]': 'skin()',\n '[attr.data-density]': 'density()',\n '[attr.data-responsive]': \"responsive() ? '' : null\",\n },\n})\nexport class CngxPaginator {\n /** Accessible name for the navigation landmark. Overrides the config default. */\n readonly ariaLabel = input<string | undefined>(undefined, { alias: 'aria-label' });\n /** Visual skin; reflected onto `[data-skin]`. */\n readonly skin = input<CngxPaginatorSkin>('numbered');\n /** Density preset; reflected onto `[data-density]`. */\n readonly density = input<CngxPaginatorDensity>('default');\n /**\n * Opt into the responsive collapse; reflected onto `[data-responsive]`. When\n * set, a `@container` rule swaps the projected `cngx-pgn-pages` number row for\n * a `cngx-pgn-status` \"Page n of m\" readout once the paginator's own container\n * narrows past the collapse breakpoint. Compose both segments for it to apply.\n */\n readonly responsive = input(false, { transform: booleanAttribute });\n\n /**\n * Reset key. When its value changes (after the initial render) the paginator\n * jumps to the first page - bind the sort / filter / search value a result set\n * depends on so a narrowed result never strands the user on a now-empty page.\n * Bind a primitive or a `computed`; an inline array / object literal\n * recomputes every change-detection pass and would reset on each. Shares the\n * `connectPaginateResetOn` implementation with `[cngxPaginateResetOn]`.\n */\n readonly resetOn = input<unknown>(undefined);\n\n /** Emits the effective page index on every change - navigation or `total`-shrink clamp. */\n readonly pageIndexChange = output<number>();\n /** Emits the effective page size on every change. */\n readonly pageSizeChange = output<number>();\n\n protected readonly paginate = inject(CngxPaginate);\n protected readonly config = injectPaginatorConfig();\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Live-region message source - mounted onto the `cngxLiveRegion` span in the\n * template. Built through the swap token so a consumer can wrap the\n * busy / settle / page-change derivation without forking the shell.\n */\n protected readonly announcer = inject(CNGX_PAGINATOR_ANNOUNCER_FACTORY)();\n\n protected readonly resolvedAriaLabel = computed(\n () => this.ariaLabel() ?? this.config.ariaLabels.label,\n );\n\n // Loading-slot cascade: instance *cngxPaginatorLoading -> config default ->\n // built-in <cngx-progress>. Direct contentChild field initialiser (AOT\n // NG8110 rejects it from a helper). Returns existing TemplateRef references\n // or null - reference-stable, so no explicit equal fn is needed.\n protected readonly loadingSlot = contentChild(CngxPaginatorLoading, { read: TemplateRef });\n protected readonly loadingTemplate = computed(\n () => this.loadingSlot() ?? this.config.templates?.loading ?? null,\n );\n\n // Shared last-emitted guards across the nav (subscription) and clamp (effect)\n // paths. Plain non-signal fields, so the effects carry no signal write.\n // Seeded with the current effective values so mounting emits no initial change.\n private lastEmittedIndex = this.paginate.pageIndex();\n private lastEmittedSize = this.paginate.pageSize();\n\n constructor() {\n // Reset-on-change, shared verbatim with the bridge input and the generic\n // [cngxPaginateResetOn] directive.\n connectPaginateResetOn(this.paginate, this.resetOn);\n\n // Nav path. Forward the brain's nav-only outputs: in controlled mode a\n // setPage leaves the effective pageIndex() pinned to the input, so this\n // event is the only thing that reports the navigation. Forwarded (not\n // aliased) so the guard is shared with the clamp effect below.\n const indexSub = this.paginate.pageChange.subscribe((index) => {\n if (index !== this.lastEmittedIndex) {\n this.lastEmittedIndex = index;\n this.pageIndexChange.emit(index);\n }\n });\n const sizeSub = this.paginate.pageSizeChange.subscribe((size) => {\n if (size !== this.lastEmittedSize) {\n this.lastEmittedSize = size;\n this.pageSizeChange.emit(size);\n }\n });\n this.destroyRef.onDestroy(() => {\n indexSub.unsubscribe();\n sizeSub.unsubscribe();\n });\n\n // Clamp path. The effective pageIndex moved without a nav (a total-shrink\n // clamp the nav-only pageChange misses). The shared guard means a value the\n // nav path already emitted is a no-op here, so each change emits once.\n effect(() => {\n const index = this.paginate.pageIndex();\n if (index !== this.lastEmittedIndex) {\n this.lastEmittedIndex = index;\n this.pageIndexChange.emit(index);\n }\n });\n effect(() => {\n const size = this.paginate.pageSize();\n if (size !== this.lastEmittedSize) {\n this.lastEmittedSize = size;\n this.pageSizeChange.emit(size);\n }\n });\n }\n}\n","@if (paginate.isBusy()) {\n @if (loadingTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <cngx-progress\n class=\"cngx-paginator__progress\"\n variant=\"linear\"\n [state]=\"paginate.state()\"\n [label]=\"config.announcements.loading\"\n />\n }\n}\n\n<ng-content />\n\n<span cngxLiveRegion class=\"cngx-paginator__sr\">{{ announcer.message() }}</span>\n","/**\n * Default text glyphs for the paginator segments. Internal and non-exported -\n * mirrors `CNGX_SELECT_GLYPHS`. The library ships no icon font; these unicode\n * marks are the out-of-the-box chevrons and the overflow ellipsis. Consumers\n * restyle visually via CSS rather than by swapping these characters.\n *\n * Centralised so the chevron / ellipsis literals live in one place instead of\n * being duplicated across the segment classes.\n */\nexport const CNGX_PAGINATOR_GLYPHS = {\n /** First-page nav (double left-pointing angle quotation mark). */\n first: '«',\n /** Previous-page nav (single left-pointing angle quotation mark). */\n previous: '‹',\n /** Next-page nav (single right-pointing angle quotation mark). */\n next: '›',\n /** Last-page nav (double right-pointing angle quotation mark). */\n last: '»',\n /** Ellipsis trigger that opens the hidden-pages overflow menu. */\n more: '…',\n /** Dropdown caret on the page-size / page-of-pages select triggers. */\n caret: '▾',\n} as const;\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n type Signal,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxIcon } from '@cngx/common/display';\nimport { CngxRipple } from '@cngx/common/interactive';\n\nimport { injectPaginatorConfig, type CngxPaginatorAriaLabels } from '../paginator-config';\nimport { CNGX_PAGINATOR_GLYPHS } from '../paginator-glyphs';\nimport { CNGX_PAGINATOR_HOST, type CngxPaginatorHost } from '../paginator-host.token';\n\n/** Config keys the four nav segments label their button with. */\ntype NavAriaKey = keyof Pick<CngxPaginatorAriaLabels, 'first' | 'previous' | 'next' | 'last'>;\n\ninterface NavCoreOptions {\n /** `true` when the page is at the bound this segment navigates toward. */\n readonly atBound: (host: CngxPaginatorHost) => boolean;\n /** The single host method this segment owns. */\n readonly action: (host: CngxPaginatorHost) => void;\n /** Config key for the button's accessible label. */\n readonly ariaKey: NavAriaKey;\n}\n\ninterface NavCore {\n readonly disabled: Signal<boolean>;\n readonly ariaLabel: Signal<string>;\n activate(): void;\n}\n\n/**\n * Shared nav-button glue. Composition, not an abstract base class: each of the\n * four segments calls this factory as a field initialiser and binds the same\n * template, differing only in selector, glyph, and the three options here.\n */\nfunction createPaginatorNavCore(options: NavCoreOptions): NavCore {\n const host = inject(CNGX_PAGINATOR_HOST);\n const config = injectPaginatorConfig();\n const disabled = computed(() => host.isBusy() || options.atBound(host));\n const ariaLabel = computed(() => config.ariaLabels[options.ariaKey]);\n return {\n disabled,\n ariaLabel,\n activate: () => {\n if (disabled()) {\n return;\n }\n options.action(host);\n },\n };\n}\n\n// Shared template - identical across the four segments; only the glyph differs.\n// `aria-disabled` (not native `disabled`) keeps the button focusable so AT users\n// hear the bound state; `activate()` guards the click.\nconst NAV_TEMPLATE = `\n <button\n type=\"button\"\n class=\"cngx-paginator__button cngx-paginator__nav\"\n cngxRipple\n [attr.aria-disabled]=\"core.disabled()\"\n (click)=\"core.activate()\"\n >\n <cngx-icon aria-hidden=\"true\">{{ glyph }}</cngx-icon>\n <span class=\"cngx-paginator__nav-label\">{{ core.ariaLabel() }}</span>\n </button>\n`;\n\n// Angular's compiler needs literal decorator metadata per component (no\n// spreads), so the shared parts are duplicated inline; the behavioural glue\n// stays factored in createPaginatorNavCore and the markup in NAV_TEMPLATE.\n\n/** First-page segment. Disabled on the first page; calls `host.first()`.\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/first-and-last</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/bar</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/numbered</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/pill</example-url>\n*/\n@Component({\n selector: 'cngx-pgn-first',\n exportAs: 'cngxPgnFirst',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxIcon, CngxRipple],\n template: NAV_TEMPLATE,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorFirst {\n protected readonly glyph = CNGX_PAGINATOR_GLYPHS.first;\n protected readonly core = createPaginatorNavCore({\n atBound: (host) => host.isFirst(),\n action: (host) => host.first(),\n ariaKey: 'first',\n });\n}\n\n/** Previous-page segment. Disabled on the first page; calls `host.previous()`.\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-behaviors/reset-on-filter</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-behaviors/url-synced-paging</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-contexts/card-grid</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-contexts/paginated-list</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-contexts/select-panel-footer</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/async-loading</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/ellipsis-overflow</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/first-and-last</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/go-to-page</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/page-size-and-range</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/bar</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/minimal</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/numbered</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/pill</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/rail</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/segmented</example-url>\n*/\n@Component({\n selector: 'cngx-pgn-prev',\n exportAs: 'cngxPgnPrev',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxIcon, CngxRipple],\n template: NAV_TEMPLATE,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorPrev {\n protected readonly glyph = CNGX_PAGINATOR_GLYPHS.previous;\n protected readonly core = createPaginatorNavCore({\n atBound: (host) => host.isFirst(),\n action: (host) => host.previous(),\n ariaKey: 'previous',\n });\n}\n\n/** Next-page segment. Disabled on the last page; calls `host.next()`.\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-behaviors/reset-on-filter</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-behaviors/url-synced-paging</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-contexts/card-grid</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-contexts/paginated-list</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-contexts/select-panel-footer</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/async-loading</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/ellipsis-overflow</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/first-and-last</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/go-to-page</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/page-size-and-range</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/bar</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/minimal</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/numbered</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/pill</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/rail</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/segmented</example-url>\n*/\n@Component({\n selector: 'cngx-pgn-next',\n exportAs: 'cngxPgnNext',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxIcon, CngxRipple],\n template: NAV_TEMPLATE,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorNext {\n protected readonly glyph = CNGX_PAGINATOR_GLYPHS.next;\n protected readonly core = createPaginatorNavCore({\n atBound: (host) => host.isLast(),\n action: (host) => host.next(),\n ariaKey: 'next',\n });\n}\n\n/** Last-page segment. Disabled on the last page; calls `host.last()`.\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/first-and-last</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/bar</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/numbered</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/pill</example-url>\n*/\n@Component({\n selector: 'cngx-pgn-last',\n exportAs: 'cngxPgnLast',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxIcon, CngxRipple],\n template: NAV_TEMPLATE,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorLast {\n protected readonly glyph = CNGX_PAGINATOR_GLYPHS.last;\n protected readonly core = createPaginatorNavCore({\n atBound: (host) => host.isLast(),\n action: (host) => host.last(),\n ariaKey: 'last',\n });\n}\n","// Internal pure page-window math for `cngx-pgn-pages`. Not part of the public\n// API - the segment is the only consumer. 0-based throughout (matching the\n// brain's `pageIndex`); the rendered display number is `index + 1`.\n\n/** One slot in the rendered page row: a page button or a truncation gap. */\nexport type PageItem =\n | { readonly kind: 'page'; readonly index: number }\n | { readonly kind: 'gap'; readonly hidden: readonly number[] };\n\n/** The rendered sequence plus the gap count (a cheap structural fingerprint). */\nexport interface PageWindow {\n readonly pages: readonly PageItem[];\n readonly gaps: number;\n}\n\nfunction range(start: number, end: number): number[] {\n const length = end - start + 1;\n return length > 0 ? Array.from({ length }, (_, i) => start + i) : [];\n}\n\n/**\n * Compute the windowed page sequence around `current` for `total` pages.\n * A run of more than one hidden page collapses into a `gap` carrying the hidden\n * 0-based indices (the ellipsis menu's options); a single hidden page renders\n * as a plain page button instead of a gap. Derived from the MUI `usePagination`\n * range algorithm, 0-based. `siblingCount` is how many pages flank `current` on\n * each side; `boundaryCount` is how many pages are pinned at each end. Both\n * default to `1`, reproducing the v1 window byte-for-byte; the `cngx-pgn-pages`\n * inputs and {@link CNGX_PAGINATOR_PAGE_WINDOW_FACTORY} feed non-default values.\n */\nexport function pageWindow(\n current: number,\n total: number,\n siblingCount = 1,\n boundaryCount = 1,\n): PageWindow {\n const count = Math.max(1, total);\n const page = Math.min(Math.max(current, 0), count - 1) + 1; // 1-based, clamped\n\n const startPages = range(1, Math.min(boundaryCount, count));\n const endPages = range(Math.max(count - boundaryCount + 1, boundaryCount + 1), count);\n\n const siblingsStart = Math.max(\n Math.min(page - siblingCount, count - boundaryCount - siblingCount * 2 - 1),\n boundaryCount + 2,\n );\n const siblingsEnd = Math.min(\n Math.max(page + siblingCount, boundaryCount + siblingCount * 2 + 2),\n endPages.length > 0 ? endPages[0] - 2 : count - 1,\n );\n\n const startHidden = range(boundaryCount + 1, siblingsStart - 1);\n const endHidden = range(siblingsEnd + 1, count - boundaryCount);\n\n const itemList: (number | 'start-gap' | 'end-gap')[] = [\n ...startPages,\n ...(siblingsStart > boundaryCount + 2\n ? ['start-gap' as const]\n : boundaryCount + 1 < count - boundaryCount\n ? [boundaryCount + 1]\n : []),\n ...range(siblingsStart, siblingsEnd),\n ...(siblingsEnd < count - boundaryCount - 1\n ? ['end-gap' as const]\n : count - boundaryCount > boundaryCount\n ? [count - boundaryCount]\n : []),\n ...endPages,\n ];\n\n let gaps = 0;\n const pages: PageItem[] = itemList.map((entry) => {\n if (entry === 'start-gap') {\n gaps++;\n return { kind: 'gap', hidden: startHidden.map((n) => n - 1) };\n }\n if (entry === 'end-gap') {\n gaps++;\n return { kind: 'gap', hidden: endHidden.map((n) => n - 1) };\n }\n return { kind: 'page', index: entry - 1 };\n });\n\n return { pages, gaps };\n}\n\n/**\n * Structural equality for two page windows. The `equal` fn for the segment's\n * `computed()` - keeps the reference stable across recomputes that yield an\n * identical window, so downstream `@for` does not churn.\n */\nexport function pageWindowEqual(a: PageWindow, b: PageWindow): boolean {\n if (a === b) {\n return true;\n }\n if (a.gaps !== b.gaps || a.pages.length !== b.pages.length) {\n return false;\n }\n for (let i = 0; i < a.pages.length; i++) {\n const pa = a.pages[i];\n const pb = b.pages[i];\n if (pa.kind !== pb.kind) {\n return false;\n }\n if (pa.kind === 'page' && pb.kind === 'page') {\n if (pa.index !== pb.index) {\n return false;\n }\n } else if (pa.kind === 'gap' && pb.kind === 'gap') {\n if (pa.hidden.length !== pb.hidden.length || pa.hidden.some((h, j) => h !== pb.hidden[j])) {\n return false;\n }\n }\n }\n return true;\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { pageWindow, type PageWindow } from './page-model';\n\n/**\n * The page-window computation `cngx-pgn-pages` calls per recompute: given the\n * current 0-based page, the total page count, and the per-instance\n * `siblingCount` / `boundaryCount`, return the rendered {@link PageWindow}. An\n * override implements a different truncation algorithm while still honouring the\n * consumer's sibling / boundary intent.\n *\n * @category ui/paginator\n */\nexport type CngxPaginatorPageWindowFn = (\n current: number,\n total: number,\n siblingCount: number,\n boundaryCount: number,\n) => PageWindow;\n\n/** The shape an override must match to swap the page-window computation. */\nexport type CngxPaginatorPageWindowFactory = () => CngxPaginatorPageWindowFn;\n\n/**\n * Default page-window factory. Resolves to the built-in {@link pageWindow} math\n * (one sibling each side, one pinned boundary at each end at the `1 / 1`\n * defaults). The segment builds its window via\n * `inject(CNGX_PAGINATOR_PAGE_WINDOW_FACTORY)()` rather than calling this\n * directly, mirroring {@link createPaginatorAnnouncer}.\n *\n * @category ui/paginator\n */\nexport const createPaginatorPageWindow: CngxPaginatorPageWindowFactory = () => pageWindow;\n\n/**\n * Swap token for the page-row truncation algorithm. The default resolves to\n * {@link createPaginatorPageWindow}; override it to replace the whole windowing\n * computation enterprise-wide (via `providers`) or per-component (via\n * `viewProviders`) without forking the segment. Per-instance tweaks to the\n * sibling / boundary counts use the `[siblingCount]` / `[boundaryCount]` inputs\n * on `cngx-pgn-pages` instead. Mirrors {@link CNGX_PAGINATOR_ANNOUNCER_FACTORY}.\n *\n * @category ui/paginator\n */\nexport const CNGX_PAGINATOR_PAGE_WINDOW_FACTORY =\n new InjectionToken<CngxPaginatorPageWindowFactory>('CngxPaginatorPageWindowFactory', {\n providedIn: 'root',\n factory: () => createPaginatorPageWindow,\n });\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n linkedSignal,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxRovingItem, CngxRovingTabindex } from '@cngx/common/a11y';\nimport { CngxListbox, CngxListboxTrigger, CngxOption } from '@cngx/common/interactive';\nimport { CngxPopover, CngxPopoverTrigger } from '@cngx/common/popover';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_GLYPHS } from '../paginator-glyphs';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\nimport { pageWindowEqual, type PageWindow } from './page-model';\nimport { CNGX_PAGINATOR_PAGE_WINDOW_FACTORY } from './paginator-page-window.token';\n\n/**\n * The numbered page row. One tab stop via `CngxRovingTabindex` (arrows / Home /\n * End move the active page button); the current page carries `aria-current`.\n * A truncation run collapses into an ellipsis button that opens a `CngxListbox`\n * grid of the hidden pages (same select-and-jump model as `cngx-pgn-page-of-pages`,\n * so focus moves into the panel on open).\n *\n * @category ui/paginator\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-behaviors/reset-on-filter</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-contexts/card-grid</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-contexts/paginated-list</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/async-loading</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/ellipsis-overflow</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/first-and-last</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/bar</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/numbered</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/pill</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/rail</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/segmented</example-url>\n */\n@Component({\n selector: 'cngx-pgn-pages',\n exportAs: 'cngxPgnPages',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n CngxRovingTabindex,\n CngxRovingItem,\n CngxListbox,\n CngxListboxTrigger,\n CngxOption,\n CngxPopover,\n CngxPopoverTrigger,\n ],\n template: `\n <div class=\"cngx-paginator__pages\" cngxRovingTabindex [(activeIndex)]=\"rovingIndex\">\n @for (item of model().pages; track $index) {\n @if (item.kind === 'page') {\n <button\n type=\"button\"\n cngxRovingItem\n class=\"cngx-paginator__button cngx-paginator__page\"\n [class.cngx-paginator__page--current]=\"isCurrent(item.index)\"\n [attr.aria-current]=\"isCurrent(item.index) ? 'page' : null\"\n [attr.aria-label]=\"config.ariaLabels.page(item.index + 1)\"\n [attr.aria-disabled]=\"host.isBusy() ? 'true' : null\"\n (click)=\"goto(item.index)\"\n >\n {{ item.index + 1 }}\n </button>\n } @else {\n <button\n type=\"button\"\n cngxRovingItem\n #moreBtn\n class=\"cngx-paginator__button cngx-paginator__more\"\n [cngxListboxTrigger]=\"moreList\"\n [cngxPopoverTrigger]=\"morePopover\"\n [haspopup]=\"'listbox'\"\n [popover]=\"morePopover\"\n [attr.aria-label]=\"config.ariaLabels.morePages\"\n (click)=\"openOverflow(morePopover, moreUl)\"\n >\n {{ glyphs.more }}\n </button>\n <div cngxPopover #morePopover=\"cngxPopover\" (toggle)=\"onOverflowToggle($event, moreBtn)\">\n <ul\n cngxListbox\n #moreList=\"cngxListbox\"\n #moreUl\n tabindex=\"0\"\n class=\"cngx-paginator__overflow-panel\"\n [label]=\"config.ariaLabels.morePages\"\n [value]=\"null\"\n (valueChange)=\"onSelectOverflow($event)\"\n >\n @for (hidden of item.hidden; track hidden) {\n <li cngxOption class=\"cngx-paginator__option\" [value]=\"hidden\">{{ hidden + 1 }}</li>\n }\n </ul>\n </div>\n }\n }\n </div>\n `,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorPages {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n protected readonly config = injectPaginatorConfig();\n protected readonly glyphs = CNGX_PAGINATOR_GLYPHS;\n\n /** Pages flanking the current page on each side. Defaults to the v1 window. */\n readonly siblingCount = input<number>(1);\n /** Pages pinned at each end. Defaults to the v1 window. */\n readonly boundaryCount = input<number>(1);\n\n /** The page-window computation, swappable enterprise-wide via the DI token. */\n private readonly pageWindowFn = inject(CNGX_PAGINATOR_PAGE_WINDOW_FACTORY)();\n\n /**\n * The rendered page window. Structural `equal` keeps the reference stable\n * across recomputes that yield an identical window, so the `@for` does not\n * churn (signal-equality rule).\n */\n protected readonly model = computed<PageWindow>(\n () =>\n this.pageWindowFn(\n this.host.pageIndex(),\n this.host.totalPages(),\n this.siblingCount(),\n this.boundaryCount(),\n ),\n { equal: pageWindowEqual },\n );\n\n /** Position of the active page within the rendered window (gaps counted). */\n private readonly activeWindowIndex = computed<number>(() => {\n const current = this.host.pageIndex();\n const idx = this.model().pages.findIndex(\n (item) => item.kind === 'page' && item.index === current,\n );\n return idx === -1 ? 0 : idx;\n });\n\n /**\n * Roving focus cursor for the page row. A `linkedSignal` so the row's single\n * tab stop tracks the active page (Tab lands on `aria-current`) yet still\n * moves freely under the arrow keys between selections: arrow navigation\n * writes the cursor locally, and it re-syncs to the active page whenever the\n * page changes by any path (click / prev / next / Enter). Focus is not\n * selection - the user arrows to a page and Enter commits it.\n */\n protected readonly rovingIndex = linkedSignal<number>(() => this.activeWindowIndex());\n\n protected isCurrent(index: number): boolean {\n return index === this.host.pageIndex();\n }\n\n protected goto(index: number): void {\n this.host.setPage(index);\n }\n\n /**\n * Open the overflow popover and move focus into the listbox panel, so a\n * keyboard user lands in the grid (the trigger is a roving page-row item, so\n * the listbox trigger's own focus-move does not fire). `Enter`/`Space` on the\n * button dispatch a native click, so this covers mouse and keyboard alike.\n */\n protected openOverflow(popover: { toggle(): void; isVisible(): boolean }, panel: HTMLElement): void {\n popover.toggle();\n if (popover.isVisible()) {\n queueMicrotask(() => panel.focus());\n }\n }\n\n /**\n * Restore focus to the ellipsis trigger when the panel closes (Escape /\n * outside click), so a keyboard user is not dropped to the page body. If a\n * selection re-rendered the window away, the trigger is gone and the guard\n * skips it.\n */\n protected onOverflowToggle(event: Event, trigger: HTMLElement): void {\n if ((event as ToggleEvent).newState === 'closed' && trigger.isConnected) {\n trigger.focus();\n }\n }\n\n protected onSelectOverflow(value: number | null | undefined): void {\n if (typeof value === 'number') {\n this.host.setPage(value);\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/**\n * Range-readout segment: renders `start-end of total` for the current page.\n * Pure derivation from the host `range()`/`total()` signals - no local state,\n * no writes. The text (including the `of` connector) comes from the\n * config range formatter, so it localises with the rest of the cascade. Tabular\n * figures keep the numerals from reflowing as the page changes.\n *\n * @category ui/paginator\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-behaviors/reset-on-filter</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-behaviors/url-synced-paging</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-contexts/paginated-list</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-contexts/select-panel-footer</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/page-size-and-range</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/bar</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/minimal</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/numbered</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/rail</example-url>\n */\n@Component({\n selector: 'cngx-pgn-range',\n exportAs: 'cngxPgnRange',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `<span class=\"cngx-paginator__range\" [innerHTML]=\"text()\"></span>`,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorRange {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n private readonly config = injectPaginatorConfig();\n\n /** 1-based index of the first item on the current page (0 when empty). */\n protected readonly start = computed<number>(() =>\n this.host.total() === 0 ? 0 : this.host.range()[0] + 1,\n );\n\n /**\n * 1-based index of the last item on the current page. The brain's `range()`\n * upper bound is uncapped (`start + pageSize`), so a partial final page is\n * clamped to `total` here for an honest readout.\n */\n protected readonly end = computed<number>(() =>\n Math.min(this.host.range()[1], this.host.total()),\n );\n\n /** Formatted readout from the config range formatter (EN default `start-end of total`). */\n protected readonly text = computed<string>(() =>\n this.config.formats.range(this.start(), this.end(), this.host.total()),\n );\n}\n","import { ChangeDetectionStrategy, Component, inject, ViewEncapsulation } from '@angular/core';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/**\n * Go-to-page segment: a native `<input type=\"number\">`. Typing (or the spinner)\n * navigates live via `input`; Enter / blur additionally clamp and re-sync the\n * field. The brain clamps out-of-range values, so the field reflects the clamped\n * page back. Accessible name from config (EN default, Pillar 2).\n *\n * @category ui/paginator\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/go-to-page</example-url>\n */\n@Component({\n selector: 'cngx-pgn-goto',\n exportAs: 'cngxPgnGoto',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <input\n type=\"number\"\n class=\"cngx-paginator__goto-input\"\n min=\"1\"\n [max]=\"host.totalPages()\"\n [value]=\"host.pageIndex() + 1\"\n [attr.aria-label]=\"config.ariaLabels.goToPage\"\n [attr.aria-disabled]=\"host.isBusy() ? 'true' : null\"\n (input)=\"navigate($event)\"\n (keydown.enter)=\"commit($event)\"\n (blur)=\"commit($event)\"\n />\n `,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorGoto {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n protected readonly config = injectPaginatorConfig();\n\n /** Live navigation on every keystroke / spinner step - no field re-sync, so\n * typing is never interrupted; the clamp re-sync happens on commit. */\n protected navigate(event: Event): void {\n const value = Number((event.target as HTMLInputElement).value);\n if (Number.isFinite(value) && value >= 1) {\n this.host.setPage(value - 1);\n }\n }\n\n protected commit(event: Event): void {\n const input = event.target as HTMLInputElement;\n const value = Number(input.value);\n if (Number.isFinite(value) && value >= 1) {\n this.host.setPage(value - 1);\n }\n // Re-sync the field to the effective page: the brain may have clamped to a\n // bound (no signal change, so the [value] binding would not refresh), or\n // rejected an empty / sub-1 entry. Either way the field shows the truth.\n input.value = String(this.host.pageIndex() + 1);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxListbox, CngxListboxTrigger, CngxOption } from '@cngx/common/interactive';\nimport { CngxPopover, CngxPopoverTrigger } from '@cngx/common/popover';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_GLYPHS } from '../paginator-glyphs';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/**\n * Items-per-page segment. A `CngxListbox` dropdown (never a native `<select>`,\n * never the forms select family - keeps `@cngx/ui/paginator` free of a\n * `@cngx/forms` dependency). `[options]` is data, not a feature toggle.\n * Picking a size routes through `host.setPageSize`, which resets to\n * page 0 (brain semantics). The selected size is derived from `host.pageSize()`,\n * so the panel selection and the trigger label never drift (Pillar 1).\n *\n * @category ui/paginator\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-behaviors/url-synced-paging</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/page-size-and-range</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/bar</example-url>\n */\n@Component({\n selector: 'cngx-pgn-page-size',\n exportAs: 'cngxPgnPageSize',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxListbox, CngxListboxTrigger, CngxOption, CngxPopover, CngxPopoverTrigger],\n template: `\n <button\n type=\"button\"\n class=\"cngx-paginator__button cngx-paginator__select\"\n [cngxListboxTrigger]=\"lb\"\n [cngxPopoverTrigger]=\"pop\"\n [haspopup]=\"'listbox'\"\n [popover]=\"pop\"\n [attr.aria-label]=\"config.ariaLabels.itemsPerPage\"\n [disabled]=\"host.isBusy()\"\n (click)=\"pop.toggle()\"\n >\n <span class=\"cngx-paginator__select-label\">{{ host.pageSize() }}</span>\n <span class=\"cngx-paginator__select-caret\" aria-hidden=\"true\">{{ glyphs.caret }}</span>\n </button>\n <div cngxPopover #pop=\"cngxPopover\">\n <ul\n cngxListbox\n class=\"cngx-paginator__select-panel\"\n tabindex=\"0\"\n [label]=\"config.ariaLabels.itemsPerPage\"\n [value]=\"host.pageSize()\"\n (valueChange)=\"onSelect($event)\"\n #lb=\"cngxListbox\"\n >\n @for (option of options(); track option) {\n <li cngxOption class=\"cngx-paginator__option\" [value]=\"option\">{{ option }}</li>\n }\n </ul>\n </div>\n `,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorPageSize {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n protected readonly config = injectPaginatorConfig();\n protected readonly glyphs = CNGX_PAGINATOR_GLYPHS;\n\n /** Selectable page sizes. Pure data - the segment is content-agnostic. */\n readonly options = input<readonly number[]>([]);\n\n protected onSelect(value: number | undefined): void {\n if (typeof value === 'number') {\n this.host.setPageSize(value);\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxListbox, CngxListboxTrigger, CngxOption } from '@cngx/common/interactive';\nimport { CngxPopover, CngxPopoverTrigger } from '@cngx/common/popover';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_GLYPHS } from '../paginator-glyphs';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/**\n * Page-of-pages segment. A `CngxListbox` dropdown of `1..totalPages`; picking\n * page `n` routes through `host.setPage(n - 1)`. The option list is derived\n * from `host.totalPages()` and the selected entry from `host.pageIndex()`, so\n * both track the brain with zero local state (Pillar 1). Like the page-size\n * segment it avoids native `<select>` and the forms family, keeping the entry\n * `@cngx/forms`-free.\n *\n * @category ui/paginator\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-segments/go-to-page</example-url>\n */\n@Component({\n selector: 'cngx-pgn-page-of-pages',\n exportAs: 'cngxPgnPageOfPages',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxListbox, CngxListboxTrigger, CngxOption, CngxPopover, CngxPopoverTrigger],\n template: `\n <button\n type=\"button\"\n class=\"cngx-paginator__button cngx-paginator__select\"\n [cngxListboxTrigger]=\"lb\"\n [cngxPopoverTrigger]=\"pop\"\n [haspopup]=\"'listbox'\"\n [popover]=\"pop\"\n [attr.aria-label]=\"config.ariaLabels.pageOfPages\"\n [disabled]=\"host.isBusy()\"\n (click)=\"pop.toggle()\"\n >\n <span class=\"cngx-paginator__select-label\"\n ><b>{{ host.pageIndex() + 1 }}</b> / {{ host.totalPages() }}</span\n >\n <span class=\"cngx-paginator__select-caret\" aria-hidden=\"true\">{{ glyphs.caret }}</span>\n </button>\n <div cngxPopover #pop=\"cngxPopover\">\n <ul\n cngxListbox\n class=\"cngx-paginator__overflow-panel\"\n tabindex=\"0\"\n [label]=\"config.ariaLabels.pageOfPages\"\n [value]=\"host.pageIndex() + 1\"\n (valueChange)=\"onSelect($event)\"\n #lb=\"cngxListbox\"\n >\n @for (page of pages(); track page) {\n <li cngxOption class=\"cngx-paginator__option\" [value]=\"page\">{{ page }}</li>\n }\n </ul>\n </div>\n `,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorPageOfPages {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n protected readonly config = injectPaginatorConfig();\n protected readonly glyphs = CNGX_PAGINATOR_GLYPHS;\n\n /**\n * The 1-based page numbers `1..totalPages`. Length-keyed `equal` keeps the\n * reference stable while the count is unchanged - the contents are fully\n * determined by the length, so the `@for` never churns (signal-equality rule).\n */\n protected readonly pages = computed<number[]>(\n () => Array.from({ length: this.host.totalPages() }, (_, i) => i + 1),\n { equal: (a, b) => a.length === b.length },\n );\n\n protected onSelect(value: number | undefined): void {\n if (typeof value === 'number') {\n this.host.setPage(value - 1);\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/** Resting size tier of a rendered dot. Edge dots shrink (iOS page-control). */\ntype DotSize = 'full' | 'medium' | 'small';\n\ninterface Dot {\n readonly index: number;\n readonly size: DotSize;\n}\n\n/** Visible dot count cap before the edge-shrink window kicks in. */\nconst MAX_DOTS = 7;\n\n/**\n * Compute the windowed dot sequence around `current` for `total` pages. Small\n * counts render every dot full-size; large counts render a `MAX_DOTS` window\n * that slides to keep `current` centred, with the two dots nearest a truncated\n * edge rendered medium then small (iOS page-control edge-shrink). Pure, internal\n * to this segment - dots stay organism-internal, no shared atom.\n */\nfunction dotWindow(current: number, total: number): Dot[] {\n const count = Math.max(0, total);\n if (count === 0) {\n return [];\n }\n const visible = Math.min(count, MAX_DOTS);\n const half = Math.floor(visible / 2);\n const clamped = Math.min(Math.max(current, 0), count - 1);\n const start = Math.max(0, Math.min(clamped - half, count - visible));\n const end = start + visible - 1;\n const moreBefore = start > 0;\n const moreAfter = end < count - 1;\n\n const dots: Dot[] = [];\n for (let i = start; i <= end; i++) {\n let size: DotSize = 'full';\n if (moreBefore && i === start) {\n size = 'small';\n } else if (moreBefore && i === start + 1) {\n size = 'medium';\n } else if (moreAfter && i === end) {\n size = 'small';\n } else if (moreAfter && i === end - 1) {\n size = 'medium';\n }\n dots.push({ index: i, size });\n }\n return dots;\n}\n\nfunction dotsEqual(a: readonly Dot[], b: readonly Dot[]): boolean {\n if (a === b) {\n return true;\n }\n if (a.length !== b.length) {\n return false;\n }\n return a.every((d, i) => d.index === b[i].index && d.size === b[i].size);\n}\n\n/**\n * The dots indicator: one circular `<button>` per page, windowed with an\n * iOS-style edge-shrink for large counts. The active dot carries\n * `aria-current=\"page\"`; every dot exposes its page name via `aria-label`\n * (the circle itself is decorative). Click navigates through the brain, gated\n * while busy. Dot DOM + windowing live here, not in a shared atom (over-\n * abstraction avoided - extract only when a second consumer appears).\n *\n * @category ui/paginator\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/dots</example-url>\n */\n@Component({\n selector: 'cngx-pgn-dots',\n exportAs: 'cngxPgnDots',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div class=\"cngx-paginator__dots\">\n @for (dot of model(); track dot.index) {\n <button\n type=\"button\"\n class=\"cngx-paginator__dot\"\n [class.cngx-paginator__dot--current]=\"isCurrent(dot.index)\"\n [attr.data-size]=\"dot.size\"\n [attr.aria-current]=\"isCurrent(dot.index) ? 'page' : null\"\n [attr.aria-label]=\"config.ariaLabels.page(dot.index + 1)\"\n [attr.aria-disabled]=\"host.isBusy() ? 'true' : null\"\n (click)=\"goto(dot.index)\"\n ></button>\n }\n </div>\n `,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorDots {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n protected readonly config = injectPaginatorConfig();\n\n /**\n * The rendered dot window. Structural `equal` keeps the reference stable\n * across recomputes that yield an identical window, so the `@for` does not\n * churn (signal-equality rule).\n */\n protected readonly model = computed<readonly Dot[]>(\n () => dotWindow(this.host.pageIndex(), this.host.totalPages()),\n { equal: dotsEqual },\n );\n\n protected isCurrent(index: number): boolean {\n return index === this.host.pageIndex();\n }\n\n protected goto(index: number): void {\n this.host.setPage(index);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/**\n * Page-status readout: renders \"Page n of m\" for the current page. Pure\n * derivation from the host `pageIndex()`/`totalPages()` signals - no local\n * state, no writes. It is the visible counterpart of the\n * `announcements.pageChange` live-region phrasing, and the collapse target the\n * responsive number row swaps to once the paginator's container narrows. Text\n * comes from the config `pageStatus` formatter, so it localises with the rest of\n * the cascade; tabular figures keep the numerals from reflowing as the page\n * changes.\n *\n * @category ui/paginator\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-behaviors/responsive-collapse</example-url>\n */\n@Component({\n selector: 'cngx-pgn-status',\n exportAs: 'cngxPgnStatus',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `<span class=\"cngx-paginator__status\" [innerHTML]=\"text()\"></span>`,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorStatus {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n private readonly config = injectPaginatorConfig();\n\n /** Formatted \"Page n of m\" readout from the config formatter (1-based page). */\n protected readonly text = computed<string>(() =>\n this.config.formats.pageStatus(this.host.pageIndex() + 1, this.host.totalPages()),\n );\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxProgress } from '@cngx/ui/feedback';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/**\n * Progress-rail segment: a horizontal rail whose fill tracks the current page\n * position, with an overlaid knob riding the fill edge. The track, fill, and\n * `role=\"progressbar\"` a11y are composed from the `CngxProgress` atom - not\n * reinvented here (same precedent as the progress-bar stepper). The only new\n * part is the position knob, a decorative (`aria-hidden`) dot positioned by an\n * inline `inset-inline-start.%`, which `CngxProgress` cannot express. The fill\n * percentage derives purely from the host `pageIndex()`/`totalPages()` signals -\n * no local state, no writes.\n *\n * @category ui/paginator\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/rail</example-url>\n */\n@Component({\n selector: 'cngx-pgn-rail',\n exportAs: 'cngxPgnRail',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxProgress],\n template: `\n <div class=\"cngx-paginator__rail\">\n <cngx-progress\n variant=\"linear\"\n [progress]=\"fillPercent()\"\n [label]=\"config.ariaLabels.railPosition\"\n />\n <span\n class=\"cngx-paginator__rail-knob\"\n aria-hidden=\"true\"\n [style.inset-inline-start.%]=\"fillPercent()\"\n ></span>\n </div>\n `,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorRail {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n protected readonly config = injectPaginatorConfig();\n\n /**\n * Fill percentage (0-100) of the current page across the page span. A single\n * page (or none) reads 0; the last page reads 100. Drives both the composed\n * `cngx-progress` `[progress]` and the knob's inline position.\n */\n protected readonly fillPercent = computed<number>(() => {\n const total = this.host.totalPages();\n return total <= 1 ? 0 : (this.host.pageIndex() / (total - 1)) * 100;\n });\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxRipple } from '@cngx/common/interactive';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/**\n * Load-more segment: an append-don't-replace trigger over the same brain. One\n * `host.next()` button plus a `shown / total` count readout. The cumulative\n * slice is derived by the brain (`host.cumulativeRange()`); this segment holds\n * no accumulation state - the consumer slices its own array from\n * `cumulativeRange()`.\n *\n * Disabled (and so a no-op) on the last page or while busy. `aria-disabled`\n * (not native `disabled`) keeps the button focusable so AT hears the bound\n * state, matching the nav segments; the busy/position reason is already spoken\n * by the shell live region.\n *\n * @category ui/paginator\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-modes/load-more</example-url>\n */\n@Component({\n selector: 'cngx-pgn-load-more',\n exportAs: 'cngxPgnLoadMore',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxRipple],\n template: `\n <button\n type=\"button\"\n class=\"cngx-paginator__button cngx-paginator__load-more\"\n cngxRipple\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-disabled]=\"disabled()\"\n (click)=\"handleClick()\"\n >\n <span class=\"cngx-paginator__load-more-label\">{{ ariaLabel() }}</span>\n @if (!host.isLast()) {\n <span class=\"cngx-paginator__load-more-count\" aria-hidden=\"true\">\n {{ shown() }} / {{ host.total() }}\n </span>\n }\n </button>\n `,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorLoadMore {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n private readonly config = injectPaginatorConfig();\n\n /**\n * Accessible name from the config cascade. On the last page the actionable\n * `Load more` name is replaced with the exhausted-state `allLoaded` label so\n * AT does not announce an action on the disabled button.\n */\n protected readonly ariaLabel = computed(() =>\n this.host.isLast()\n ? this.config.ariaLabels.allLoaded(this.host.total())\n : this.config.ariaLabels.loadMore,\n );\n\n /** Disabled on the last page or while busy - the trigger becomes a no-op. */\n protected readonly disabled = computed(() => this.host.isLast() || this.host.isBusy());\n\n /**\n * Items revealed so far. The brain's `cumulativeRange()` upper bound is\n * uncapped (`(pageIndex + 1) * pageSize`), so a partial final page is clamped\n * to `total` here for an honest readout.\n */\n protected readonly shown = computed<number>(() =>\n Math.min(this.host.cumulativeRange()[1], this.host.total()),\n );\n\n /** Reveal the next page. Guarded so a disabled click is a no-op. */\n protected handleClick(): void {\n if (this.disabled()) {\n return;\n }\n this.host.next();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxInfiniteScroll } from '@cngx/common/layout';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/**\n * Infinite-scroll segment: a bottom-of-list sentinel that auto-advances the\n * page as it scrolls into view, composing `CngxInfiniteScroll`. The in-template\n * sentinel binds the directive's `[enabled]` / `[loading]` inputs and its\n * `(loadMore)` output directly to the `CNGX_PAGINATOR_HOST` signals, so the\n * directive's built-in debounce, busy-gate, enabled-disable, and auto-disconnect\n * own the auto-advance double-fire guard - this segment adds no\n * `IntersectionObserver` code of its own. The directive sits on the sentinel\n * element (not as a `hostDirective`) precisely so its `[enabled]` / `[loading]`\n * inputs can bind to the host-token signals; a static `hostDirectives`\n * declaration could not express that wiring.\n *\n * Like `cngx-pgn-load-more`, this stays a thin trigger atom: it injects\n * `CNGX_PAGINATOR_HOST`, holds no accumulation state, and renders no async view\n * of its own. The consumer slices its own array from the brain's\n * `cumulativeRange()`; the busy / error / end experience belongs to the consumer\n * or to a composing container, keeping the segment reusable unchanged.\n *\n * Exhausted state: once `host.isLast()` the sentinel disables (`enabled` is\n * `false`, so the observer disconnects). It swaps its busy affordance for the\n * `allLoaded` end label only after the final load settles (`!host.isBusy()`),\n * so it never claims \"all loaded\" while the last batch is still arriving, and\n * the tail is never a silent or stale spinner.\n *\n * `[root]` / `[rootMargin]` forward straight to the composed directive so a\n * consumer can point the sentinel at a bounded scroll container (a feed box)\n * rather than the viewport, and tune the pre-fetch distance. They are plain\n * passthrough config - the segment still owns no observer code and no state.\n *\n * @category ui/paginator\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-modes/infinite</example-url>\n */\n@Component({\n selector: 'cngx-pgn-infinite',\n exportAs: 'cngxPgnInfinite',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxInfiniteScroll],\n template: `\n <div\n class=\"cngx-paginator__infinite\"\n cngxInfiniteScroll\n [enabled]=\"!host.isLast()\"\n [loading]=\"host.isBusy()\"\n [root]=\"root()\"\n [rootMargin]=\"rootMargin()\"\n (loadMore)=\"host.next()\"\n >\n @if (isExhausted()) {\n <span class=\"cngx-paginator__infinite-end\">{{ endLabel() }}</span>\n } @else {\n <span class=\"cngx-paginator__infinite-spinner\" aria-hidden=\"true\"></span>\n <span class=\"cngx-paginator__infinite-status\">{{ busyLabel() }}</span>\n }\n </div>\n `,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorInfinite {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n private readonly config = injectPaginatorConfig();\n\n /**\n * CSS selector for the scroll container the sentinel is watched within.\n * `null` (default) observes the viewport. Forwarded to `CngxInfiniteScroll`.\n */\n readonly root = input<string | null>(null);\n\n /**\n * Pre-fetch margin around the scroll container, forwarded to\n * `CngxInfiniteScroll`. The directive default loads ~200px before the\n * sentinel is visible.\n */\n readonly rootMargin = input<string>('0px 0px 200px 0px');\n\n /**\n * Exhausted: the last page is reached AND its load has settled. Gating on\n * `!isBusy()` keeps the spinner up while the final batch is still loading, so\n * the segment never claims \"all loaded\" before the last rows arrive.\n */\n protected readonly isExhausted = computed(() => this.host.isLast() && !this.host.isBusy());\n\n /**\n * Exhausted-state label from the config cascade, reused from the load-more\n * segment so both append modes speak the same \"all N loaded\" end state rather\n * than leaving the tail implicit.\n */\n protected readonly endLabel = computed(() => this.config.ariaLabels.allLoaded(this.host.total()));\n\n /** Status text shown beside the spinner while more pages remain. */\n protected readonly busyLabel = computed(() => this.config.announcements.loading);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n inject,\n linkedSignal,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxRovingItem, CngxRovingTabindex } from '@cngx/common/a11y';\nimport { CNGX_BUCKET_PAGINATE_HOST } from '@cngx/common/data';\n\nimport { injectPaginatorConfig } from '../paginator-config';\n\n/**\n * Alphabetical / category chips: a `role=\"group\"` toggle strip over the\n * {@link CngxBucketPaginate} range model. One `<button>` per bucket; the active\n * bucket carries `aria-pressed`, an empty bucket is `disabled`. The model is\n * injected through `CNGX_BUCKET_PAGINATE_HOST`, never the concrete directive\n * class, so the strip stays decompose-ready.\n *\n * Every chip's pressed / disabled / name state is a `computed()` read of the\n * host signals - nothing is synced. An empty chip is not a silent dead control:\n * its accessible name comes from `ariaLabels.emptyBucket(label)`, which states\n * the bucket has no items, so AT hears the reason the chip is disabled.\n *\n * Keyboard navigation reuses `CngxRovingTabindex` / `CngxRovingItem` (no new\n * keyboard code, matching `cngx-pgn-pages`): arrows move the focus cursor and\n * skip disabled chips, the single tab stop tracks the active bucket, and\n * activation commits via `select()`.\n *\n * @category ui/paginator\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-modes/alphabetical</example-url>\n */\n@Component({\n selector: 'cngx-pgn-alpha',\n exportAs: 'cngxPgnAlpha',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxRovingTabindex, CngxRovingItem],\n template: `\n <div\n class=\"cngx-paginator__alpha\"\n role=\"group\"\n [attr.aria-label]=\"config.ariaLabels.bucketGroup\"\n cngxRovingTabindex\n [(activeIndex)]=\"rovingIndex\"\n >\n @for (bucket of host.buckets(); track bucket.label) {\n @let isEmpty = host.isEmpty(bucket.label);\n <button\n type=\"button\"\n cngxRovingItem\n [cngxRovingItemDisabled]=\"isEmpty\"\n class=\"cngx-paginator__button cngx-paginator__alpha-chip\"\n [class.cngx-paginator__alpha-chip--active]=\"isActive(bucket.label)\"\n [attr.aria-pressed]=\"isActive(bucket.label) ? 'true' : 'false'\"\n [attr.aria-label]=\"chipLabel(bucket.label)\"\n [disabled]=\"isEmpty\"\n (click)=\"select(bucket.label)\"\n >\n {{ bucket.label }}\n </button>\n }\n </div>\n `,\n // The bucket strip is a standalone sibling of the page-index brain - it is\n // used WITHOUT the `cngx-paginator` shell, so it must ship the structural base\n // (chip chrome, roving button geometry) itself rather than relying on the\n // shell to inline it.\n styleUrls: ['../../../common/data/paginate/styles/paginator-base.css'],\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorAlpha {\n protected readonly host = inject(CNGX_BUCKET_PAGINATE_HOST);\n protected readonly config = injectPaginatorConfig();\n\n /**\n * Roving focus cursor. A `linkedSignal` so the strip's single tab stop tracks\n * the active bucket (Tab lands on the pressed chip) yet still moves freely\n * under the arrow keys; when nothing is selected it falls back to the first\n * non-empty chip so Tab never lands on a disabled control.\n */\n protected readonly rovingIndex = linkedSignal<number>(() => {\n const buckets = this.host.buckets();\n const active = this.host.active();\n if (active !== null) {\n const index = buckets.findIndex((bucket) => bucket.label === active);\n if (index !== -1) {\n return index;\n }\n }\n const firstEnabled = buckets.findIndex((bucket) => !this.host.isEmpty(bucket.label));\n return firstEnabled === -1 ? 0 : firstEnabled;\n });\n\n protected isActive(label: string): boolean {\n return this.host.active() === label;\n }\n\n /**\n * Accessible name: the available chip uses `ariaLabels.bucket`; an empty chip\n * swaps to `ariaLabels.emptyBucket` so the disabled control states its reason.\n */\n protected chipLabel(label: string): string {\n return this.host.isEmpty(label)\n ? this.config.ariaLabels.emptyBucket(label)\n : this.config.ariaLabels.bucket(label);\n }\n\n protected select(label: string): void {\n this.host.select(label);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAqIA;AACO,MAAM,uBAAuB,GAAwB;AAC1D,IAAA,UAAU,EAAE;AACV,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,QAAQ,EAAE,eAAe;AACzB,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,CAAC,IAAI,KAAK,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE;AAC9B,QAAA,SAAS,EAAE,YAAY;AACvB,QAAA,YAAY,EAAE,gBAAgB;AAC9B,QAAA,QAAQ,EAAE,YAAY;AACtB,QAAA,WAAW,EAAE,aAAa;AAC1B,QAAA,QAAQ,EAAE,WAAW;QACrB,SAAS,EAAE,CAAC,KAAK,KAAK,CAAA,IAAA,EAAO,KAAK,CAAA,OAAA,CAAS;AAC3C,QAAA,MAAM,EAAE,CAAC,KAAK,KAAK,KAAK;QACxB,WAAW,EAAE,CAAC,KAAK,KAAK,CAAA,EAAG,KAAK,CAAA,UAAA,CAAY;AAC5C,QAAA,WAAW,EAAE,YAAY;AACzB,QAAA,YAAY,EAAE,eAAe;AAC9B,KAAA;AACD,IAAA,a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FAkCjC,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAxC9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,YAChB,cAAc,EAAA,UAAA,EACZ,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,CAAC,kBAAkB,EAAE,cAAc,CAAC,EAAA,QAAA,EACnC;;;;;;;;;;;;;;;;;;;;;;;;;AAyBT,EAAA,CAAA,EAAA,IAAA,EAMK,EAAE,KAAK,EAAE,yBAAyB,EAAE,EAAA,MAAA,EAAA,CAAA,4yUAAA,CAAA,EAAA;;;ACvE5C;;AAEG;;;;"}
1
+ {"version":3,"file":"cngx-ui-paginator.mjs","sources":["../../../projects/ui/paginator/paginator-config.ts","../../../projects/ui/paginator/paginator-host.token.ts","../../../projects/ui/paginator/paginator-announcer.ts","../../../projects/ui/paginator/paginator-loading.directive.ts","../../../projects/ui/paginator/paginator.component.ts","../../../projects/ui/paginator/paginator.component.html","../../../projects/ui/paginator/paginator-glyphs.ts","../../../projects/ui/paginator/segments/paginator-nav.component.ts","../../../projects/ui/paginator/segments/page-model.ts","../../../projects/ui/paginator/segments/paginator-page-window.token.ts","../../../projects/ui/paginator/segments/paginator-pages.component.ts","../../../projects/ui/paginator/segments/paginator-range.component.ts","../../../projects/ui/paginator/segments/paginator-goto.component.ts","../../../projects/ui/paginator/segments/paginator-page-size.component.ts","../../../projects/ui/paginator/segments/paginator-page-of-pages.component.ts","../../../projects/ui/paginator/segments/paginator-dots.component.ts","../../../projects/ui/paginator/segments/paginator-status.component.ts","../../../projects/ui/paginator/segments/paginator-rail.component.ts","../../../projects/ui/paginator/segments/paginator-load-more.component.ts","../../../projects/ui/paginator/segments/paginator-infinite.component.ts","../../../projects/ui/paginator/segments/paginator-alpha.component.ts","../../../projects/ui/paginator/cngx-ui-paginator.ts"],"sourcesContent":["import {\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n Optional,\n SkipSelf,\n type EnvironmentProviders,\n type Provider,\n type TemplateRef,\n} from '@angular/core';\n\n/**\n * Accessible-name strings for the paginator landmark and its segment parts.\n * Library defaults are English; consumers localise via\n * {@link withPaginatorAriaLabels}.\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts\n * @since 0.1.0\n */\nexport interface CngxPaginatorAriaLabels {\n /** Accessible name for the `role=\"navigation\"` landmark. */\n readonly label: string;\n /** First-page button. */\n readonly first: string;\n /** Previous-page button. */\n readonly previous: string;\n /** Next-page button. */\n readonly next: string;\n /** Last-page button. */\n readonly last: string;\n /** A page button, given its 1-based display number. */\n readonly page: (page: number) => string;\n /** The ellipsis overflow trigger that reveals hidden pages. */\n readonly morePages: string;\n /** Page-size selector. */\n readonly itemsPerPage: string;\n /** Go-to-page input. */\n readonly goToPage: string;\n /** Page-of-pages selector (the `current / total` jump dropdown). */\n readonly pageOfPages: string;\n /** Load-more trigger while pages remain (the append-style \"reveal next page\" button). */\n readonly loadMore: string;\n /**\n * Load-more trigger once every page is revealed, given the total item count.\n * Replaces the actionable `loadMore` name on the exhausted (last-page) button\n * so AT does not announce a \"Load more\" action on a disabled control.\n */\n readonly allLoaded: (total: number) => string;\n /** A category/range chip, given its bucket label (e.g. `'A-C'`). */\n readonly bucket: (label: string) => string;\n /**\n * A category/range chip with no matching items, given its bucket label.\n * Names the disabled chip AND states why it is disabled, so an empty bucket\n * is not a silent dead control.\n */\n readonly emptyBucket: (label: string) => string;\n /** Accessible name for the category/range chip strip (`role=\"group\"`). */\n readonly bucketGroup: string;\n /**\n * Accessible name for the `rail` skin's progress rail. Becomes the composed\n * `cngx-progress` `[label]`, so AT reads \"Page position\" with the progressbar\n * value the atom exposes.\n */\n readonly railPosition: string;\n}\n\n/**\n * Display-text formatters for the data-readout segments. Library defaults are\n * English; consumers localise via {@link withPaginatorRangeFormat}.\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts\n * @since 0.1.0\n */\nexport interface CngxPaginatorFormats {\n /**\n * Range-readout text, given the 1-based first item, last item, and total.\n * The `cngx-pgn-range` segment renders the returned string as sanitised HTML,\n * so inline emphasis (e.g. `<b>` around the current range) is honoured; the\n * default bolds the range. Angular's sanitiser strips anything unsafe.\n */\n readonly range: (start: number, end: number, total: number) => string;\n /**\n * Page-status text, given the 1-based current page and total page count.\n * The `cngx-pgn-status` segment renders the returned string as sanitised HTML\n * (the default bolds the page); it is the visible twin of the\n * `announcements.pageChange` live-region phrasing, which stays plain text.\n */\n readonly pageStatus: (page: number, totalPages: number) => string;\n}\n\n/**\n * Live-region announcement phrasing. The paginator announces the effective page\n * on every change (navigation or a `total`-shrink clamp, so the clamp is never\n * silent) and the async busy / settle transitions. Library defaults are\n * English; consumers localise via {@link withPaginatorAnnouncements}.\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts\n * @since 0.1.0\n */\nexport interface CngxPaginatorAnnouncements {\n /** Announced on every page change, given the 1-based page and total pages. */\n readonly pageChange: (page: number, totalPages: number) => string;\n /** Announced when the bound async state becomes busy. */\n readonly loading: string;\n /** Announced when the bound async state settles after being busy. */\n readonly updated: string;\n}\n\n/**\n * Application-wide template-slot defaults. The instance `*cngxPaginatorLoading`\n * slot still wins over the cascade; this tier supplies a shared override when no\n * per-instance slot is projected. Library default is unset (the built-in\n * `CngxProgress` bar renders).\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts\n * @since 0.1.0\n */\nexport interface CngxPaginatorTemplates {\n /** Busy indicator shown while the bound async state is busy. */\n readonly loading?: TemplateRef<unknown>;\n}\n\n/**\n * Resolved paginator configuration. Three required sub-trees - accessible-name\n * strings, live-region announcement phrasing, and data-readout formatters -\n * plus a flat `pageSizeOptions` list and an optional `templates` slot tree,\n * each merged independently by the reducer in\n * {@link provideCngxPaginatorConfig}.\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts\n * @since 0.1.0\n */\nexport interface CngxPaginatorConfig {\n readonly ariaLabels: CngxPaginatorAriaLabels;\n readonly announcements: CngxPaginatorAnnouncements;\n readonly formats: CngxPaginatorFormats;\n /**\n * Default items-per-page choices the `cngx-pgn-page-size` dropdown renders\n * when no per-instance `[options]` is bound. The instance input still wins\n * when it is non-empty; this is the cascade fallback so the segment needs no\n * boilerplate. Replaced wholesale (not merged) by\n * {@link withPaginatorPageSizeOptions} - a size list is one atomic value.\n */\n readonly pageSizeOptions: readonly number[];\n readonly templates?: CngxPaginatorTemplates;\n}\n\n/** Library defaults - English. Override via {@link provideCngxPaginatorConfig}. */\nexport const CNGX_PAGINATOR_DEFAULTS: CngxPaginatorConfig = {\n ariaLabels: {\n label: 'Pagination',\n first: 'First page',\n previous: 'Previous page',\n next: 'Next page',\n last: 'Last page',\n page: (page) => `Page ${page}`,\n morePages: 'More pages',\n itemsPerPage: 'Items per page',\n goToPage: 'Go to page',\n pageOfPages: 'Select page',\n loadMore: 'Load more',\n allLoaded: (total) => `All ${total} loaded`,\n bucket: (label) => label,\n emptyBucket: (label) => `${label}, no items`,\n bucketGroup: 'Categories',\n railPosition: 'Page position',\n },\n announcements: {\n pageChange: (page, totalPages) => `Page ${page} of ${totalPages}`,\n loading: 'Loading',\n updated: 'Updated',\n },\n formats: {\n // The readout segments render the formatter output as sanitised HTML, so the\n // current value (the page, or the item range) is emphasised with `<b>`;\n // Angular's sanitiser keeps `<b>` and strips anything dangerous.\n range: (start, end, total) => `<b>${start}-${end}</b> of ${total}`,\n pageStatus: (page, totalPages) => `Page <b>${page}</b> of ${totalPages}`,\n },\n // Includes the brain's default pageSize (10) so the trigger value is always a\n // member of the panel; a common data-table ladder, locale-neutral.\n pageSizeOptions: [10, 25, 50, 100],\n};\n\n/**\n * Configuration cascade token. Resolution priority (high to low):\n * per-instance Input, then `provideCngxPaginatorConfig(...)` at the\n * application root, then the library defaults.\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts\n * @since 0.1.0\n */\nexport const CNGX_PAGINATOR_CONFIG = new InjectionToken<CngxPaginatorConfig>('CngxPaginatorConfig', {\n providedIn: 'root',\n factory: () => CNGX_PAGINATOR_DEFAULTS,\n});\n\n/**\n * A single configuration override produced by a `with*` feature factory.\n * The reducer in {@link provideCngxPaginatorConfig} matches on `kind` and\n * shallow-merges `payload` into the matching sub-tree - except\n * `pageSizeOptions`, whose payload replaces the list wholesale.\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts\n * @since 0.1.0\n */\nexport type CngxPaginatorConfigFeature =\n | { readonly kind: 'ariaLabels'; readonly payload: Partial<CngxPaginatorAriaLabels> }\n | { readonly kind: 'announcements'; readonly payload: Partial<CngxPaginatorAnnouncements> }\n | { readonly kind: 'formats'; readonly payload: Partial<CngxPaginatorFormats> }\n | { readonly kind: 'pageSizeOptions'; readonly payload: readonly number[] }\n | { readonly kind: 'templates'; readonly payload: Partial<CngxPaginatorTemplates> };\n\n/** Reduce a feature list onto a base config, merging each sub-tree in isolation. */\nfunction applyFeatures(\n base: CngxPaginatorConfig,\n features: readonly CngxPaginatorConfigFeature[],\n): CngxPaginatorConfig {\n let ariaLabels = base.ariaLabels;\n let announcements = base.announcements;\n let formats = base.formats;\n let pageSizeOptions = base.pageSizeOptions;\n let templates = base.templates;\n for (const feature of features) {\n if (feature.kind === 'ariaLabels') {\n ariaLabels = { ...ariaLabels, ...feature.payload };\n } else if (feature.kind === 'announcements') {\n announcements = { ...announcements, ...feature.payload };\n } else if (feature.kind === 'formats') {\n formats = { ...formats, ...feature.payload };\n } else if (feature.kind === 'pageSizeOptions') {\n // A size list is one atomic value - replace, do not merge.\n pageSizeOptions = feature.payload;\n } else {\n templates = { ...templates, ...feature.payload };\n }\n }\n return { ariaLabels, announcements, formats, pageSizeOptions, templates };\n}\n\n/**\n * Override any subset of the paginator accessible-name strings. Per-instance\n * `aria-label` bindings still win over the cascade for the landmark name.\n *\n * ```ts\n * provideCngxPaginatorConfig(\n * withPaginatorAriaLabels({ next: 'Nächste Seite', previous: 'Vorige Seite' }),\n * );\n * ```\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts\n * @since 0.1.0\n */\nexport function withPaginatorAriaLabels(\n payload: Partial<CngxPaginatorAriaLabels>,\n): CngxPaginatorConfigFeature {\n return { kind: 'ariaLabels', payload };\n}\n\n/**\n * Override any subset of the paginator live-region announcement phrasing.\n *\n * ```ts\n * provideCngxPaginatorConfig(\n * withPaginatorAnnouncements({\n * pageChange: (page, total) => `Seite ${page} von ${total}`,\n * loading: 'Wird geladen',\n * updated: 'Aktualisiert',\n * }),\n * );\n * ```\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts\n * @since 0.1.0\n */\nexport function withPaginatorAnnouncements(\n payload: Partial<CngxPaginatorAnnouncements>,\n): CngxPaginatorConfigFeature {\n return { kind: 'announcements', payload };\n}\n\n/**\n * Override the range-readout format. The `cngx-pgn-range` segment renders the\n * returned string verbatim, so this also localises the `of` connector.\n *\n * ```ts\n * provideCngxPaginatorConfig(\n * withPaginatorRangeFormat((start, end, total) => `${start}-${end} von ${total}`),\n * );\n * ```\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts\n * @since 0.1.0\n */\nexport function withPaginatorRangeFormat(\n range: CngxPaginatorFormats['range'],\n): CngxPaginatorConfigFeature {\n return { kind: 'formats', payload: { range } };\n}\n\n/**\n * Override the page-status format. The `cngx-pgn-status` segment renders the\n * returned string verbatim, so this localises the \"Page n of m\" readout that\n * the responsive collapse reveals.\n *\n * ```ts\n * provideCngxPaginatorConfig(\n * withPaginatorPageStatusFormat((page, totalPages) => `Seite ${page} von ${totalPages}`),\n * );\n * ```\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts\n * @since 0.1.0\n */\nexport function withPaginatorPageStatusFormat(\n pageStatus: CngxPaginatorFormats['pageStatus'],\n): CngxPaginatorConfigFeature {\n return { kind: 'formats', payload: { pageStatus } };\n}\n\n/**\n * Supply the default items-per-page choices for the `cngx-pgn-page-size`\n * dropdown app-wide. The segment renders these when no per-instance `[options]`\n * is bound; a non-empty `[options]` input still wins. The list replaces the\n * library default wholesale - it is one atomic value, not a merged sub-tree.\n *\n * ```ts\n * provideCngxPaginatorConfig(\n * withPaginatorPageSizeOptions([12, 24, 48]),\n * );\n * ```\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts\n * @since 0.1.0\n */\nexport function withPaginatorPageSizeOptions(\n payload: readonly number[],\n): CngxPaginatorConfigFeature {\n return { kind: 'pageSizeOptions', payload };\n}\n\n/**\n * Supply application-wide template-slot defaults for the paginator. The\n * per-instance `*cngxPaginatorLoading` slot still wins over this tier; it only\n * applies where no instance slot is projected.\n *\n * ```ts\n * provideCngxPaginatorConfig(\n * withPaginatorTemplates({ loading: myBrandedSpinnerTemplate }),\n * );\n * ```\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts\n * @since 0.1.0\n */\nexport function withPaginatorTemplates(\n payload: Partial<CngxPaginatorTemplates>,\n): CngxPaginatorConfigFeature {\n return { kind: 'templates', payload };\n}\n\n/**\n * Application-root configuration cascade for the paginator. Pass any\n * combination of `with*` features in `bootstrapApplication`'s providers.\n * Supplied features deep-merge with the library defaults, so consumers only\n * declare the keys they want to override.\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts\n * @since 0.1.0\n */\nexport function provideCngxPaginatorConfig(\n ...features: CngxPaginatorConfigFeature[]\n): EnvironmentProviders {\n // Empty-features: leave the root default reference untouched so downstream\n // identity comparisons stay stable.\n if (features.length === 0) {\n return makeEnvironmentProviders([]);\n }\n return makeEnvironmentProviders([\n { provide: CNGX_PAGINATOR_CONFIG, useValue: applyFeatures(CNGX_PAGINATOR_DEFAULTS, features) },\n ]);\n}\n\n/**\n * Component-scoped paginator configuration override. Pass into a component's\n * or directive's `viewProviders`; features merge on top of the parent config\n * (an enclosing scope or the application root), so a region can re-phrase its\n * announcements or labels without disturbing the rest of the app.\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts\n * @since 0.1.0\n */\nexport function provideCngxPaginatorConfigAt(\n ...features: CngxPaginatorConfigFeature[]\n): Provider[] {\n return [\n {\n provide: CNGX_PAGINATOR_CONFIG,\n useFactory: (parent: CngxPaginatorConfig | null) =>\n applyFeatures(parent ?? CNGX_PAGINATOR_DEFAULTS, features),\n deps: [[new SkipSelf(), new Optional(), CNGX_PAGINATOR_CONFIG]],\n },\n ];\n}\n\n/**\n * Convenience accessor for the paginator configuration. Runs in injection\n * context; resolves through the cascade. Equivalent to\n * `inject(CNGX_PAGINATOR_CONFIG)`.\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-config.ts\n * @since 0.1.0\n */\nexport function injectPaginatorConfig(): CngxPaginatorConfig {\n return inject(CNGX_PAGINATOR_CONFIG);\n}\n","import { InjectionToken, type Signal } from '@angular/core';\n\n/**\n * Read-mostly state-and-navigation contract every paginator segment part\n * injects instead of the concrete `CngxPaginator` shell. \\\n * A structural subset of the `CngxPaginate` brain\n * (`@cngx/common/data`) - the brain provides it via `useExisting`, so a\n * decomposed skin keeps talking to the same token without depending on the\n * organism class (Atomic Decompose, DI abstraction).\n *\n * The signals are the single derivation source for every segment's disabled\n * state, label, and `aria-current`; the methods are the only write paths,\n * each routing through the brain so the clamp-`computed()` and busy-gate\n * invariants hold.\n *\n * @category ui/paginator\n */\nexport interface CngxPaginatorHost {\n /** Current page index (0-based), auto-clamped to `totalPages`. */\n readonly pageIndex: Signal<number>;\n /** Current page size. */\n readonly pageSize: Signal<number>;\n /** Total item count (before pagination). */\n readonly total: Signal<number>;\n /** Total number of pages (minimum 1). */\n readonly totalPages: Signal<number>;\n /** `[start, end]` slice indices for the current page - always in-bounds. */\n readonly range: Signal<readonly [number, number]>;\n /**\n * `[0, end]` cumulative slice indices for append-don't-replace (load-more)\n * consumers - every page revealed so far, sliced from the top.\n */\n readonly cumulativeRange: Signal<readonly [number, number]>;\n /** `true` when on the first page. */\n readonly isFirst: Signal<boolean>;\n /** `true` when on the last page. */\n readonly isLast: Signal<boolean>;\n /** `true` while the bound async state is busy - navigation is gated. */\n readonly isBusy: Signal<boolean>;\n\n /** Navigate to `index`, clamped to `[0, totalPages - 1]`. No-op while busy. */\n setPage(index: number): void;\n /** Change page size; resets to page 0 unless `resetPage` is `false`. No-op while busy. */\n setPageSize(size: number, resetPage?: boolean): void;\n /** Navigate to the next page (no-op on the last page). */\n next(): void;\n /** Navigate to the previous page (no-op on the first page). */\n previous(): void;\n /** Navigate to the first page. */\n first(): void;\n /** Navigate to the last page. */\n last(): void;\n}\n\n/**\n * DI token the `CngxPaginator` shell provides via `useExisting`. Segment\n * parts (`cngx-pgn-prev`, `cngx-pgn-pages`, ...) inject this rather than the\n * concrete component class, keeping the organism decompose-ready.\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-host.token.ts\n * @since 0.1.0\n */\nexport const CNGX_PAGINATOR_HOST = new InjectionToken<CngxPaginatorHost>('CngxPaginatorHost');\n","import { computed, inject, InjectionToken, linkedSignal, type Signal } from '@angular/core';\n\nimport { injectPaginatorConfig } from './paginator-config';\nimport { CNGX_PAGINATOR_HOST } from './paginator-host.token';\n\n/**\n * Reactive announcement source for the paginator live region.\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-announcer.ts\n * @since 0.1.0\n */\nexport interface CngxPaginatorAnnouncer {\n /**\n * The current message to render inside the `cngxLiveRegion` span. Changes\n * (and only changes) are spoken by assistive technology.\n */\n readonly message: Signal<string>;\n}\n\n/** What the announcer is reacting to, sampled together so transitions are atomic. */\ninterface AnnouncerSource {\n readonly page: number;\n readonly totalPages: number;\n readonly busy: boolean;\n}\n\n/**\n * Builds the paginator live-region message as a single derived signal - no\n * class logic baked into the shell, so the skin still ejects cleanly. The\n * message is a `linkedSignal` over `[pageIndex, totalPages, isBusy]` from\n * {@link CNGX_PAGINATOR_HOST}: it speaks \"Page N of M\" on every effective-page\n * change (navigation OR a `total`-shrink clamp, so the clamp is never silent),\n * \"Loading\" while busy, and \"Updated\" on the first settle after busy. Phrasing\n * comes from {@link injectPaginatorConfig}.\n *\n * The previous source value (held by `linkedSignal`) is what distinguishes a\n * settle from a steady state, so there is no signal write in an `effect` and no\n * imperative `previous` tracking. Identical consecutive messages dedupe through\n * the signal's value equality, so the live region never re-announces a no-op.\n *\n * Must run in an injection context (call as a field initialiser on the shell).\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-announcer.ts\n * @since 0.1.0\n */\nexport function createPaginatorAnnouncer(): CngxPaginatorAnnouncer {\n const host = inject(CNGX_PAGINATOR_HOST);\n const config = injectPaginatorConfig();\n\n // Sample the three drivers together so a transition is atomic. The field-wise\n // `equal` keeps the source reference stable across a recompute that yields an\n // identical tuple, so the linkedSignal computation never re-runs on a no-op\n // (equality rule: an object-returning computed carries an explicit equal).\n const source = computed<AnnouncerSource>(\n () => ({\n page: host.pageIndex(),\n totalPages: host.totalPages(),\n busy: host.isBusy(),\n }),\n { equal: (a, b) => a.page === b.page && a.totalPages === b.totalPages && a.busy === b.busy },\n );\n\n const message = linkedSignal<AnnouncerSource, string>({\n source,\n computation: (current, previous) => {\n const { announcements } = config;\n if (current.busy) {\n return announcements.loading;\n }\n // Just left a busy state: announce the settle once, before page phrasing.\n if (previous?.source.busy) {\n return announcements.updated;\n }\n return announcements.pageChange(current.page + 1, current.totalPages);\n },\n });\n\n return { message };\n}\n\n/** The shape an override must match to swap the announcer derivation. */\nexport type CngxPaginatorAnnouncerFactory = () => CngxPaginatorAnnouncer;\n\n/**\n * Swap token for the live-region announcer derivation. The default resolves to\n * {@link createPaginatorAnnouncer}; the shell builds its announcer via\n * `inject(CNGX_PAGINATOR_ANNOUNCER_FACTORY)()` rather than calling the factory\n * directly. Override it to wrap the busy / settle / page-change derivation - a\n * telemetry tap, politeness escalation, or custom phrasing branch - without\n * forking the shell (mirrors `CNGX_COMMIT_ERROR_ANNOUNCER_FACTORY` in the\n * select family). The override runs in the shell's injection context, so it can\n * still `inject(CNGX_PAGINATOR_HOST)` / {@link injectPaginatorConfig}.\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-announcer.ts\n * @since 0.1.0\n */\nexport const CNGX_PAGINATOR_ANNOUNCER_FACTORY =\n new InjectionToken<CngxPaginatorAnnouncerFactory>('CngxPaginatorAnnouncerFactory', {\n providedIn: 'root',\n factory: () => createPaginatorAnnouncer,\n });\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Overrides the paginator's built-in busy indicator. Project a structural\n * `*cngxPaginatorLoading` template inside `<cngx-paginator>` and the shell\n * renders it - instead of the default `<cngx-progress>` bar - while the bound\n * async state is busy. Resolution cascades instance slot ->\n * `CngxPaginatorConfig.templates.loading` -> built-in `CngxProgress`.\n *\n * ```html\n * <cngx-paginator [state]=\"state\">\n * <ng-template cngxPaginatorLoading>\n * <my-branded-spinner />\n * </ng-template>\n * <cngx-pgn-pages />\n * </cngx-paginator>\n * ```\n *\n * @category ui/paginator\n * @wcag AA\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/loading/busy</example-url>\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator-loading.directive.ts\n * @since 0.1.0\n * @relatedTo CngxPaginator, CngxProgress\n */\n@Directive({ selector: '[cngxPaginatorLoading]', standalone: true, exportAs: 'cngxPaginatorLoading' })\nexport class CngxPaginatorLoading {\n readonly templateRef = inject(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n inject,\n input,\n output,\n TemplateRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxLiveRegion } from '@cngx/common/a11y';\nimport { CngxPaginate, connectPaginateEmit, connectPaginateResetOn } from '@cngx/common/data';\nimport { CngxProgress } from '@cngx/ui/feedback';\n\nimport { CNGX_PAGINATOR_ANNOUNCER_FACTORY } from './paginator-announcer';\nimport { injectPaginatorConfig } from './paginator-config';\nimport { CNGX_PAGINATOR_HOST } from './paginator-host.token';\nimport { CngxPaginatorLoading } from './paginator-loading.directive';\n\n/** Visual skin. Paint-only - structure, ARIA, and keyboard behaviour are identical across values. */\nexport type CngxPaginatorSkin =\n | 'numbered'\n | 'minimal'\n | 'pill'\n | 'segmented'\n | 'rail'\n | 'dots'\n | 'bar';\n\n/** Density preset. Shifts spacing/hit-target tokens; orthogonal to skin. */\nexport type CngxPaginatorDensity = 'compact' | 'default' | 'comfortable';\n\n/**\n * Declarative, skinnable pagination organism. \\\n * A thin shell over the `CngxPaginate` brain (applied as a `hostDirective`), assembled by the\n * consumer from projected segment parts in DOM order - no `show*` config inputs.\n * `skin` / `density` are single paint attributes reflected onto `[data-skin]` / `[data-density]`. \\\n *\n * Two-way `[(pageIndex)]` / `[(pageSize)]`: \\\n * the brain's controlled inputs are aliased through `hostDirectives` (`cngxPageIndex` -> `pageIndex`, `cngxPageSize` -> `pageSize`); \\\n * the shell owns the matching `pageIndexChange` / `pageSizeChange` outputs and is their single emitter,\n * wired through the shared `connectPaginateEmit` bridge (identical to `CngxIncrementalList`). \\\n * The bridge feeds each output once from two paths:\n * (1) a subscription forwards the brain's nav-only `pageChange` /\n * `pageSizeChange` - the only signal that captures a controlled-mode `setPage`,\n * because the brain's `pageIndex()` stays pinned to the input until the\n * consumer feeds it back; \\\n * (2) an `effect()` reads the effective `pageIndex()` / `pageSize()` and covers a `total`-shrink clamp the nav-only\n * output misses. \\\n * The brain output is forwarded, NOT aliased through\n * `hostDirectives`: \\\n * a raw alias would bypass the shared guard and double-emit\n * on uncontrolled navigation.\n *\n * All ARIA attributes are signal-driven. `aria-busy` has a single owner here.\n *\n * @category ui/paginator\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/paginator.component.ts\n * @since 0.1.0\n * @relatedTo CngxPaginate, CngxMatPaginator\n * @playground Material theme coverage across all skins ./examples/material-theme-coverage/skins-coverage.component.ts\n * @playground Data-table footer (Material) ./examples/data-table/data-table.component.ts\n * @playground Live filter with reset-to-first-page ./examples/filter-reset/filter-reset.component.ts\n * @playground Card grid with go-to and responsive collapse ./examples/card-grid/card-grid.component.ts\n * @playground Alphabetical bucket paging ./examples/alpha-mode/alpha-mode.component.ts\n * @playground Load-more (append) paging ./examples/load-more-mode/load-more-mode.component.ts\n * @playground Infinite scroll paging ./examples/infinite-mode/infinite-mode.component.ts\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/numbered</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/minimal</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/pill</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/segmented</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/rail</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/dots</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/bar</example-url>\n */\n@Component({\n selector: 'cngx-paginator',\n exportAs: 'cngxPaginator',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxProgress, CngxLiveRegion, NgTemplateOutlet],\n templateUrl: './paginator.component.html',\n styleUrls: ['../../common/data/paginate/styles/paginator-base.css', './paginator.component.css'],\n hostDirectives: [\n {\n directive: CngxPaginate,\n inputs: ['cngxPageIndex: pageIndex', 'cngxPageSize: pageSize', 'total', 'state'],\n },\n ],\n providers: [{ provide: CNGX_PAGINATOR_HOST, useExisting: CngxPaginate }],\n host: {\n class: 'cngx-paginator',\n role: 'navigation',\n '[attr.aria-label]': 'resolvedAriaLabel()',\n '[attr.aria-busy]': 'paginate.isBusy()',\n '[attr.data-skin]': 'skin()',\n '[attr.data-paginator-size]': 'density()',\n '[attr.data-responsive]': \"responsive() ? '' : null\",\n },\n})\nexport class CngxPaginator {\n /** Accessible name for the navigation landmark. Overrides the config default. */\n readonly ariaLabel = input<string | undefined>(undefined, { alias: 'aria-label' });\n /** Visual skin; reflected onto `[data-skin]`. */\n readonly skin = input<CngxPaginatorSkin>('numbered');\n /**\n * Private size preset (hit-target + type); reflected onto\n * `[data-paginator-size]`, NOT the global `[data-density]`. Spacing is a\n * global concern derived from `--cngx-space-*`, so a root `[data-density]`\n * compacts this paginator's gaps like every other component; this input keeps\n * only the touch-target sizing the global scale does not yet cover.\n */\n readonly density = input<CngxPaginatorDensity>('default');\n /**\n * Opt into the responsive collapse; reflected onto `[data-responsive]`. When\n * set, a `@container` rule swaps the projected `cngx-pgn-pages` number row for\n * a `cngx-pgn-status` \"Page n of m\" readout once the paginator's own container\n * narrows past the collapse breakpoint. Compose both segments for it to apply.\n */\n readonly responsive = input(false, { transform: booleanAttribute });\n\n /**\n * Reset key. When its value changes (after the initial render) the paginator\n * jumps to the first page - bind the sort / filter / search value a result set\n * depends on so a narrowed result never strands the user on a now-empty page.\n * Bind a primitive or a `computed`; an inline array / object literal\n * recomputes every change-detection pass and would reset on each. Shares the\n * `connectPaginateResetOn` implementation with `[cngxPaginateResetOn]`.\n */\n readonly resetOn = input<unknown>(undefined);\n\n /** Emits the effective page index on every change - navigation or `total`-shrink clamp. */\n readonly pageIndexChange = output<number>();\n /** Emits the effective page size on every change. */\n readonly pageSizeChange = output<number>();\n\n protected readonly paginate = inject(CngxPaginate);\n protected readonly config = injectPaginatorConfig();\n\n /**\n * Live-region message source - mounted onto the `cngxLiveRegion` span in the\n * template. Built through the swap token so a consumer can wrap the\n * busy / settle / page-change derivation without forking the shell.\n */\n protected readonly announcer = inject(CNGX_PAGINATOR_ANNOUNCER_FACTORY)();\n\n protected readonly resolvedAriaLabel = computed(\n () => this.ariaLabel() ?? this.config.ariaLabels.label,\n );\n\n // Loading-slot cascade: instance *cngxPaginatorLoading -> config default ->\n // built-in <cngx-progress>. Direct contentChild field initialiser (AOT\n // NG8110 rejects it from a helper). Returns existing TemplateRef references\n // or null - reference-stable, so no explicit equal fn is needed.\n protected readonly loadingSlot = contentChild(CngxPaginatorLoading, { read: TemplateRef });\n protected readonly loadingTemplate = computed(\n () => this.loadingSlot() ?? this.config.templates?.loading ?? null,\n );\n\n constructor() {\n // Reset-on-change, shared verbatim with the bridge input and the generic\n // [cngxPaginateResetOn] directive.\n connectPaginateResetOn(this.paginate, this.resetOn);\n\n // Two-way [(pageIndex)] / [(pageSize)] emit, shared verbatim with\n // CngxIncrementalList through the connectPaginateEmit bridge.\n connectPaginateEmit(this.paginate, {\n onIndex: (index) => this.pageIndexChange.emit(index),\n onSize: (size) => this.pageSizeChange.emit(size),\n });\n }\n}\n","@if (paginate.isBusy()) {\n @if (loadingTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <cngx-progress\n class=\"cngx-paginator__progress\"\n variant=\"linear\"\n [state]=\"paginate.state()\"\n [label]=\"config.announcements.loading\"\n />\n }\n}\n\n<ng-content />\n\n<span cngxLiveRegion class=\"cngx-paginator__sr\">{{ announcer.message() }}</span>\n","/**\n * Default text glyphs for the paginator segments. Internal and non-exported -\n * mirrors `CNGX_SELECT_GLYPHS`. The library ships no icon font; these unicode\n * marks are the out-of-the-box chevrons and the overflow ellipsis. Consumers\n * restyle visually via CSS rather than by swapping these characters.\n *\n * Centralised so the chevron / ellipsis literals live in one place instead of\n * being duplicated across the segment classes.\n */\nexport const CNGX_PAGINATOR_GLYPHS = {\n /** First-page nav (double left-pointing angle quotation mark). */\n first: '«',\n /** Previous-page nav (single left-pointing angle quotation mark). */\n previous: '‹',\n /** Next-page nav (single right-pointing angle quotation mark). */\n next: '›',\n /** Last-page nav (double right-pointing angle quotation mark). */\n last: '»',\n /** Ellipsis trigger that opens the hidden-pages overflow menu. */\n more: '…',\n /** Dropdown caret on the page-size / page-of-pages select triggers. */\n caret: '▾',\n} as const;\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n type Signal,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxIcon } from '@cngx/common/display';\nimport { CngxRipple } from '@cngx/common/interactive';\n\nimport { injectPaginatorConfig, type CngxPaginatorAriaLabels } from '../paginator-config';\nimport { CNGX_PAGINATOR_GLYPHS } from '../paginator-glyphs';\nimport { CNGX_PAGINATOR_HOST, type CngxPaginatorHost } from '../paginator-host.token';\n\n/** Config keys the four nav segments label their button with. */\ntype NavAriaKey = keyof Pick<CngxPaginatorAriaLabels, 'first' | 'previous' | 'next' | 'last'>;\n\ninterface NavCoreOptions {\n /** `true` when the page is at the bound this segment navigates toward. */\n readonly atBound: (host: CngxPaginatorHost) => boolean;\n /** The single host method this segment owns. */\n readonly action: (host: CngxPaginatorHost) => void;\n /** Config key for the button's accessible label. */\n readonly ariaKey: NavAriaKey;\n}\n\ninterface NavCore {\n readonly disabled: Signal<boolean>;\n readonly ariaLabel: Signal<string>;\n activate(): void;\n}\n\n/**\n * Shared nav-button glue. Composition, not an abstract base class: each of the\n * four segments calls this factory as a field initialiser and binds the same\n * template, differing only in selector, glyph, and the three options here.\n */\nfunction createPaginatorNavCore(options: NavCoreOptions): NavCore {\n const host = inject(CNGX_PAGINATOR_HOST);\n const config = injectPaginatorConfig();\n const disabled = computed(() => host.isBusy() || options.atBound(host));\n const ariaLabel = computed(() => config.ariaLabels[options.ariaKey]);\n return {\n disabled,\n ariaLabel,\n activate: () => {\n if (disabled()) {\n return;\n }\n options.action(host);\n },\n };\n}\n\n// Shared template - identical across the four segments; only the glyph differs.\n// `aria-disabled` (not native `disabled`) keeps the button focusable so AT users\n// hear the bound state; `activate()` guards the click.\nconst NAV_TEMPLATE = `\n <button\n type=\"button\"\n class=\"cngx-paginator__button cngx-paginator__nav\"\n cngxRipple\n [attr.aria-disabled]=\"core.disabled()\"\n (click)=\"core.activate()\"\n >\n <cngx-icon aria-hidden=\"true\">{{ glyph }}</cngx-icon>\n <span class=\"cngx-paginator__nav-label\">{{ core.ariaLabel() }}</span>\n </button>\n`;\n\n// Angular's compiler needs literal decorator metadata per component (no\n// spreads), so the shared parts are duplicated inline; the behavioural glue\n// stays factored in createPaginatorNavCore and the markup in NAV_TEMPLATE.\n\n/**\n * First-page segment. Disabled on the first page; calls `host.first()`.\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-nav.component.ts\n * @since 0.1.0\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/first/chevron</example-url>\n */\n@Component({\n selector: 'cngx-pgn-first',\n exportAs: 'cngxPgnFirst',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxIcon, CngxRipple],\n template: NAV_TEMPLATE,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorFirst {\n protected readonly glyph = CNGX_PAGINATOR_GLYPHS.first;\n protected readonly core = createPaginatorNavCore({\n atBound: (host) => host.isFirst(),\n action: (host) => host.first(),\n ariaKey: 'first',\n });\n}\n\n/**\n * Previous-page segment. Disabled on the first page; calls `host.previous()`.\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-nav.component.ts\n * @since 0.1.0\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/prev/chevron</example-url>\n */\n@Component({\n selector: 'cngx-pgn-prev',\n exportAs: 'cngxPgnPrev',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxIcon, CngxRipple],\n template: NAV_TEMPLATE,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorPrev {\n protected readonly glyph = CNGX_PAGINATOR_GLYPHS.previous;\n protected readonly core = createPaginatorNavCore({\n atBound: (host) => host.isFirst(),\n action: (host) => host.previous(),\n ariaKey: 'previous',\n });\n}\n\n/**\n * Next-page segment. Disabled on the last page; calls `host.next()`.\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-nav.component.ts\n * @since 0.1.0\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/next/chevron</example-url>\n */\n@Component({\n selector: 'cngx-pgn-next',\n exportAs: 'cngxPgnNext',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxIcon, CngxRipple],\n template: NAV_TEMPLATE,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorNext {\n protected readonly glyph = CNGX_PAGINATOR_GLYPHS.next;\n protected readonly core = createPaginatorNavCore({\n atBound: (host) => host.isLast(),\n action: (host) => host.next(),\n ariaKey: 'next',\n });\n}\n\n/**\n * Last-page segment. Disabled on the last page; calls `host.last()`.\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-nav.component.ts\n * @since 0.1.0\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/last/chevron</example-url>\n */\n@Component({\n selector: 'cngx-pgn-last',\n exportAs: 'cngxPgnLast',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxIcon, CngxRipple],\n template: NAV_TEMPLATE,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorLast {\n protected readonly glyph = CNGX_PAGINATOR_GLYPHS.last;\n protected readonly core = createPaginatorNavCore({\n atBound: (host) => host.isLast(),\n action: (host) => host.last(),\n ariaKey: 'last',\n });\n}\n","// Internal pure page-window math for `cngx-pgn-pages`. Not part of the public\n// API - the segment is the only consumer. 0-based throughout (matching the\n// brain's `pageIndex`); the rendered display number is `index + 1`.\n\n/**\n * One slot in the rendered page row: a page button or a truncation gap.\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/page-model.ts\n * @since 0.1.0\n */\nexport type PageItem =\n | { readonly kind: 'page'; readonly index: number }\n | { readonly kind: 'gap'; readonly hidden: readonly number[] };\n\n/**\n * The rendered sequence plus the gap count (a cheap structural fingerprint).\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/page-model.ts\n * @since 0.1.0\n */\nexport interface PageWindow {\n readonly pages: readonly PageItem[];\n readonly gaps: number;\n}\n\nfunction range(start: number, end: number): number[] {\n const length = end - start + 1;\n return length > 0 ? Array.from({ length }, (_, i) => start + i) : [];\n}\n\n/**\n * Compute the windowed page sequence around `current` for `total` pages. \\\n * A run of more than one hidden page collapses into a `gap` carrying the hidden\n * 0-based indices (the ellipsis menu's options); a single hidden page renders\n * as a plain page button instead of a gap.\n *\n * Derived from the MUI `usePagination`\n * range algorithm, 0-based. `siblingCount` is how many pages flank `current` on\n * each side; `boundaryCount` is how many pages are pinned at each end. Both\n * default to `1`, reproducing the v1 window byte-for-byte; the `cngx-pgn-pages`\n * inputs and {@link CNGX_PAGINATOR_PAGE_WINDOW_FACTORY} feed non-default values.\n */\nexport function pageWindow(\n current: number,\n total: number,\n siblingCount = 1,\n boundaryCount = 1,\n): PageWindow {\n const count = Math.max(1, total);\n const page = Math.min(Math.max(current, 0), count - 1) + 1; // 1-based, clamped\n\n const startPages = range(1, Math.min(boundaryCount, count));\n const endPages = range(Math.max(count - boundaryCount + 1, boundaryCount + 1), count);\n\n const siblingsStart = Math.max(\n Math.min(page - siblingCount, count - boundaryCount - siblingCount * 2 - 1),\n boundaryCount + 2,\n );\n const siblingsEnd = Math.min(\n Math.max(page + siblingCount, boundaryCount + siblingCount * 2 + 2),\n endPages.length > 0 ? endPages[0] - 2 : count - 1,\n );\n\n const startHidden = range(boundaryCount + 1, siblingsStart - 1);\n const endHidden = range(siblingsEnd + 1, count - boundaryCount);\n\n const itemList: (number | 'start-gap' | 'end-gap')[] = [\n ...startPages,\n ...(siblingsStart > boundaryCount + 2\n ? ['start-gap' as const]\n : boundaryCount + 1 < count - boundaryCount\n ? [boundaryCount + 1]\n : []),\n ...range(siblingsStart, siblingsEnd),\n ...(siblingsEnd < count - boundaryCount - 1\n ? ['end-gap' as const]\n : count - boundaryCount > boundaryCount\n ? [count - boundaryCount]\n : []),\n ...endPages,\n ];\n\n let gaps = 0;\n const pages: PageItem[] = itemList.map((entry) => {\n if (entry === 'start-gap') {\n gaps++;\n return { kind: 'gap', hidden: startHidden.map((n) => n - 1) };\n }\n if (entry === 'end-gap') {\n gaps++;\n return { kind: 'gap', hidden: endHidden.map((n) => n - 1) };\n }\n return { kind: 'page', index: entry - 1 };\n });\n\n return { pages, gaps };\n}\n\n/**\n * Structural equality for two page windows. The `equal` fn for the segment's\n * `computed()` - keeps the reference stable across recomputes that yield an\n * identical window, so downstream `@for` does not churn.\n */\nexport function pageWindowEqual(a: PageWindow, b: PageWindow): boolean {\n if (a === b) {\n return true;\n }\n if (a.gaps !== b.gaps || a.pages.length !== b.pages.length) {\n return false;\n }\n for (let i = 0; i < a.pages.length; i++) {\n const pa = a.pages[i];\n const pb = b.pages[i];\n if (pa.kind !== pb.kind) {\n return false;\n }\n if (pa.kind === 'page' && pb.kind === 'page') {\n if (pa.index !== pb.index) {\n return false;\n }\n } else if (pa.kind === 'gap' && pb.kind === 'gap') {\n if (pa.hidden.length !== pb.hidden.length || pa.hidden.some((h, j) => h !== pb.hidden[j])) {\n return false;\n }\n }\n }\n return true;\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { pageWindow, type PageWindow } from './page-model';\n\n/**\n * The page-window computation `cngx-pgn-pages` calls per recompute: given the\n * current 0-based page, the total page count, and the per-instance\n * `siblingCount` / `boundaryCount`, return the rendered {@link PageWindow}.\n *\n * An override implements a different truncation algorithm while still honouring the\n * consumer's sibling / boundary intent.\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-page-window.token.ts\n * @since 0.1.0\n */\nexport type CngxPaginatorPageWindowFn = (\n current: number,\n total: number,\n siblingCount: number,\n boundaryCount: number,\n) => PageWindow;\n\n/** The shape an override must match to swap the page-window computation. */\nexport type CngxPaginatorPageWindowFactory = () => CngxPaginatorPageWindowFn;\n\n/**\n * Default page-window factory. Resolves to the built-in {@link pageWindow} math\n * (one sibling each side, one pinned boundary at each end at the `1 / 1`\n * defaults). The segment builds its window via\n * `inject(CNGX_PAGINATOR_PAGE_WINDOW_FACTORY)()` rather than calling this\n * directly, mirroring {@link createPaginatorAnnouncer}.\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-page-window.token.ts\n * @since 0.1.0\n */\nexport const createPaginatorPageWindow: CngxPaginatorPageWindowFactory = () => pageWindow;\n\n/**\n * Swap token for the page-row truncation algorithm. The default resolves to\n * {@link createPaginatorPageWindow}; override it to replace the whole windowing\n * computation enterprise-wide (via `providers`) or per-component (via\n * `viewProviders`) without forking the segment. Per-instance tweaks to the\n * sibling / boundary counts use the `[siblingCount]` / `[boundaryCount]` inputs\n * on `cngx-pgn-pages` instead. Mirrors {@link CNGX_PAGINATOR_ANNOUNCER_FACTORY}.\n *\n * @category ui/paginator\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-page-window.token.ts\n * @since 0.1.0\n */\nexport const CNGX_PAGINATOR_PAGE_WINDOW_FACTORY =\n new InjectionToken<CngxPaginatorPageWindowFactory>('CngxPaginatorPageWindowFactory', {\n providedIn: 'root',\n factory: () => createPaginatorPageWindow,\n });\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n linkedSignal,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxRovingItem, CngxRovingTabindex } from '@cngx/common/a11y';\nimport { CngxListbox, CngxListboxTrigger, CngxOption } from '@cngx/common/interactive';\nimport { CngxPopover, CngxPopoverTrigger } from '@cngx/common/popover';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_GLYPHS } from '../paginator-glyphs';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\nimport { pageWindowEqual, type PageWindow } from './page-model';\nimport { CNGX_PAGINATOR_PAGE_WINDOW_FACTORY } from './paginator-page-window.token';\n\n/**\n * The numbered page row. One tab stop via `CngxRovingTabindex` (arrows / Home /\n * End move the active page button); the current page carries `aria-current`.\n * A truncation run collapses into an ellipsis button that opens a `CngxListbox`\n * grid of the hidden pages (same select-and-jump model as `cngx-pgn-page-of-pages`,\n * so focus moves into the panel on open).\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-pages.component.ts\n * @since 0.1.0\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/pages/number-row</example-url>\n */\n@Component({\n selector: 'cngx-pgn-pages',\n exportAs: 'cngxPgnPages',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n CngxRovingTabindex,\n CngxRovingItem,\n CngxListbox,\n CngxListboxTrigger,\n CngxOption,\n CngxPopover,\n CngxPopoverTrigger,\n ],\n template: `\n <div class=\"cngx-paginator__pages\" cngxRovingTabindex [(activeIndex)]=\"rovingIndex\">\n @for (item of model().pages; track $index) {\n @if (item.kind === 'page') {\n <button\n type=\"button\"\n cngxRovingItem\n class=\"cngx-paginator__button cngx-paginator__page\"\n [class.cngx-paginator__page--current]=\"isCurrent(item.index)\"\n [attr.aria-current]=\"isCurrent(item.index) ? 'page' : null\"\n [attr.aria-label]=\"config.ariaLabels.page(item.index + 1)\"\n [attr.aria-disabled]=\"host.isBusy() ? 'true' : null\"\n (click)=\"goto(item.index)\"\n >\n {{ item.index + 1 }}\n </button>\n } @else {\n <button\n type=\"button\"\n cngxRovingItem\n #moreBtn\n class=\"cngx-paginator__button cngx-paginator__more\"\n [cngxListboxTrigger]=\"moreList\"\n [cngxPopoverTrigger]=\"morePopover\"\n [haspopup]=\"'listbox'\"\n [popover]=\"morePopover\"\n [attr.aria-label]=\"config.ariaLabels.morePages\"\n (click)=\"openOverflow(morePopover, moreUl)\"\n >\n {{ glyphs.more }}\n </button>\n <div\n cngxPopover\n #morePopover=\"cngxPopover\"\n [closeOnOutsideClick]=\"true\"\n (toggle)=\"onOverflowToggle($event, moreBtn)\"\n >\n <ul\n cngxListbox\n #moreList=\"cngxListbox\"\n #moreUl\n tabindex=\"0\"\n class=\"cngx-paginator__overflow-panel\"\n [label]=\"config.ariaLabels.morePages\"\n [value]=\"null\"\n (valueChange)=\"onSelectOverflow($event)\"\n >\n @for (hidden of item.hidden; track hidden) {\n <li cngxOption class=\"cngx-paginator__option\" [value]=\"hidden\">{{ hidden + 1 }}</li>\n }\n </ul>\n </div>\n }\n }\n </div>\n `,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorPages {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n protected readonly config = injectPaginatorConfig();\n protected readonly glyphs = CNGX_PAGINATOR_GLYPHS;\n\n /** Pages flanking the current page on each side. Defaults to the v1 window. */\n readonly siblingCount = input<number>(1);\n /** Pages pinned at each end. Defaults to the v1 window. */\n readonly boundaryCount = input<number>(1);\n\n /** The page-window computation, swappable enterprise-wide via the DI token. */\n private readonly pageWindowFn = inject(CNGX_PAGINATOR_PAGE_WINDOW_FACTORY)();\n\n /**\n * The rendered page window. Structural `equal` keeps the reference stable\n * across recomputes that yield an identical window, so the `@for` does not\n * churn (signal-equality rule).\n */\n protected readonly model = computed<PageWindow>(\n () =>\n this.pageWindowFn(\n this.host.pageIndex(),\n this.host.totalPages(),\n this.siblingCount(),\n this.boundaryCount(),\n ),\n { equal: pageWindowEqual },\n );\n\n /** Position of the active page within the rendered window (gaps counted). */\n private readonly activeWindowIndex = computed<number>(() => {\n const current = this.host.pageIndex();\n const idx = this.model().pages.findIndex(\n (item) => item.kind === 'page' && item.index === current,\n );\n return idx === -1 ? 0 : idx;\n });\n\n /**\n * Roving focus cursor for the page row. A `linkedSignal` so the row's single\n * tab stop tracks the active page (Tab lands on `aria-current`) yet still\n * moves freely under the arrow keys between selections: arrow navigation\n * writes the cursor locally, and it re-syncs to the active page whenever the\n * page changes by any path (click / prev / next / Enter). Focus is not\n * selection - the user arrows to a page and Enter commits it.\n */\n protected readonly rovingIndex = linkedSignal<number>(() => this.activeWindowIndex());\n\n protected isCurrent(index: number): boolean {\n return index === this.host.pageIndex();\n }\n\n protected goto(index: number): void {\n this.host.setPage(index);\n }\n\n /**\n * Open the overflow popover and move focus into the listbox panel, so a\n * keyboard user lands in the grid (the trigger is a roving page-row item, so\n * the listbox trigger's own focus-move does not fire). `Enter`/`Space` on the\n * button dispatch a native click, so this covers mouse and keyboard alike.\n */\n protected openOverflow(\n popover: { toggle(): void; isVisible(): boolean },\n panel: HTMLElement,\n ): void {\n popover.toggle();\n if (popover.isVisible()) {\n queueMicrotask(() => panel.focus());\n }\n }\n\n /**\n * Restore focus to the ellipsis trigger when the panel closes (Escape /\n * outside click), so a keyboard user is not dropped to the page body. If a\n * selection re-rendered the window away, the trigger is gone and the guard\n * skips it.\n */\n protected onOverflowToggle(event: Event, trigger: HTMLElement): void {\n if ((event as ToggleEvent).newState === 'closed' && trigger.isConnected) {\n trigger.focus();\n }\n }\n\n protected onSelectOverflow(value: number | null | undefined): void {\n if (typeof value === 'number') {\n this.host.setPage(value);\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/**\n * Range-readout segment: renders `start-end of total` for the current page.\n * Pure derivation from the host `range()`/`total()` signals - no local state,\n * no writes. The text (including the `of` connector) comes from the\n * config range formatter, so it localises with the rest of the cascade. Tabular\n * figures keep the numerals from reflowing as the page changes.\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-range.component.ts\n * @since 0.1.0\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/range/readout</example-url>\n */\n@Component({\n selector: 'cngx-pgn-range',\n exportAs: 'cngxPgnRange',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `<span class=\"cngx-paginator__range\" [innerHTML]=\"text()\"></span>`,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorRange {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n private readonly config = injectPaginatorConfig();\n\n /** 1-based index of the first item on the current page (0 when empty). */\n protected readonly start = computed<number>(() =>\n this.host.total() === 0 ? 0 : this.host.range()[0] + 1,\n );\n\n /**\n * 1-based index of the last item on the current page. The brain's `range()`\n * upper bound is uncapped (`start + pageSize`), so a partial final page is\n * clamped to `total` here for an honest readout.\n */\n protected readonly end = computed<number>(() =>\n Math.min(this.host.range()[1], this.host.total()),\n );\n\n /** Formatted readout from the config range formatter (EN default `start-end of total`). */\n protected readonly text = computed<string>(() =>\n this.config.formats.range(this.start(), this.end(), this.host.total()),\n );\n}\n","import { ChangeDetectionStrategy, Component, inject, ViewEncapsulation } from '@angular/core';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/**\n * Go-to-page segment: a native `<input type=\"number\">`. \\\n * Typing (or the spinner) navigates live via `input`; Enter / blur additionally clamp and re-sync the\n * field. The brain clamps out-of-range values, so the field reflects the clamped\n * page back. Accessible name from config (EN default, Pillar 2).\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-goto.component.ts\n * @since 0.1.0\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/goto/input</example-url>\n */\n@Component({\n selector: 'cngx-pgn-goto',\n exportAs: 'cngxPgnGoto',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <input\n type=\"number\"\n class=\"cngx-paginator__goto-input\"\n min=\"1\"\n [max]=\"host.totalPages()\"\n [value]=\"host.pageIndex() + 1\"\n [attr.aria-label]=\"config.ariaLabels.goToPage\"\n [attr.aria-disabled]=\"host.isBusy() ? 'true' : null\"\n (input)=\"navigate($event)\"\n (keydown.enter)=\"commit($event)\"\n (blur)=\"commit($event)\"\n />\n `,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorGoto {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n protected readonly config = injectPaginatorConfig();\n\n /** Live navigation on every keystroke / spinner step - no field re-sync, so\n * typing is never interrupted; the clamp re-sync happens on commit. */\n protected navigate(event: Event): void {\n const value = Number((event.target as HTMLInputElement).value);\n if (Number.isFinite(value) && value >= 1) {\n this.host.setPage(value - 1);\n }\n }\n\n protected commit(event: Event): void {\n const input = event.target as HTMLInputElement;\n const value = Number(input.value);\n if (Number.isFinite(value) && value >= 1) {\n this.host.setPage(value - 1);\n }\n // Re-sync the field to the effective page: the brain may have clamped to a\n // bound (no signal change, so the [value] binding would not refresh), or\n // rejected an empty / sub-1 entry. Either way the field shows the truth.\n input.value = String(this.host.pageIndex() + 1);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxListbox, CngxListboxTrigger, CngxOption } from '@cngx/common/interactive';\nimport { CngxPopover, CngxPopoverTrigger } from '@cngx/common/popover';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_GLYPHS } from '../paginator-glyphs';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/**\n * Items-per-page segment. A `CngxListbox` dropdown (never a native `<select>`,\n * never the forms select family - keeps `@cngx/ui/paginator` free of a\n * `@cngx/forms` dependency). `[options]` is data, not a feature toggle.\n * Picking a size routes through `host.setPageSize`, which resets to\n * page 0 (brain semantics). The selected size is derived from `host.pageSize()`,\n * so the panel selection and the trigger label never drift (Pillar 1).\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-page-size.component.ts\n * @since 0.1.0\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/page-size/dropdown</example-url>\n */\n@Component({\n selector: 'cngx-pgn-page-size',\n exportAs: 'cngxPgnPageSize',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxListbox, CngxListboxTrigger, CngxOption, CngxPopover, CngxPopoverTrigger],\n template: `\n <button\n type=\"button\"\n class=\"cngx-paginator__button cngx-paginator__select\"\n [cngxListboxTrigger]=\"lb\"\n [cngxPopoverTrigger]=\"pop\"\n [haspopup]=\"'listbox'\"\n [popover]=\"pop\"\n [attr.aria-label]=\"config.ariaLabels.itemsPerPage\"\n [disabled]=\"host.isBusy()\"\n (click)=\"pop.toggle()\"\n >\n <span class=\"cngx-paginator__select-label\">{{ host.pageSize() }}</span>\n <span class=\"cngx-paginator__select-caret\" aria-hidden=\"true\">{{ glyphs.caret }}</span>\n </button>\n <div cngxPopover #pop=\"cngxPopover\" [closeOnOutsideClick]=\"true\">\n <ul\n cngxListbox\n class=\"cngx-paginator__select-panel\"\n tabindex=\"0\"\n [label]=\"config.ariaLabels.itemsPerPage\"\n [value]=\"host.pageSize()\"\n (valueChange)=\"onSelect($event)\"\n #lb=\"cngxListbox\"\n >\n @for (option of resolvedOptions(); track option) {\n <li cngxOption class=\"cngx-paginator__option\" [value]=\"option\">{{ option }}</li>\n }\n </ul>\n </div>\n `,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorPageSize {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n protected readonly config = injectPaginatorConfig();\n protected readonly glyphs = CNGX_PAGINATOR_GLYPHS;\n\n /**\n * Selectable page sizes. Pure data - the segment is content-agnostic. Leave\n * unbound (or empty) to fall back to the cascade default\n * (`CNGX_PAGINATOR_CONFIG.pageSizeOptions`, set app-wide via\n * `withPaginatorPageSizeOptions`); a non-empty binding wins over it.\n */\n readonly options = input<readonly number[]>([]);\n\n /**\n * The sizes actually rendered: the per-instance `[options]` when non-empty,\n * otherwise the config cascade default. A pure derivation - no synced state\n * (Pillar 1).\n */\n protected readonly resolvedOptions = computed(() => {\n const instance = this.options();\n return instance.length > 0 ? instance : this.config.pageSizeOptions;\n });\n\n protected onSelect(value: number | undefined): void {\n if (typeof value === 'number') {\n this.host.setPageSize(value);\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxListbox, CngxListboxTrigger, CngxOption } from '@cngx/common/interactive';\nimport { CngxPopover, CngxPopoverTrigger } from '@cngx/common/popover';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_GLYPHS } from '../paginator-glyphs';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/**\n * Page-of-pages segment. A `CngxListbox` dropdown of `1..totalPages`; picking\n * page `n` routes through `host.setPage(n - 1)`. The option list is derived\n * from `host.totalPages()` and the selected entry from `host.pageIndex()`, so\n * both track the brain with zero local state (Pillar 1). Like the page-size\n * segment it avoids native `<select>` and the forms family, keeping the entry\n * `@cngx/forms`-free.\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-page-of-pages.component.ts\n * @since 0.1.0\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/page-of-pages/trigger</example-url>\n */\n@Component({\n selector: 'cngx-pgn-page-of-pages',\n exportAs: 'cngxPgnPageOfPages',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxListbox, CngxListboxTrigger, CngxOption, CngxPopover, CngxPopoverTrigger],\n template: `\n <button\n type=\"button\"\n class=\"cngx-paginator__button cngx-paginator__select\"\n [cngxListboxTrigger]=\"lb\"\n [cngxPopoverTrigger]=\"pop\"\n [haspopup]=\"'listbox'\"\n [popover]=\"pop\"\n [attr.aria-label]=\"config.ariaLabels.pageOfPages\"\n [disabled]=\"host.isBusy()\"\n (click)=\"pop.toggle()\"\n >\n <span class=\"cngx-paginator__select-label\"\n ><b>{{ host.pageIndex() + 1 }}</b> / {{ host.totalPages() }}</span\n >\n <span class=\"cngx-paginator__select-caret\" aria-hidden=\"true\">{{ glyphs.caret }}</span>\n </button>\n <div cngxPopover #pop=\"cngxPopover\" [closeOnOutsideClick]=\"true\">\n <ul\n cngxListbox\n class=\"cngx-paginator__overflow-panel\"\n tabindex=\"0\"\n [label]=\"config.ariaLabels.pageOfPages\"\n [value]=\"host.pageIndex() + 1\"\n (valueChange)=\"onSelect($event)\"\n #lb=\"cngxListbox\"\n >\n @for (page of pages(); track page) {\n <li cngxOption class=\"cngx-paginator__option\" [value]=\"page\">{{ page }}</li>\n }\n </ul>\n </div>\n `,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorPageOfPages {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n protected readonly config = injectPaginatorConfig();\n protected readonly glyphs = CNGX_PAGINATOR_GLYPHS;\n\n /**\n * The 1-based page numbers `1..totalPages`. Length-keyed `equal` keeps the\n * reference stable while the count is unchanged - the contents are fully\n * determined by the length, so the `@for` never churns (signal-equality rule).\n */\n protected readonly pages = computed<number[]>(\n () => Array.from({ length: this.host.totalPages() }, (_, i) => i + 1),\n { equal: (a, b) => a.length === b.length },\n );\n\n protected onSelect(value: number | undefined): void {\n if (typeof value === 'number') {\n this.host.setPage(value - 1);\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/** Resting size tier of a rendered dot. Edge dots shrink (iOS page-control). */\ntype DotSize = 'full' | 'medium' | 'small';\n\ninterface Dot {\n readonly index: number;\n readonly size: DotSize;\n}\n\ninterface DotModel {\n readonly dots: readonly Dot[];\n /** Index of the leftmost dot shown in the viewport; drives the track translate. */\n readonly firstVisible: number;\n /** `true` once the page count exceeds the visible window (track glides). */\n readonly windowed: boolean;\n}\n\n/** Visible dot count in the viewport before the track scrolls. */\nconst VISIBLE = 7;\n/** Pages flanking the centred current page inside the viewport. */\nconst HALF = Math.floor(VISIBLE / 2);\n\n/**\n * Build the full dot sequence plus the viewport anchor. Every page gets a dot;\n * for large counts the dots that fall outside the centred `VISIBLE` window are\n * shrunk to `small` (they sit off-screen behind the viewport clip and shrink as\n * they glide out), and the two dots at each truncated visible edge step down\n * medium -> small (iOS page-control edge-shrink). The consumer translates the\n * track by `firstVisible` so navigation slides the strip instead of reshuffling\n * the DOM - the active dot stays centred and the row glides under it.\n */\nfunction buildDots(current: number, total: number): DotModel {\n const count = Math.max(0, total);\n if (count === 0) {\n return { dots: [], firstVisible: 0, windowed: false };\n }\n const windowed = count > VISIBLE;\n const clamped = Math.min(Math.max(current, 0), count - 1);\n const firstVisible = windowed ? Math.min(Math.max(clamped - HALF, 0), count - VISIBLE) : 0;\n const lastVisible = windowed ? firstVisible + VISIBLE - 1 : count - 1;\n const moreBefore = firstVisible > 0;\n const moreAfter = lastVisible < count - 1;\n\n const dots: Dot[] = [];\n for (let i = 0; i < count; i++) {\n let size: DotSize = 'full';\n if (windowed) {\n if (i < firstVisible || i > lastVisible) {\n size = 'small';\n } else if (moreBefore && i === firstVisible) {\n size = 'small';\n } else if (moreBefore && i === firstVisible + 1) {\n size = 'medium';\n } else if (moreAfter && i === lastVisible) {\n size = 'small';\n } else if (moreAfter && i === lastVisible - 1) {\n size = 'medium';\n }\n }\n dots.push({ index: i, size });\n }\n return { dots, firstVisible, windowed };\n}\n\nfunction dotsEqual(a: DotModel, b: DotModel): boolean {\n if (a === b) {\n return true;\n }\n if (a.firstVisible !== b.firstVisible || a.windowed !== b.windowed) {\n return false;\n }\n if (a.dots.length !== b.dots.length) {\n return false;\n }\n return a.dots.every((d, i) => d.index === b.dots[i].index && d.size === b.dots[i].size);\n}\n\n/**\n * The dots indicator: one circular `<button>` per page inside a clipped viewport\n * track. The active dot carries `aria-current=\"page\"`; every dot exposes its page\n * name via `aria-label` (the circle is decorative). Click navigates through the\n * brain, gated while busy. For large counts the track glides (CSS transform\n * transition) to keep the active dot centred, iOS page-control style, instead of\n * reshuffling the DOM. Dot DOM + windowing live here, not in a shared atom.\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-dots.component.ts\n * @since 0.1.0\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/dots/dots</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-skins/dots</example-url>\n */\n@Component({\n selector: 'cngx-pgn-dots',\n exportAs: 'cngxPgnDots',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n <div class=\"cngx-paginator__dots\" [class.cngx-paginator__dots--windowed]=\"model().windowed\">\n <div class=\"cngx-paginator__dots-track\" [style.--cngx-paginator-dots-shift]=\"model().firstVisible\">\n @for (dot of model().dots; track dot.index) {\n <button\n type=\"button\"\n class=\"cngx-paginator__dot\"\n [class.cngx-paginator__dot--current]=\"isCurrent(dot.index)\"\n [attr.data-size]=\"dot.size\"\n [attr.aria-current]=\"isCurrent(dot.index) ? 'page' : null\"\n [attr.aria-label]=\"config.ariaLabels.page(dot.index + 1)\"\n [attr.aria-disabled]=\"host.isBusy() ? 'true' : null\"\n (click)=\"goto(dot.index)\"\n ></button>\n }\n </div>\n </div>\n `,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorDots {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n protected readonly config = injectPaginatorConfig();\n\n /**\n * The rendered dots + viewport anchor. Structural `equal` keeps the reference\n * stable across recomputes that yield an identical model, so the `@for` does\n * not churn (signal-equality rule).\n */\n protected readonly model = computed<DotModel>(\n () => buildDots(this.host.pageIndex(), this.host.totalPages()),\n { equal: dotsEqual },\n );\n\n protected isCurrent(index: number): boolean {\n return index === this.host.pageIndex();\n }\n\n protected goto(index: number): void {\n this.host.setPage(index);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/**\n * Page-status readout: renders \"Page n of m\" for the current page. Pure\n * derivation from the host `pageIndex()`/`totalPages()` signals - no local\n * state, no writes. It is the visible counterpart of the\n * `announcements.pageChange` live-region phrasing, and the collapse target the\n * responsive number row swaps to once the paginator's container narrows. Text\n * comes from the config `pageStatus` formatter, so it localises with the rest of\n * the cascade; tabular figures keep the numerals from reflowing as the page\n * changes.\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-status.component.ts\n * @since 0.1.0\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/status/readout</example-url>\n */\n@Component({\n selector: 'cngx-pgn-status',\n exportAs: 'cngxPgnStatus',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `<span class=\"cngx-paginator__status\" [innerHTML]=\"text()\"></span>`,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorStatus {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n private readonly config = injectPaginatorConfig();\n\n /** Formatted \"Page n of m\" readout from the config formatter (1-based page). */\n protected readonly text = computed<string>(() =>\n this.config.formats.pageStatus(this.host.pageIndex() + 1, this.host.totalPages()),\n );\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxProgress } from '@cngx/ui/feedback';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/**\n * Progress-rail segment: a horizontal rail whose fill tracks the current page\n * position, with an overlaid knob riding the fill edge. The track, fill, and\n * `role=\"progressbar\"` a11y are composed from the `CngxProgress` atom - not\n * reinvented here (same precedent as the progress-bar stepper). The only new\n * part is the position knob, a decorative (`aria-hidden`) dot positioned by an\n * inline `inset-inline-start.%`, which `CngxProgress` cannot express. The fill\n * percentage derives purely from the host `pageIndex()`/`totalPages()` signals -\n * no local state, no writes.\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-rail.component.ts\n * @since 0.1.0\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/rail/rail</example-url>\n */\n@Component({\n selector: 'cngx-pgn-rail',\n exportAs: 'cngxPgnRail',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxProgress],\n template: `\n <div class=\"cngx-paginator__rail\">\n <cngx-progress\n variant=\"linear\"\n [progress]=\"fillPercent()\"\n [label]=\"config.ariaLabels.railPosition\"\n />\n <span\n class=\"cngx-paginator__rail-knob\"\n aria-hidden=\"true\"\n [style.inset-inline-start.%]=\"fillPercent()\"\n ></span>\n </div>\n `,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorRail {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n protected readonly config = injectPaginatorConfig();\n\n /**\n * Fill percentage (0-100) of the current page across the page span. A single\n * page (or none) reads 0; the last page reads 100. Drives both the composed\n * `cngx-progress` `[progress]` and the knob's inline position.\n */\n protected readonly fillPercent = computed<number>(() => {\n const total = this.host.totalPages();\n return total <= 1 ? 0 : (this.host.pageIndex() / (total - 1)) * 100;\n });\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxRipple } from '@cngx/common/interactive';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/**\n * Load-more segment: an append-don't-replace trigger over the same brain. \\\n * One `host.next()` button plus a `shown / total` count readout. The cumulative\n * slice is derived by the brain (`host.cumulativeRange()`); this segment holds\n * no accumulation state - the consumer slices its own array from\n * `cumulativeRange()`.\n *\n * Disabled (and so a no-op) on the last page or while busy. \\\n * `aria-disabled` (not native `disabled`) keeps the button focusable so AT hears the bound\n * state, matching the nav segments; the busy/position reason is already spoken\n * by the shell live region.\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-load-more.component.ts\n * @since 0.1.0\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/load-more/button</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-modes/load-more</example-url>\n */\n@Component({\n selector: 'cngx-pgn-load-more',\n exportAs: 'cngxPgnLoadMore',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxRipple],\n template: `\n <button\n type=\"button\"\n class=\"cngx-paginator__button cngx-paginator__load-more\"\n cngxRipple\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-disabled]=\"disabled()\"\n (click)=\"handleClick()\"\n >\n <span class=\"cngx-paginator__load-more-label\">{{ ariaLabel() }}</span>\n @if (!host.isLast()) {\n <span class=\"cngx-paginator__load-more-count\" aria-hidden=\"true\">\n {{ shown() }} / {{ host.total() }}\n </span>\n }\n </button>\n `,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorLoadMore {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n private readonly config = injectPaginatorConfig();\n\n /**\n * Accessible name from the config cascade. On the last page the actionable\n * `Load more` name is replaced with the exhausted-state `allLoaded` label so\n * AT does not announce an action on the disabled button.\n */\n protected readonly ariaLabel = computed(() =>\n this.host.isLast()\n ? this.config.ariaLabels.allLoaded(this.host.total())\n : this.config.ariaLabels.loadMore,\n );\n\n /** Disabled on the last page or while busy - the trigger becomes a no-op. */\n protected readonly disabled = computed(() => this.host.isLast() || this.host.isBusy());\n\n /**\n * Items revealed so far. The brain's `cumulativeRange()` upper bound is\n * uncapped (`(pageIndex + 1) * pageSize`), so a partial final page is clamped\n * to `total` here for an honest readout.\n */\n protected readonly shown = computed<number>(() =>\n Math.min(this.host.cumulativeRange()[1], this.host.total()),\n );\n\n /** Reveal the next page. Guarded so a disabled click is a no-op. */\n protected handleClick(): void {\n if (this.disabled()) {\n return;\n }\n this.host.next();\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxInfiniteScroll } from '@cngx/common/layout';\n\nimport { injectPaginatorConfig } from '../paginator-config';\nimport { CNGX_PAGINATOR_HOST } from '../paginator-host.token';\n\n/**\n * Infinite-scroll segment: a bottom-of-list sentinel that auto-advances the\n * page as it scrolls into view, composing `CngxInfiniteScroll`. \\\n * The in-template sentinel binds the directive's `[enabled]` / `[loading]` inputs and its\n * `(loadMore)` output directly to the `CNGX_PAGINATOR_HOST` signals, so the\n * directive's built-in debounce, busy-gate, enabled-disable, and auto-disconnect\n * own the auto-advance double-fire guard - this segment adds no\n * `IntersectionObserver` code of its own.\n *\n * The directive sits on the sentinel element (not as a `hostDirective`) precisely so its `[enabled]` / `[loading]`\n * inputs can bind to the host-token signals; a static `hostDirectives`\n * declaration could not express that wiring.\n *\n * Like `cngx-pgn-load-more`, this stays a thin trigger atom: it injects\n * `CNGX_PAGINATOR_HOST`, holds no accumulation state, and renders no async view\n * of its own. \\\n * The consumer slices its own array from the brain's\n * `cumulativeRange()`; the busy / error / end experience belongs to the consumer\n * or to a composing container, keeping the segment reusable unchanged.\n *\n * Exhausted state: once `host.isLast()` the sentinel disables (`enabled` is\n * `false`, so the observer disconnects). \\\n * It swaps its busy affordance for the\n * `allLoaded` end label only after the final load settles (`!host.isBusy()`),\n * so it never claims \"all loaded\" while the last batch is still arriving, and\n * the tail is never a silent or stale spinner.\n *\n * `[root]` / `[rootMargin]` forward straight to the composed directive so a\n * consumer can point the sentinel at a bounded scroll container (a feed box)\n * rather than the viewport, and tune the pre-fetch distance. They are plain\n * passthrough config - the segment still owns no observer code and no state.\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-infinite.component.ts\n * @since 0.1.0\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/infinite/sentinel</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-modes/infinite</example-url>\n */\n@Component({\n selector: 'cngx-pgn-infinite',\n exportAs: 'cngxPgnInfinite',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxInfiniteScroll],\n template: `\n <div\n class=\"cngx-paginator__infinite\"\n cngxInfiniteScroll\n [enabled]=\"!host.isLast()\"\n [loading]=\"host.isBusy()\"\n [root]=\"root()\"\n [rootMargin]=\"rootMargin()\"\n (loadMore)=\"host.next()\"\n >\n @if (isExhausted()) {\n <span class=\"cngx-paginator__infinite-end\">{{ endLabel() }}</span>\n } @else {\n <span class=\"cngx-paginator__infinite-spinner\" aria-hidden=\"true\"></span>\n <span class=\"cngx-paginator__infinite-status\">{{ busyLabel() }}</span>\n }\n </div>\n `,\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorInfinite {\n protected readonly host = inject(CNGX_PAGINATOR_HOST);\n private readonly config = injectPaginatorConfig();\n\n /**\n * CSS selector for the scroll container the sentinel is watched within.\n * `null` (default) observes the viewport. Forwarded to `CngxInfiniteScroll`.\n */\n readonly root = input<string | null>(null);\n\n /**\n * Pre-fetch margin around the scroll container, forwarded to\n * `CngxInfiniteScroll`. The directive default loads ~200px before the\n * sentinel is visible.\n */\n readonly rootMargin = input<string>('0px 0px 200px 0px');\n\n /**\n * Exhausted: the last page is reached AND its load has settled. Gating on\n * `!isBusy()` keeps the spinner up while the final batch is still loading, so\n * the segment never claims \"all loaded\" before the last rows arrive.\n */\n protected readonly isExhausted = computed(() => this.host.isLast() && !this.host.isBusy());\n\n /**\n * Exhausted-state label from the config cascade, reused from the load-more\n * segment so both append modes speak the same \"all N loaded\" end state rather\n * than leaving the tail implicit.\n */\n protected readonly endLabel = computed(() => this.config.ariaLabels.allLoaded(this.host.total()));\n\n /** Status text shown beside the spinner while more pages remain. */\n protected readonly busyLabel = computed(() => this.config.announcements.loading);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n inject,\n linkedSignal,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { CngxRovingItem, CngxRovingTabindex } from '@cngx/common/a11y';\nimport { CNGX_BUCKET_PAGINATE_HOST } from '@cngx/common/data';\n\nimport { injectPaginatorConfig } from '../paginator-config';\n\n/**\n * Alphabetical / category chips: a `role=\"group\"` toggle strip over the\n * {@link CngxBucketPaginate} range model. \\\n * One `<button>` per bucket; the active\n * bucket carries `aria-pressed`, an empty bucket is `disabled`. The model is\n * injected through `CNGX_BUCKET_PAGINATE_HOST`, never the concrete directive\n * class, so the strip stays decompose-ready.\n *\n * Every chip's pressed / disabled / name state is a `computed()` read of the\n * host signals - nothing is synced. An empty chip is not a silent dead control: \\\n * its accessible name comes from `ariaLabels.emptyBucket(label)`, which states\n * the bucket has no items, so AT hears the reason the chip is disabled.\n *\n * Keyboard navigation reuses `CngxRovingTabindex` / `CngxRovingItem` (no new\n * keyboard code, matching `cngx-pgn-pages`): \\\n * arrows move the focus cursor and\n * skip disabled chips, the single tab stop tracks the active bucket, and\n * activation commits via `select()`.\n *\n * @category ui/paginator\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/paginator/segments/paginator-alpha.component.ts\n * @since 0.1.0\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-parts/alpha/strip</example-url>\n * <example-url>http://localhost:4200/#/ui/paginator/paginator-modes/alphabetical</example-url>\n */\n@Component({\n selector: 'cngx-pgn-alpha',\n exportAs: 'cngxPgnAlpha',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CngxRovingTabindex, CngxRovingItem],\n template: `\n <div\n class=\"cngx-paginator__alpha\"\n role=\"group\"\n [attr.aria-label]=\"config.ariaLabels.bucketGroup\"\n cngxRovingTabindex\n [(activeIndex)]=\"rovingIndex\"\n >\n @for (bucket of host.buckets(); track bucket.label) {\n @let isEmpty = host.isEmpty(bucket.label);\n <button\n type=\"button\"\n cngxRovingItem\n [cngxRovingItemDisabled]=\"isEmpty\"\n class=\"cngx-paginator__button cngx-paginator__alpha-chip\"\n [class.cngx-paginator__alpha-chip--active]=\"isActive(bucket.label)\"\n [attr.aria-pressed]=\"isActive(bucket.label) ? 'true' : 'false'\"\n [attr.aria-label]=\"chipLabel(bucket.label)\"\n [disabled]=\"isEmpty\"\n (click)=\"select(bucket.label)\"\n >\n {{ bucket.label }}\n </button>\n }\n </div>\n `,\n // The bucket strip is a standalone sibling of the page-index brain - it is\n // used WITHOUT the `cngx-paginator` shell, so it must ship the structural base\n // (chip chrome, roving button geometry) itself rather than relying on the\n // shell to inline it.\n styleUrls: ['../../../common/data/paginate/styles/paginator-base.css'],\n host: { class: 'cngx-paginator__segment' },\n})\nexport class CngxPaginatorAlpha {\n protected readonly host = inject(CNGX_BUCKET_PAGINATE_HOST);\n protected readonly config = injectPaginatorConfig();\n\n /**\n * Roving focus cursor. A `linkedSignal` so the strip's single tab stop tracks\n * the active bucket (Tab lands on the pressed chip) yet still moves freely\n * under the arrow keys; when nothing is selected it falls back to the first\n * non-empty chip so Tab never lands on a disabled control.\n */\n protected readonly rovingIndex = linkedSignal<number>(() => {\n const buckets = this.host.buckets();\n const active = this.host.active();\n if (active !== null) {\n const index = buckets.findIndex((bucket) => bucket.label === active);\n if (index !== -1) {\n return index;\n }\n }\n const firstEnabled = buckets.findIndex((bucket) => !this.host.isEmpty(bucket.label));\n return firstEnabled === -1 ? 0 : firstEnabled;\n });\n\n protected isActive(label: string): boolean {\n return this.host.active() === label;\n }\n\n /**\n * Accessible name: the available chip uses `ariaLabels.bucket`; an empty chip\n * swaps to `ariaLabels.emptyBucket` so the disabled control states its reason.\n */\n protected chipLabel(label: string): string {\n return this.host.isEmpty(label)\n ? this.config.ariaLabels.emptyBucket(label)\n : this.config.ariaLabels.bucket(label);\n }\n\n protected select(label: string): void {\n this.host.select(label);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAwJA;AACO,MAAM,uBAAuB,GAAwB;AAC1D,IAAA,UAAU,EAAE;AACV,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,QAAQ,EAAE,eAAe;AACzB,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,CAAC,IAAI,KAAK,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE;AAC9B,QAAA,SAAS,EAAE,YAAY;AACvB,QAAA,YAAY,EAAE,gBAAgB;AAC9B,QAAA,QAAQ,EAAE,YAAY;AACtB,QAAA,W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