@4sh/ui-kit 0.16.0 → 0.17.0

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 (219) hide show
  1. package/README.fr.md +10 -10
  2. package/README.md +10 -10
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
  4. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
  6. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
  8. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  9. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
  10. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
  11. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
  12. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
  13. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
  14. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  15. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -1000
  16. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  17. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
  18. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
  19. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2048
  20. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  21. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
  22. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
  23. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
  24. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
  25. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
  26. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  27. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
  28. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
  31. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
  32. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
  33. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -138
  34. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  35. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -257
  36. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  37. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -312
  38. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  39. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
  40. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  41. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -199
  42. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  43. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
  44. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
  45. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
  46. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
  47. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
  48. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  49. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
  50. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  51. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
  52. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  53. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
  54. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  55. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
  56. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  57. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
  58. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  59. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
  60. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
  61. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -137
  62. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  63. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
  64. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
  65. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
  66. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
  67. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
  68. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  69. package/fesm2022/4sh-ui-kit-forms.mjs +721 -638
  70. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  71. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
  72. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  73. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
  74. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
  75. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
  76. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
  77. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
  78. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
  79. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
  80. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
  82. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  83. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
  84. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
  85. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
  86. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
  87. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
  88. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  89. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
  90. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  91. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
  92. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
  93. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
  94. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
  95. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
  96. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  97. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
  98. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  99. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
  100. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  101. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
  102. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  103. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
  104. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
  105. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
  106. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  107. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
  108. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  109. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
  110. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  111. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
  112. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  113. package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
  114. package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
  115. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
  116. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
  117. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
  118. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  119. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
  120. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  121. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
  122. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  123. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
  124. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  125. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
  126. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  127. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
  128. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  129. package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
  130. package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
  131. package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
  132. package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
  133. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
  134. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  135. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
  136. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  137. package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
  138. package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
  139. package/fesm2022/4sh-ui-kit-types.mjs +0 -12
  140. package/fesm2022/4sh-ui-kit.mjs +3 -15
  141. package/fesm2022/4sh-ui-kit.mjs.map +1 -1
  142. package/mcp/data/component-api.json +299 -2
  143. package/mcp/data/text-search-docs.json +149 -9
  144. package/mcp/data/ui-config.json +378 -1
  145. package/mcp/index.js +8190 -2876
  146. package/mcp/package.json +1 -1
  147. package/package.json +5 -1
  148. package/styles/component-vars.scss +22 -1
  149. package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
  150. package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
  151. package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
  152. package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
  153. package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
  154. package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
  155. package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +573 -376
  156. package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
  157. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
  158. package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
  159. package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
  160. package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
  161. package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
  162. package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
  163. package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
  164. package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -59
  165. package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -96
  166. package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -104
  167. package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
  168. package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -118
  169. package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
  170. package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
  171. package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
  172. package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
  173. package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
  174. package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
  175. package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
  176. package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
  177. package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
  178. package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -56
  179. package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
  180. package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
  181. package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
  182. package/types/4sh-ui-kit-forms.d.ts +275 -194
  183. package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
  184. package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
  185. package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
  186. package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
  187. package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
  188. package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
  189. package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
  190. package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
  191. package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
  192. package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
  193. package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
  194. package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
  195. package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
  196. package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
  197. package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
  198. package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
  199. package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
  200. package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
  201. package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
  202. package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
  203. package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
  204. package/types/4sh-ui-kit-motion.d.ts +117 -67
  205. package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
  206. package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
  207. package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
  208. package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
  209. package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
  210. package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
  211. package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
  212. package/types/4sh-ui-kit-overlay.d.ts +6 -6
  213. package/types/4sh-ui-kit-ripple.d.ts +99 -74
  214. package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
  215. package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
  216. package/types/4sh-ui-kit-theming.d.ts +27 -29
  217. package/types/4sh-ui-kit-types.d.ts +6 -5
  218. package/types/4sh-ui-kit.d.ts +4 -3
  219. package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
@@ -1,250 +1,711 @@
1
- import * as i0 from '@angular/core';
2
- import { input, numberAttribute, model, booleanAttribute, output, contentChild, linkedSignal, computed, Component } from '@angular/core';
3
- import { NgTemplateOutlet } from '@angular/common';
4
- import * as i1 from '@angular/forms';
5
- import { FormsModule } from '@angular/forms';
6
- import { UiIcon } from '@4sh/ui-kit/base/ui-icon';
7
- import { UiSelect } from '@4sh/ui-kit/forms/ui-select';
8
-
9
- /** @ignore Sentinel used in the page-item list to mark an ellipsis gap. */
1
+ import * as i0 from "@angular/core";
2
+ import { Component, booleanAttribute, computed, contentChild, input, linkedSignal, model, numberAttribute, output } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ import * as i1 from "@angular/forms";
5
+ import { FormsModule } from "@angular/forms";
6
+ import { UiIcon } from "@4sh/ui-kit/base/ui-icon";
7
+ import { UiSelect } from "@4sh/ui-kit/forms/ui-select";
10
8
  const ELLIPSIS = -1;
11
- /**
12
- * ui-paginator — standalone pagination bar.
13
- *
14
- * Faithful to the Figma `ui-paginator` component: native `<button>` controls
15
- * and page numbers styled straight with the `actions.low` tokens (current
16
- * page in `actions.high`), 40px squircles (`--radius-default`), `ui-icon`
17
- * chevrons, plus an `ui-select` rows-per-page choice. Used by `ui-table`,
18
- * works standalone over any collection: bind `totalRecords`, `rows` and the
19
- * two-way `first`.
20
- *
21
- * With `ellipsis`, long page lists collapse to `1 2 3 … 30 31 32`
22
- * (`boundaryCount` pages on each edge + the current page neighborhood).
23
- * The control icons and the page-link content are overridable via the
24
- * `#firsticon` / `#previcon` / `#nexticon` / `#lasticon` / `#pagelink`
25
- * templates.
26
- */
27
- class UiPaginator {
28
- constructor() {
29
- /** Total number of rows across all pages. */
30
- this.totalRecords = input(0, { ...(ngDevMode ? { debugName: "totalRecords" } : /* istanbul ignore next */ {}), transform: numberAttribute });
31
- /** Rows per page. Two-way bindable (updated by the rows-per-page select). */
32
- this.rows = model(10, /* @ts-ignore */
33
- ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
34
- /** Index of the first displayed row. Two-way bindable (programmatic pagination). */
35
- this.first = model(0, /* @ts-ignore */
36
- ...(ngDevMode ? [{ debugName: "first" }] : /* istanbul ignore next */ []));
37
- /** Maximum number of page-number buttons (windowed mode, without `ellipsis`). */
38
- this.pageLinks = input(5, { ...(ngDevMode ? { debugName: "pageLinks" } : /* istanbul ignore next */ {}), transform: numberAttribute });
39
- /** Compact mode: `1 2 3 … 30 31 32` — edges + current-page neighborhood, `…` in the gaps. */
40
- this.ellipsis = input(false, { ...(ngDevMode ? { debugName: "ellipsis" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
41
- /** Pages always shown on each edge in `ellipsis` mode. */
42
- this.boundaryCount = input(3, { ...(ngDevMode ? { debugName: "boundaryCount" } : /* istanbul ignore next */ {}), transform: numberAttribute });
43
- /** Choices offered in the rows-per-page select (omit to hide it — Figma `selectPage`). */
44
- this.rowsPerPageOptions = input(/* @ts-ignore */
45
- ...(ngDevMode ? [undefined, { debugName: "rowsPerPageOptions" }] : /* istanbul ignore next */ []));
46
- /** Shows the "first page" / "last page" edge controls. */
47
- this.showFirstLastIcon = input(true, { ...(ngDevMode ? { debugName: "showFirstLastIcon" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
48
- /** Shows the page-number buttons (disable for a compact prev/next bar). */
49
- this.showPageLinks = input(true, { ...(ngDevMode ? { debugName: "showPageLinks" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
50
- /** Shows the current-page report (e.g. `1 - 10 sur 120`). */
51
- this.showCurrentPageReport = input(false, { ...(ngDevMode ? { debugName: "showCurrentPageReport" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
52
- /** Report pattern — placeholders: `{first}` `{last}` `{rows}` `{page}` `{pageCount}` `{totalRecords}`. */
53
- this.currentPageReportTemplate = input('{first} - {last} sur {totalRecords}', /* @ts-ignore */
54
- ...(ngDevMode ? [{ debugName: "currentPageReportTemplate" }] : /* istanbul ignore next */ []));
55
- /** Disables every control. */
56
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
57
- /** Ripple Effect */
58
- this.ripple = input(true, { ...(ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
59
- /** Accessible name of the navigation landmark. */
60
- this.ariaLabel = input('Pagination', /* @ts-ignore */
61
- ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
62
- /** Accessible name pattern of a page button (`{page}` is replaced). */
63
- this.pageAriaLabel = input('Page {page}', /* @ts-ignore */
64
- ...(ngDevMode ? [{ debugName: "pageAriaLabel" }] : /* istanbul ignore next */ []));
65
- /** Accessible names of the edge / step controls. */
66
- this.firstPageAriaLabel = input('Première page', /* @ts-ignore */
67
- ...(ngDevMode ? [{ debugName: "firstPageAriaLabel" }] : /* istanbul ignore next */ []));
68
- /** Accessible name of the previous-page control. */
69
- this.prevPageAriaLabel = input('Page précédente', /* @ts-ignore */
70
- ...(ngDevMode ? [{ debugName: "prevPageAriaLabel" }] : /* istanbul ignore next */ []));
71
- /** Accessible name of the next-page control. */
72
- this.nextPageAriaLabel = input('Page suivante', /* @ts-ignore */
73
- ...(ngDevMode ? [{ debugName: "nextPageAriaLabel" }] : /* istanbul ignore next */ []));
74
- /** Accessible name of the last-page control. */
75
- this.lastPageAriaLabel = input('Dernière page', /* @ts-ignore */
76
- ...(ngDevMode ? [{ debugName: "lastPageAriaLabel" }] : /* istanbul ignore next */ []));
77
- /** Accessible name of the rows-per-page select. */
78
- this.rowsPerPageAriaLabel = input('Lignes par page', /* @ts-ignore */
79
- ...(ngDevMode ? [{ debugName: "rowsPerPageAriaLabel" }] : /* istanbul ignore next */ []));
80
- /** Emitted on any pagination change (navigation or rows-per-page). */
81
- this.pageChange = output();
82
- // --- Templates (projected) — override the default content of each element.
83
- /** @ignore Icon of the "first page" control. */
84
- this.firstIconTemplate = contentChild('firsticon', /* @ts-ignore */
85
- ...(ngDevMode ? [{ debugName: "firstIconTemplate" }] : /* istanbul ignore next */ []));
86
- /** @ignore Icon of the "previous page" control. */
87
- this.prevIconTemplate = contentChild('previcon', /* @ts-ignore */
88
- ...(ngDevMode ? [{ debugName: "prevIconTemplate" }] : /* istanbul ignore next */ []));
89
- /** @ignore Icon of the "next page" control. */
90
- this.nextIconTemplate = contentChild('nexticon', /* @ts-ignore */
91
- ...(ngDevMode ? [{ debugName: "nextIconTemplate" }] : /* istanbul ignore next */ []));
92
- /** @ignore Icon of the "last page" control. */
93
- this.lastIconTemplate = contentChild('lasticon', /* @ts-ignore */
94
- ...(ngDevMode ? [{ debugName: "lastIconTemplate" }] : /* istanbul ignore next */ []));
95
- /** @ignore Content of a page-number button (context: number, page, active). */
96
- this.pageLinkTemplate = contentChild('pagelink', /* @ts-ignore */
97
- ...(ngDevMode ? [{ debugName: "pageLinkTemplate" }] : /* istanbul ignore next */ []));
98
- /** @ignore Free content rendered before the controls (context: pagination state). */
99
- this.startTemplate = contentChild('start', /* @ts-ignore */
100
- ...(ngDevMode ? [{ debugName: "startTemplate" }] : /* istanbul ignore next */ []));
101
- /** @ignore Free content rendered after the rows-per-page select (context: pagination state). */
102
- this.endTemplate = contentChild('end', /* @ts-ignore */
103
- ...(ngDevMode ? [{ debugName: "endTemplate" }] : /* istanbul ignore next */ []));
104
- /** @ignore Rich current-page report (overrides `currentPageReportTemplate`). */
105
- this.reportTemplate = contentChild('report', /* @ts-ignore */
106
- ...(ngDevMode ? [{ debugName: "reportTemplate" }] : /* istanbul ignore next */ []));
107
- /** @ignore Exposes the ellipsis sentinel to the template. */
108
- this.ELLIPSIS = ELLIPSIS;
109
- /** @ignore Rows-per-page kept locally so the select can drive it. */
110
- this.rowsState = linkedSignal(() => Math.max(1, this.rows()), /* @ts-ignore */
111
- ...(ngDevMode ? [{ debugName: "rowsState" }] : /* istanbul ignore next */ []));
112
- /** @ignore */
113
- this.pageCount = computed(() => Math.max(1, Math.ceil(this.totalRecords() / this.rowsState())), /* @ts-ignore */
114
- ...(ngDevMode ? [{ debugName: "pageCount" }] : /* istanbul ignore next */ []));
115
- /** @ignore `first` clamped to the dataset (data may shrink under the cursor). */
116
- this.clampedFirst = computed(() => {
117
- const maxFirst = (this.pageCount() - 1) * this.rowsState();
118
- return Math.min(Math.max(0, this.first()), maxFirst);
119
- }, /* @ts-ignore */
120
- ...(ngDevMode ? [{ debugName: "clampedFirst" }] : /* istanbul ignore next */ []));
121
- /** @ignore Zero-based current page. */
122
- this.currentPage = computed(() => Math.floor(this.clampedFirst() / this.rowsState()), /* @ts-ignore */
123
- ...(ngDevMode ? [{ debugName: "currentPage" }] : /* istanbul ignore next */ []));
124
- /** @ignore Page items to render: zero-based page indexes, `ELLIPSIS` for a gap. */
125
- this.pageItems = computed(() => {
126
- const count = this.pageCount();
127
- const current = this.currentPage();
128
- if (!this.ellipsis()) {
129
- // Windowed mode: `pageLinks` numbers centered on the current page.
130
- const visible = Math.min(this.pageLinks(), count);
131
- const start = Math.max(0, Math.min(current - Math.floor(visible / 2), count - visible));
132
- return Array.from({ length: visible }, (_, i) => start + i);
133
- }
134
- // Compact mode: edges + current neighborhood, ellipsis in the gaps.
135
- const boundary = Math.max(1, this.boundaryCount());
136
- const pages = new Set();
137
- for (let i = 0; i < Math.min(boundary, count); i++)
138
- pages.add(i);
139
- for (let i = Math.max(0, current - 1); i <= Math.min(count - 1, current + 1); i++)
140
- pages.add(i);
141
- for (let i = Math.max(0, count - boundary); i < count; i++)
142
- pages.add(i);
143
- const sorted = [...pages].sort((a, b) => a - b);
144
- const items = [];
145
- let previous = null;
146
- for (const page of sorted) {
147
- if (previous != null) {
148
- // A single missing page is cheaper to show than an ellipsis.
149
- if (page - previous === 2)
150
- items.push(previous + 1);
151
- else if (page - previous > 2)
152
- items.push(ELLIPSIS);
153
- }
154
- items.push(page);
155
- previous = page;
156
- }
157
- return items;
158
- }, /* @ts-ignore */
159
- ...(ngDevMode ? [{ debugName: "pageItems" }] : /* istanbul ignore next */ []));
160
- /** @ignore Pagination snapshot (templates + report placeholders). */
161
- this.state = computed(() => {
162
- const total = this.totalRecords();
163
- const rows = this.rowsState();
164
- const first = this.clampedFirst();
165
- return {
166
- first: total === 0 ? 0 : first + 1,
167
- last: Math.min(first + rows, total),
168
- rows,
169
- page: this.currentPage(),
170
- pageCount: this.pageCount(),
171
- totalRecords: total,
172
- };
173
- }, /* @ts-ignore */
174
- ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
175
- /** @ignore Context shared by the #start / #end / #report templates. */
176
- this.stateContext = computed(() => ({ $implicit: this.state() }), /* @ts-ignore */
177
- ...(ngDevMode ? [{ debugName: "stateContext" }] : /* istanbul ignore next */ []));
178
- /** @ignore Report pattern with its placeholders resolved. */
179
- this.reportText = computed(() => {
180
- const state = this.state();
181
- return this.currentPageReportTemplate()
182
- .replace('{first}', String(state.first))
183
- .replace('{last}', String(state.last))
184
- .replace('{rows}', String(state.rows))
185
- .replace('{page}', String(state.page + 1))
186
- .replace('{pageCount}', String(state.pageCount))
187
- .replace('{totalRecords}', String(state.totalRecords));
188
- }, /* @ts-ignore */
189
- ...(ngDevMode ? [{ debugName: "reportText" }] : /* istanbul ignore next */ []));
190
- /** @ignore */
191
- this.isFirstPage = computed(() => this.currentPage() === 0, /* @ts-ignore */
192
- ...(ngDevMode ? [{ debugName: "isFirstPage" }] : /* istanbul ignore next */ []));
193
- /** @ignore */
194
- this.isLastPage = computed(() => this.currentPage() >= this.pageCount() - 1, /* @ts-ignore */
195
- ...(ngDevMode ? [{ debugName: "isLastPage" }] : /* istanbul ignore next */ []));
196
- }
197
- /** @ignore */
198
- goToPage(page) {
199
- const target = Math.min(Math.max(0, page), this.pageCount() - 1);
200
- const first = target * this.rowsState();
201
- if (first === this.first())
202
- return;
203
- this.first.set(first);
204
- this.emitPage();
205
- }
206
- /** @ignore */
207
- onRowsPerPageChange(rows) {
208
- const value = Number(rows);
209
- if (!Number.isFinite(value) || value <= 0 || value === this.rowsState())
210
- return;
211
- this.rowsState.set(value);
212
- this.rows.set(value);
213
- this.first.set(0);
214
- this.emitPage();
215
- }
216
- /** @ignore */
217
- pageLabel(page) {
218
- return this.pageAriaLabel().replace('{page}', String(page + 1));
219
- }
220
- /** @ignore */
221
- pageLinkContext(page) {
222
- return { $implicit: page + 1, page, active: page === this.currentPage() };
223
- }
224
- /** @ignore */
225
- emitPage() {
226
- this.pageChange.emit({
227
- first: this.clampedFirst(),
228
- rows: this.rowsState(),
229
- page: this.currentPage(),
230
- pageCount: this.pageCount(),
231
- });
232
- }
233
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiPaginator, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
234
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiPaginator, isStandalone: true, selector: "ui-paginator", inputs: { totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, first: { classPropertyName: "first", publicName: "first", isSignal: true, isRequired: false, transformFunction: null }, pageLinks: { classPropertyName: "pageLinks", publicName: "pageLinks", isSignal: true, isRequired: false, transformFunction: null }, ellipsis: { classPropertyName: "ellipsis", publicName: "ellipsis", isSignal: true, isRequired: false, transformFunction: null }, boundaryCount: { classPropertyName: "boundaryCount", publicName: "boundaryCount", isSignal: true, isRequired: false, transformFunction: null }, rowsPerPageOptions: { classPropertyName: "rowsPerPageOptions", publicName: "rowsPerPageOptions", isSignal: true, isRequired: false, transformFunction: null }, showFirstLastIcon: { classPropertyName: "showFirstLastIcon", publicName: "showFirstLastIcon", isSignal: true, isRequired: false, transformFunction: null }, showPageLinks: { classPropertyName: "showPageLinks", publicName: "showPageLinks", isSignal: true, isRequired: false, transformFunction: null }, showCurrentPageReport: { classPropertyName: "showCurrentPageReport", publicName: "showCurrentPageReport", isSignal: true, isRequired: false, transformFunction: null }, currentPageReportTemplate: { classPropertyName: "currentPageReportTemplate", publicName: "currentPageReportTemplate", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ripple: { classPropertyName: "ripple", publicName: "ripple", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, pageAriaLabel: { classPropertyName: "pageAriaLabel", publicName: "pageAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, firstPageAriaLabel: { classPropertyName: "firstPageAriaLabel", publicName: "firstPageAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, prevPageAriaLabel: { classPropertyName: "prevPageAriaLabel", publicName: "prevPageAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, nextPageAriaLabel: { classPropertyName: "nextPageAriaLabel", publicName: "nextPageAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, lastPageAriaLabel: { classPropertyName: "lastPageAriaLabel", publicName: "lastPageAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, rowsPerPageAriaLabel: { classPropertyName: "rowsPerPageAriaLabel", publicName: "rowsPerPageAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { rows: "rowsChange", first: "firstChange", pageChange: "pageChange" }, queries: [{ propertyName: "firstIconTemplate", first: true, predicate: ["firsticon"], descendants: true, isSignal: true }, { propertyName: "prevIconTemplate", first: true, predicate: ["previcon"], descendants: true, isSignal: true }, { propertyName: "nextIconTemplate", first: true, predicate: ["nexticon"], descendants: true, isSignal: true }, { propertyName: "lastIconTemplate", first: true, predicate: ["lasticon"], descendants: true, isSignal: true }, { propertyName: "pageLinkTemplate", first: true, predicate: ["pagelink"], descendants: true, isSignal: true }, { propertyName: "startTemplate", first: true, predicate: ["start"], descendants: true, isSignal: true }, { propertyName: "endTemplate", first: true, predicate: ["end"], descendants: true, isSignal: true }, { propertyName: "reportTemplate", first: true, predicate: ["report"], descendants: true, isSignal: true }], ngImport: i0, template: "<nav class=\"ui-paginator\" [attr.aria-label]=\"ariaLabel()\">\n @if (startTemplate(); as tpl) {\n <div class=\"ui-paginator-start\">\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n </div>\n }\n\n <div class=\"ui-paginator-content\">\n @if (showCurrentPageReport()) {\n <span class=\"ui-paginator-report\">\n @if (reportTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n } @else {\n {{ reportText() }}\n }\n </span>\n }\n\n @if (showFirstLastIcon()) {\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-control\"\n [disabled]=\"disabled() || isFirstPage()\"\n [attr.aria-label]=\"firstPageAriaLabel()\"\n (click)=\"goToPage(0)\"\n >\n @if (firstIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon name=\"angles-left\" size=\"sm\" />\n }\n </button>\n }\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-control\"\n [disabled]=\"disabled() || isFirstPage()\"\n [attr.aria-label]=\"prevPageAriaLabel()\"\n (click)=\"goToPage(currentPage() - 1)\"\n >\n @if (prevIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon name=\"chevron-left\" size=\"sm\" />\n }\n </button>\n\n @if (showPageLinks()) {\n <div class=\"ui-paginator-pages\">\n @for (item of pageItems(); track $index) {\n @if (item === ELLIPSIS) {\n <span class=\"ui-paginator-ellipsis\" aria-hidden=\"true\">&hellip;</span>\n } @else {\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-page\"\n [class._current]=\"item === currentPage()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"pageLabel(item)\"\n [attr.aria-current]=\"item === currentPage() ? 'page' : null\"\n (click)=\"goToPage(item)\"\n >\n @if (pageLinkTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"pageLinkContext(item)\"\n />\n } @else {\n {{ item + 1 }}\n }\n </button>\n }\n }\n </div>\n }\n\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-control\"\n [disabled]=\"disabled() || isLastPage()\"\n [attr.aria-label]=\"nextPageAriaLabel()\"\n (click)=\"goToPage(currentPage() + 1)\"\n >\n @if (nextIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon name=\"chevron-right\" size=\"sm\" />\n }\n </button>\n @if (showFirstLastIcon()) {\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-control\"\n [disabled]=\"disabled() || isLastPage()\"\n [attr.aria-label]=\"lastPageAriaLabel()\"\n (click)=\"goToPage(pageCount() - 1)\"\n >\n @if (lastIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon name=\"angles-right\" size=\"sm\" />\n }\n </button>\n }\n </div>\n\n @if (rowsPerPageOptions()?.length) {\n <div class=\"ui-paginator-rows\">\n <ui-select\n size=\"small\"\n [options]=\"rowsPerPageOptions()!\"\n [ngModel]=\"rowsState()\"\n [disabled]=\"disabled()\"\n [ariaLabel]=\"rowsPerPageAriaLabel()\"\n (valueChange)=\"onRowsPerPageChange($event)\"\n />\n </div>\n }\n\n @if (endTemplate(); as tpl) {\n <div class=\"ui-paginator-end\">\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n </div>\n }\n</nav>\n", styles: [".ui-paginator{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:var(--ui-paginator-bar-gap, var(--units-2xl));padding:var(--units-default)}.ui-paginator-content{display:flex;align-items:center;gap:var(--ui-paginator-blocks-gap, var(--units-default))}.ui-paginator-control{display:inline-flex;align-items:center;justify-content:center;height:var(--ui-paginator-button-size, 2rem);min-width:var(--ui-paginator-button-size, 2rem);border:none;border-radius:var(--ui-paginator-button-radius, var(--radius-default));background-color:var(--ui-paginator-button-surface, var(--navigation-high-surface-default));color:var(--ui-paginator-button-color, var(--navigation-high-content-default));font-family:var(--ui-paginator-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-md);font-weight:var(--ui-paginator-weight, var(--weight-bold));line-height:1;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-paginator-control:hover:not(:disabled){background-color:var(--ui-paginator-button-surface-hover, var(--navigation-high-surface-hover));color:var(--ui-paginator-button-color-hover, var(--navigation-high-content-hover))}.ui-paginator-control:focus-visible{outline:none;background-color:var(--ui-paginator-button-surface-focus, var(--navigation-high-surface-focused));color:var(--ui-paginator-button-color-focus, var(--navigation-high-content-focused));box-shadow:0 0 0 var(--ui-paginator-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-paginator-button-focus-ring-color, var(--navigation-high-stroke-focused))}.ui-paginator-control:active:not(:disabled){background-color:var(--ui-paginator-button-surface-pressed, var(--navigation-high-surface-pressed));color:var(--ui-paginator-button-color-pressed, var(--navigation-high-content-pressed))}.ui-paginator-control:disabled{cursor:not-allowed}.ui-paginator-control{width:var(--ui-paginator-button-size, 2rem);padding:0 var(--units-sm)}.ui-paginator-control:disabled{background-color:var(--ui-paginator-control-surface-disabled, var(--navigation-high-surface-disabled));color:var(--ui-paginator-control-color-disabled, var(--navigation-high-content-disabled))}.ui-paginator-pages{display:flex;align-items:center;gap:var(--ui-paginator-numbers-gap, var(--units-sm))}.ui-paginator-page{display:inline-flex;align-items:center;justify-content:center;height:var(--ui-paginator-button-size, 2rem);min-width:var(--ui-paginator-button-size, 2rem);border:none;border-radius:var(--ui-paginator-button-radius, var(--radius-default));background-color:var(--ui-paginator-button-surface, var(--navigation-high-surface-default));color:var(--ui-paginator-button-color, var(--navigation-high-content-default));font-family:var(--ui-paginator-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-md);font-weight:var(--ui-paginator-weight, var(--weight-bold));line-height:1;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-paginator-page:hover:not(:disabled){background-color:var(--ui-paginator-button-surface-hover, var(--navigation-high-surface-hover));color:var(--ui-paginator-button-color-hover, var(--navigation-high-content-hover))}.ui-paginator-page:focus-visible{outline:none;background-color:var(--ui-paginator-button-surface-focus, var(--navigation-high-surface-focused));color:var(--ui-paginator-button-color-focus, var(--navigation-high-content-focused));box-shadow:0 0 0 var(--ui-paginator-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-paginator-button-focus-ring-color, var(--navigation-high-stroke-focused))}.ui-paginator-page:active:not(:disabled){background-color:var(--ui-paginator-button-surface-pressed, var(--navigation-high-surface-pressed));color:var(--ui-paginator-button-color-pressed, var(--navigation-high-content-pressed))}.ui-paginator-page:disabled{cursor:not-allowed}.ui-paginator-page{padding:0 var(--units-md)}.ui-paginator-page:disabled{background-color:var(--ui-paginator-page-surface-disabled, var(--actions-low-surface-disabled));color:var(--ui-paginator-page-color-disabled, var(--actions-low-content-disabled))}.ui-paginator-page._current,.ui-paginator-page._current:hover:not(:disabled),.ui-paginator-page._current:focus-visible,.ui-paginator-page._current:active:not(:disabled),.ui-paginator-page._current:disabled{background-color:var(--ui-paginator-page-surface-current, var(--navigation-high-surface-active));color:var(--ui-paginator-page-color-current, var(--navigation-high-content-active))}.ui-paginator-report{display:inline-flex;align-items:center;color:var(--ui-paginator-report-color, var(--global-text-muted));font-size:var(--size-typography-text-md);white-space:nowrap}.ui-paginator-start,.ui-paginator-end{display:inline-flex;align-items:center;gap:var(--units-sm);color:var(--ui-paginator-slot-color, var(--global-text-muted));font-size:var(--size-typography-text-md)}.ui-paginator-ellipsis{display:inline-flex;align-items:center;justify-content:center;height:var(--ui-paginator-button-size, 2rem);min-width:var(--ui-paginator-button-size, 2rem);color:var(--ui-paginator-ellipsis-color, var(--navigation-high-content-default));font-size:var(--size-typography-text-md);font-weight:var(--ui-paginator-weight, var(--weight-bold));-webkit-user-select:none;user-select:none}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }, { kind: "component", type: UiSelect, selector: "ui-select", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "group", "optionGroupLabel", "optionGroupChildren", "dataKey", "multiple", "checkmark", "checkbox", "maxSelectedLabels", "overflowLabel", "placeholder", "showClear", "clearAriaLabel", "icon", "showIcon", "filter", "filterPlaceholder", "filterAriaLabel", "filterBy", "autofocusFilter", "resetFilterOnHide", "ripple", "emptyMessage", "emptyFilterMessage", "editable", "loading", "autoOptionFocus", "selectOnFocus", "focusOnHover", "virtualScroll", "virtualScrollItemSize", "lazy", "scrollHeight", "autoFlip", "panelStyleClass", "panelWidth"], outputs: ["valueChange", "opened", "closed", "cleared", "filterChange", "lazyLoad", "inputFocus", "inputBlur"] }] }); }
235
- }
236
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiPaginator, decorators: [{
237
- type: Component,
238
- args: [{ selector: 'ui-paginator', imports: [NgTemplateOutlet, FormsModule, UiIcon, UiSelect], template: "<nav class=\"ui-paginator\" [attr.aria-label]=\"ariaLabel()\">\n @if (startTemplate(); as tpl) {\n <div class=\"ui-paginator-start\">\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n </div>\n }\n\n <div class=\"ui-paginator-content\">\n @if (showCurrentPageReport()) {\n <span class=\"ui-paginator-report\">\n @if (reportTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n } @else {\n {{ reportText() }}\n }\n </span>\n }\n\n @if (showFirstLastIcon()) {\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-control\"\n [disabled]=\"disabled() || isFirstPage()\"\n [attr.aria-label]=\"firstPageAriaLabel()\"\n (click)=\"goToPage(0)\"\n >\n @if (firstIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon name=\"angles-left\" size=\"sm\" />\n }\n </button>\n }\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-control\"\n [disabled]=\"disabled() || isFirstPage()\"\n [attr.aria-label]=\"prevPageAriaLabel()\"\n (click)=\"goToPage(currentPage() - 1)\"\n >\n @if (prevIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon name=\"chevron-left\" size=\"sm\" />\n }\n </button>\n\n @if (showPageLinks()) {\n <div class=\"ui-paginator-pages\">\n @for (item of pageItems(); track $index) {\n @if (item === ELLIPSIS) {\n <span class=\"ui-paginator-ellipsis\" aria-hidden=\"true\">&hellip;</span>\n } @else {\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-page\"\n [class._current]=\"item === currentPage()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"pageLabel(item)\"\n [attr.aria-current]=\"item === currentPage() ? 'page' : null\"\n (click)=\"goToPage(item)\"\n >\n @if (pageLinkTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"pageLinkContext(item)\"\n />\n } @else {\n {{ item + 1 }}\n }\n </button>\n }\n }\n </div>\n }\n\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-control\"\n [disabled]=\"disabled() || isLastPage()\"\n [attr.aria-label]=\"nextPageAriaLabel()\"\n (click)=\"goToPage(currentPage() + 1)\"\n >\n @if (nextIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon name=\"chevron-right\" size=\"sm\" />\n }\n </button>\n @if (showFirstLastIcon()) {\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-control\"\n [disabled]=\"disabled() || isLastPage()\"\n [attr.aria-label]=\"lastPageAriaLabel()\"\n (click)=\"goToPage(pageCount() - 1)\"\n >\n @if (lastIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon name=\"angles-right\" size=\"sm\" />\n }\n </button>\n }\n </div>\n\n @if (rowsPerPageOptions()?.length) {\n <div class=\"ui-paginator-rows\">\n <ui-select\n size=\"small\"\n [options]=\"rowsPerPageOptions()!\"\n [ngModel]=\"rowsState()\"\n [disabled]=\"disabled()\"\n [ariaLabel]=\"rowsPerPageAriaLabel()\"\n (valueChange)=\"onRowsPerPageChange($event)\"\n />\n </div>\n }\n\n @if (endTemplate(); as tpl) {\n <div class=\"ui-paginator-end\">\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n </div>\n }\n</nav>\n", styles: [".ui-paginator{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:var(--ui-paginator-bar-gap, var(--units-2xl));padding:var(--units-default)}.ui-paginator-content{display:flex;align-items:center;gap:var(--ui-paginator-blocks-gap, var(--units-default))}.ui-paginator-control{display:inline-flex;align-items:center;justify-content:center;height:var(--ui-paginator-button-size, 2rem);min-width:var(--ui-paginator-button-size, 2rem);border:none;border-radius:var(--ui-paginator-button-radius, var(--radius-default));background-color:var(--ui-paginator-button-surface, var(--navigation-high-surface-default));color:var(--ui-paginator-button-color, var(--navigation-high-content-default));font-family:var(--ui-paginator-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-md);font-weight:var(--ui-paginator-weight, var(--weight-bold));line-height:1;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-paginator-control:hover:not(:disabled){background-color:var(--ui-paginator-button-surface-hover, var(--navigation-high-surface-hover));color:var(--ui-paginator-button-color-hover, var(--navigation-high-content-hover))}.ui-paginator-control:focus-visible{outline:none;background-color:var(--ui-paginator-button-surface-focus, var(--navigation-high-surface-focused));color:var(--ui-paginator-button-color-focus, var(--navigation-high-content-focused));box-shadow:0 0 0 var(--ui-paginator-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-paginator-button-focus-ring-color, var(--navigation-high-stroke-focused))}.ui-paginator-control:active:not(:disabled){background-color:var(--ui-paginator-button-surface-pressed, var(--navigation-high-surface-pressed));color:var(--ui-paginator-button-color-pressed, var(--navigation-high-content-pressed))}.ui-paginator-control:disabled{cursor:not-allowed}.ui-paginator-control{width:var(--ui-paginator-button-size, 2rem);padding:0 var(--units-sm)}.ui-paginator-control:disabled{background-color:var(--ui-paginator-control-surface-disabled, var(--navigation-high-surface-disabled));color:var(--ui-paginator-control-color-disabled, var(--navigation-high-content-disabled))}.ui-paginator-pages{display:flex;align-items:center;gap:var(--ui-paginator-numbers-gap, var(--units-sm))}.ui-paginator-page{display:inline-flex;align-items:center;justify-content:center;height:var(--ui-paginator-button-size, 2rem);min-width:var(--ui-paginator-button-size, 2rem);border:none;border-radius:var(--ui-paginator-button-radius, var(--radius-default));background-color:var(--ui-paginator-button-surface, var(--navigation-high-surface-default));color:var(--ui-paginator-button-color, var(--navigation-high-content-default));font-family:var(--ui-paginator-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-md);font-weight:var(--ui-paginator-weight, var(--weight-bold));line-height:1;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-paginator-page:hover:not(:disabled){background-color:var(--ui-paginator-button-surface-hover, var(--navigation-high-surface-hover));color:var(--ui-paginator-button-color-hover, var(--navigation-high-content-hover))}.ui-paginator-page:focus-visible{outline:none;background-color:var(--ui-paginator-button-surface-focus, var(--navigation-high-surface-focused));color:var(--ui-paginator-button-color-focus, var(--navigation-high-content-focused));box-shadow:0 0 0 var(--ui-paginator-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-paginator-button-focus-ring-color, var(--navigation-high-stroke-focused))}.ui-paginator-page:active:not(:disabled){background-color:var(--ui-paginator-button-surface-pressed, var(--navigation-high-surface-pressed));color:var(--ui-paginator-button-color-pressed, var(--navigation-high-content-pressed))}.ui-paginator-page:disabled{cursor:not-allowed}.ui-paginator-page{padding:0 var(--units-md)}.ui-paginator-page:disabled{background-color:var(--ui-paginator-page-surface-disabled, var(--actions-low-surface-disabled));color:var(--ui-paginator-page-color-disabled, var(--actions-low-content-disabled))}.ui-paginator-page._current,.ui-paginator-page._current:hover:not(:disabled),.ui-paginator-page._current:focus-visible,.ui-paginator-page._current:active:not(:disabled),.ui-paginator-page._current:disabled{background-color:var(--ui-paginator-page-surface-current, var(--navigation-high-surface-active));color:var(--ui-paginator-page-color-current, var(--navigation-high-content-active))}.ui-paginator-report{display:inline-flex;align-items:center;color:var(--ui-paginator-report-color, var(--global-text-muted));font-size:var(--size-typography-text-md);white-space:nowrap}.ui-paginator-start,.ui-paginator-end{display:inline-flex;align-items:center;gap:var(--units-sm);color:var(--ui-paginator-slot-color, var(--global-text-muted));font-size:var(--size-typography-text-md)}.ui-paginator-ellipsis{display:inline-flex;align-items:center;justify-content:center;height:var(--ui-paginator-button-size, 2rem);min-width:var(--ui-paginator-button-size, 2rem);color:var(--ui-paginator-ellipsis-color, var(--navigation-high-content-default));font-size:var(--size-typography-text-md);font-weight:var(--ui-paginator-weight, var(--weight-bold));-webkit-user-select:none;user-select:none}\n"] }]
239
- }], propDecorators: { totalRecords: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalRecords", required: false }] }], rows: [{ type: i0.Input, args: [{ isSignal: true, alias: "rows", required: false }] }, { type: i0.Output, args: ["rowsChange"] }], first: [{ type: i0.Input, args: [{ isSignal: true, alias: "first", required: false }] }, { type: i0.Output, args: ["firstChange"] }], pageLinks: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageLinks", required: false }] }], ellipsis: [{ type: i0.Input, args: [{ isSignal: true, alias: "ellipsis", required: false }] }], boundaryCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "boundaryCount", required: false }] }], rowsPerPageOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowsPerPageOptions", required: false }] }], showFirstLastIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFirstLastIcon", required: false }] }], showPageLinks: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPageLinks", required: false }] }], showCurrentPageReport: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCurrentPageReport", required: false }] }], currentPageReportTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPageReportTemplate", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ripple: [{ type: i0.Input, args: [{ isSignal: true, alias: "ripple", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], pageAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageAriaLabel", required: false }] }], firstPageAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstPageAriaLabel", required: false }] }], prevPageAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "prevPageAriaLabel", required: false }] }], nextPageAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextPageAriaLabel", required: false }] }], lastPageAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "lastPageAriaLabel", required: false }] }], rowsPerPageAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowsPerPageAriaLabel", required: false }] }], pageChange: [{ type: i0.Output, args: ["pageChange"] }], firstIconTemplate: [{ type: i0.ContentChild, args: ['firsticon', { isSignal: true }] }], prevIconTemplate: [{ type: i0.ContentChild, args: ['previcon', { isSignal: true }] }], nextIconTemplate: [{ type: i0.ContentChild, args: ['nexticon', { isSignal: true }] }], lastIconTemplate: [{ type: i0.ContentChild, args: ['lasticon', { isSignal: true }] }], pageLinkTemplate: [{ type: i0.ContentChild, args: ['pagelink', { isSignal: true }] }], startTemplate: [{ type: i0.ContentChild, args: ['start', { isSignal: true }] }], endTemplate: [{ type: i0.ContentChild, args: ['end', { isSignal: true }] }], reportTemplate: [{ type: i0.ContentChild, args: ['report', { isSignal: true }] }] } });
240
-
241
- /*
242
- * Public API Surface of ui-kit/ui-paginator
243
- */
244
-
245
- /**
246
- * Generated bundle index. Do not edit.
247
- */
248
-
9
+ var UiPaginator = class UiPaginator {
10
+ constructor() {
11
+ this.totalRecords = input(0, {
12
+ ...ngDevMode ? { debugName: "totalRecords" } : /* istanbul ignore next */ {},
13
+ transform: numberAttribute
14
+ });
15
+ this.rows = model(10, ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
16
+ this.first = model(0, ...ngDevMode ? [{ debugName: "first" }] : /* istanbul ignore next */ []);
17
+ this.pageLinks = input(5, {
18
+ ...ngDevMode ? { debugName: "pageLinks" } : /* istanbul ignore next */ {},
19
+ transform: numberAttribute
20
+ });
21
+ this.ellipsis = input(false, {
22
+ ...ngDevMode ? { debugName: "ellipsis" } : /* istanbul ignore next */ {},
23
+ transform: booleanAttribute
24
+ });
25
+ this.boundaryCount = input(3, {
26
+ ...ngDevMode ? { debugName: "boundaryCount" } : /* istanbul ignore next */ {},
27
+ transform: numberAttribute
28
+ });
29
+ this.rowsPerPageOptions = input(...ngDevMode ? [void 0, { debugName: "rowsPerPageOptions" }] : /* istanbul ignore next */ []);
30
+ this.showFirstLastIcon = input(true, {
31
+ ...ngDevMode ? { debugName: "showFirstLastIcon" } : /* istanbul ignore next */ {},
32
+ transform: booleanAttribute
33
+ });
34
+ this.showPageLinks = input(true, {
35
+ ...ngDevMode ? { debugName: "showPageLinks" } : /* istanbul ignore next */ {},
36
+ transform: booleanAttribute
37
+ });
38
+ this.showCurrentPageReport = input(false, {
39
+ ...ngDevMode ? { debugName: "showCurrentPageReport" } : /* istanbul ignore next */ {},
40
+ transform: booleanAttribute
41
+ });
42
+ this.currentPageReportTemplate = input("{first} - {last} sur {totalRecords}", ...ngDevMode ? [{ debugName: "currentPageReportTemplate" }] : /* istanbul ignore next */ []);
43
+ this.disabled = input(false, {
44
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
45
+ transform: booleanAttribute
46
+ });
47
+ this.ripple = input(true, {
48
+ ...ngDevMode ? { debugName: "ripple" } : /* istanbul ignore next */ {},
49
+ transform: booleanAttribute
50
+ });
51
+ this.ariaLabel = input("Pagination", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
52
+ this.pageAriaLabel = input("Page {page}", ...ngDevMode ? [{ debugName: "pageAriaLabel" }] : /* istanbul ignore next */ []);
53
+ this.firstPageAriaLabel = input("Première page", ...ngDevMode ? [{ debugName: "firstPageAriaLabel" }] : /* istanbul ignore next */ []);
54
+ this.prevPageAriaLabel = input("Page précédente", ...ngDevMode ? [{ debugName: "prevPageAriaLabel" }] : /* istanbul ignore next */ []);
55
+ this.nextPageAriaLabel = input("Page suivante", ...ngDevMode ? [{ debugName: "nextPageAriaLabel" }] : /* istanbul ignore next */ []);
56
+ this.lastPageAriaLabel = input("Dernière page", ...ngDevMode ? [{ debugName: "lastPageAriaLabel" }] : /* istanbul ignore next */ []);
57
+ this.rowsPerPageAriaLabel = input("Lignes par page", ...ngDevMode ? [{ debugName: "rowsPerPageAriaLabel" }] : /* istanbul ignore next */ []);
58
+ this.pageChange = output();
59
+ this.firstIconTemplate = contentChild("firsticon", ...ngDevMode ? [{ debugName: "firstIconTemplate" }] : /* istanbul ignore next */ []);
60
+ this.prevIconTemplate = contentChild("previcon", ...ngDevMode ? [{ debugName: "prevIconTemplate" }] : /* istanbul ignore next */ []);
61
+ this.nextIconTemplate = contentChild("nexticon", ...ngDevMode ? [{ debugName: "nextIconTemplate" }] : /* istanbul ignore next */ []);
62
+ this.lastIconTemplate = contentChild("lasticon", ...ngDevMode ? [{ debugName: "lastIconTemplate" }] : /* istanbul ignore next */ []);
63
+ this.pageLinkTemplate = contentChild("pagelink", ...ngDevMode ? [{ debugName: "pageLinkTemplate" }] : /* istanbul ignore next */ []);
64
+ this.startTemplate = contentChild("start", ...ngDevMode ? [{ debugName: "startTemplate" }] : /* istanbul ignore next */ []);
65
+ this.endTemplate = contentChild("end", ...ngDevMode ? [{ debugName: "endTemplate" }] : /* istanbul ignore next */ []);
66
+ this.reportTemplate = contentChild("report", ...ngDevMode ? [{ debugName: "reportTemplate" }] : /* istanbul ignore next */ []);
67
+ this.ELLIPSIS = ELLIPSIS;
68
+ this.rowsState = linkedSignal(() => Math.max(1, this.rows()), ...ngDevMode ? [{ debugName: "rowsState" }] : /* istanbul ignore next */ []);
69
+ this.pageCount = computed(() => Math.max(1, Math.ceil(this.totalRecords() / this.rowsState())), ...ngDevMode ? [{ debugName: "pageCount" }] : /* istanbul ignore next */ []);
70
+ this.clampedFirst = computed(() => {
71
+ const maxFirst = (this.pageCount() - 1) * this.rowsState();
72
+ return Math.min(Math.max(0, this.first()), maxFirst);
73
+ }, ...ngDevMode ? [{ debugName: "clampedFirst" }] : /* istanbul ignore next */ []);
74
+ this.currentPage = computed(() => Math.floor(this.clampedFirst() / this.rowsState()), ...ngDevMode ? [{ debugName: "currentPage" }] : /* istanbul ignore next */ []);
75
+ this.pageItems = computed(() => {
76
+ const count = this.pageCount();
77
+ const current = this.currentPage();
78
+ if (!this.ellipsis()) {
79
+ const visible = Math.min(this.pageLinks(), count);
80
+ const start = Math.max(0, Math.min(current - Math.floor(visible / 2), count - visible));
81
+ return Array.from({ length: visible }, (_, i) => start + i);
82
+ }
83
+ const boundary = Math.max(1, this.boundaryCount());
84
+ const pages = /* @__PURE__ */ new Set();
85
+ for (let i = 0; i < Math.min(boundary, count); i++) pages.add(i);
86
+ for (let i = Math.max(0, current - 1); i <= Math.min(count - 1, current + 1); i++) pages.add(i);
87
+ for (let i = Math.max(0, count - boundary); i < count; i++) pages.add(i);
88
+ const sorted = [...pages].sort((a, b) => a - b);
89
+ const items = [];
90
+ let previous = null;
91
+ for (const page of sorted) {
92
+ if (previous != null) {
93
+ if (page - previous === 2) items.push(previous + 1);
94
+ else if (page - previous > 2) items.push(ELLIPSIS);
95
+ }
96
+ items.push(page);
97
+ previous = page;
98
+ }
99
+ return items;
100
+ }, ...ngDevMode ? [{ debugName: "pageItems" }] : /* istanbul ignore next */ []);
101
+ this.state = computed(() => {
102
+ const total = this.totalRecords();
103
+ const rows = this.rowsState();
104
+ const first = this.clampedFirst();
105
+ return {
106
+ first: total === 0 ? 0 : first + 1,
107
+ last: Math.min(first + rows, total),
108
+ rows,
109
+ page: this.currentPage(),
110
+ pageCount: this.pageCount(),
111
+ totalRecords: total
112
+ };
113
+ }, ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
114
+ this.stateContext = computed(() => ({ $implicit: this.state() }), ...ngDevMode ? [{ debugName: "stateContext" }] : /* istanbul ignore next */ []);
115
+ this.reportText = computed(() => {
116
+ const state = this.state();
117
+ return this.currentPageReportTemplate().replace("{first}", String(state.first)).replace("{last}", String(state.last)).replace("{rows}", String(state.rows)).replace("{page}", String(state.page + 1)).replace("{pageCount}", String(state.pageCount)).replace("{totalRecords}", String(state.totalRecords));
118
+ }, ...ngDevMode ? [{ debugName: "reportText" }] : /* istanbul ignore next */ []);
119
+ this.isFirstPage = computed(() => this.currentPage() === 0, ...ngDevMode ? [{ debugName: "isFirstPage" }] : /* istanbul ignore next */ []);
120
+ this.isLastPage = computed(() => this.currentPage() >= this.pageCount() - 1, ...ngDevMode ? [{ debugName: "isLastPage" }] : /* istanbul ignore next */ []);
121
+ }
122
+ goToPage(page) {
123
+ const first = Math.min(Math.max(0, page), this.pageCount() - 1) * this.rowsState();
124
+ if (first === this.first()) return;
125
+ this.first.set(first);
126
+ this.emitPage();
127
+ }
128
+ onRowsPerPageChange(rows) {
129
+ const value = Number(rows);
130
+ if (!Number.isFinite(value) || value <= 0 || value === this.rowsState()) return;
131
+ this.rowsState.set(value);
132
+ this.rows.set(value);
133
+ this.first.set(0);
134
+ this.emitPage();
135
+ }
136
+ pageLabel(page) {
137
+ return this.pageAriaLabel().replace("{page}", String(page + 1));
138
+ }
139
+ pageLinkContext(page) {
140
+ return {
141
+ $implicit: page + 1,
142
+ page,
143
+ active: page === this.currentPage()
144
+ };
145
+ }
146
+ emitPage() {
147
+ this.pageChange.emit({
148
+ first: this.clampedFirst(),
149
+ rows: this.rowsState(),
150
+ page: this.currentPage(),
151
+ pageCount: this.pageCount()
152
+ });
153
+ }
154
+ static {
155
+ this.ɵfac = i0.ɵɵngDeclareFactory({
156
+ minVersion: "12.0.0",
157
+ version: "22.3.0",
158
+ ngImport: i0,
159
+ type: UiPaginator,
160
+ deps: [],
161
+ target: i0.ɵɵFactoryTarget.Component
162
+ });
163
+ }
164
+ static {
165
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
166
+ minVersion: "17.0.0",
167
+ version: "22.3.0",
168
+ type: UiPaginator,
169
+ isStandalone: true,
170
+ selector: "ui-paginator",
171
+ inputs: {
172
+ totalRecords: {
173
+ classPropertyName: "totalRecords",
174
+ publicName: "totalRecords",
175
+ isSignal: true,
176
+ isRequired: false,
177
+ transformFunction: null
178
+ },
179
+ rows: {
180
+ classPropertyName: "rows",
181
+ publicName: "rows",
182
+ isSignal: true,
183
+ isRequired: false,
184
+ transformFunction: null
185
+ },
186
+ first: {
187
+ classPropertyName: "first",
188
+ publicName: "first",
189
+ isSignal: true,
190
+ isRequired: false,
191
+ transformFunction: null
192
+ },
193
+ pageLinks: {
194
+ classPropertyName: "pageLinks",
195
+ publicName: "pageLinks",
196
+ isSignal: true,
197
+ isRequired: false,
198
+ transformFunction: null
199
+ },
200
+ ellipsis: {
201
+ classPropertyName: "ellipsis",
202
+ publicName: "ellipsis",
203
+ isSignal: true,
204
+ isRequired: false,
205
+ transformFunction: null
206
+ },
207
+ boundaryCount: {
208
+ classPropertyName: "boundaryCount",
209
+ publicName: "boundaryCount",
210
+ isSignal: true,
211
+ isRequired: false,
212
+ transformFunction: null
213
+ },
214
+ rowsPerPageOptions: {
215
+ classPropertyName: "rowsPerPageOptions",
216
+ publicName: "rowsPerPageOptions",
217
+ isSignal: true,
218
+ isRequired: false,
219
+ transformFunction: null
220
+ },
221
+ showFirstLastIcon: {
222
+ classPropertyName: "showFirstLastIcon",
223
+ publicName: "showFirstLastIcon",
224
+ isSignal: true,
225
+ isRequired: false,
226
+ transformFunction: null
227
+ },
228
+ showPageLinks: {
229
+ classPropertyName: "showPageLinks",
230
+ publicName: "showPageLinks",
231
+ isSignal: true,
232
+ isRequired: false,
233
+ transformFunction: null
234
+ },
235
+ showCurrentPageReport: {
236
+ classPropertyName: "showCurrentPageReport",
237
+ publicName: "showCurrentPageReport",
238
+ isSignal: true,
239
+ isRequired: false,
240
+ transformFunction: null
241
+ },
242
+ currentPageReportTemplate: {
243
+ classPropertyName: "currentPageReportTemplate",
244
+ publicName: "currentPageReportTemplate",
245
+ isSignal: true,
246
+ isRequired: false,
247
+ transformFunction: null
248
+ },
249
+ disabled: {
250
+ classPropertyName: "disabled",
251
+ publicName: "disabled",
252
+ isSignal: true,
253
+ isRequired: false,
254
+ transformFunction: null
255
+ },
256
+ ripple: {
257
+ classPropertyName: "ripple",
258
+ publicName: "ripple",
259
+ isSignal: true,
260
+ isRequired: false,
261
+ transformFunction: null
262
+ },
263
+ ariaLabel: {
264
+ classPropertyName: "ariaLabel",
265
+ publicName: "ariaLabel",
266
+ isSignal: true,
267
+ isRequired: false,
268
+ transformFunction: null
269
+ },
270
+ pageAriaLabel: {
271
+ classPropertyName: "pageAriaLabel",
272
+ publicName: "pageAriaLabel",
273
+ isSignal: true,
274
+ isRequired: false,
275
+ transformFunction: null
276
+ },
277
+ firstPageAriaLabel: {
278
+ classPropertyName: "firstPageAriaLabel",
279
+ publicName: "firstPageAriaLabel",
280
+ isSignal: true,
281
+ isRequired: false,
282
+ transformFunction: null
283
+ },
284
+ prevPageAriaLabel: {
285
+ classPropertyName: "prevPageAriaLabel",
286
+ publicName: "prevPageAriaLabel",
287
+ isSignal: true,
288
+ isRequired: false,
289
+ transformFunction: null
290
+ },
291
+ nextPageAriaLabel: {
292
+ classPropertyName: "nextPageAriaLabel",
293
+ publicName: "nextPageAriaLabel",
294
+ isSignal: true,
295
+ isRequired: false,
296
+ transformFunction: null
297
+ },
298
+ lastPageAriaLabel: {
299
+ classPropertyName: "lastPageAriaLabel",
300
+ publicName: "lastPageAriaLabel",
301
+ isSignal: true,
302
+ isRequired: false,
303
+ transformFunction: null
304
+ },
305
+ rowsPerPageAriaLabel: {
306
+ classPropertyName: "rowsPerPageAriaLabel",
307
+ publicName: "rowsPerPageAriaLabel",
308
+ isSignal: true,
309
+ isRequired: false,
310
+ transformFunction: null
311
+ }
312
+ },
313
+ outputs: {
314
+ rows: "rowsChange",
315
+ first: "firstChange",
316
+ pageChange: "pageChange"
317
+ },
318
+ queries: [
319
+ {
320
+ propertyName: "firstIconTemplate",
321
+ first: true,
322
+ predicate: ["firsticon"],
323
+ descendants: true,
324
+ isSignal: true
325
+ },
326
+ {
327
+ propertyName: "prevIconTemplate",
328
+ first: true,
329
+ predicate: ["previcon"],
330
+ descendants: true,
331
+ isSignal: true
332
+ },
333
+ {
334
+ propertyName: "nextIconTemplate",
335
+ first: true,
336
+ predicate: ["nexticon"],
337
+ descendants: true,
338
+ isSignal: true
339
+ },
340
+ {
341
+ propertyName: "lastIconTemplate",
342
+ first: true,
343
+ predicate: ["lasticon"],
344
+ descendants: true,
345
+ isSignal: true
346
+ },
347
+ {
348
+ propertyName: "pageLinkTemplate",
349
+ first: true,
350
+ predicate: ["pagelink"],
351
+ descendants: true,
352
+ isSignal: true
353
+ },
354
+ {
355
+ propertyName: "startTemplate",
356
+ first: true,
357
+ predicate: ["start"],
358
+ descendants: true,
359
+ isSignal: true
360
+ },
361
+ {
362
+ propertyName: "endTemplate",
363
+ first: true,
364
+ predicate: ["end"],
365
+ descendants: true,
366
+ isSignal: true
367
+ },
368
+ {
369
+ propertyName: "reportTemplate",
370
+ first: true,
371
+ predicate: ["report"],
372
+ descendants: true,
373
+ isSignal: true
374
+ }
375
+ ],
376
+ ngImport: i0,
377
+ template: "<nav class=\"ui-paginator\" [attr.aria-label]=\"ariaLabel()\">\n @if (startTemplate(); as tpl) {\n <div class=\"ui-paginator-start\">\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n </div>\n }\n\n <div class=\"ui-paginator-content\">\n @if (showCurrentPageReport()) {\n <span class=\"ui-paginator-report\">\n @if (reportTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n } @else {\n {{ reportText() }}\n }\n </span>\n }\n\n @if (showFirstLastIcon()) {\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-control\"\n [disabled]=\"disabled() || isFirstPage()\"\n [attr.aria-label]=\"firstPageAriaLabel()\"\n (click)=\"goToPage(0)\"\n >\n @if (firstIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon name=\"angles-left\" size=\"sm\" />\n }\n </button>\n }\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-control\"\n [disabled]=\"disabled() || isFirstPage()\"\n [attr.aria-label]=\"prevPageAriaLabel()\"\n (click)=\"goToPage(currentPage() - 1)\"\n >\n @if (prevIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon name=\"chevron-left\" size=\"sm\" />\n }\n </button>\n\n @if (showPageLinks()) {\n <div class=\"ui-paginator-pages\">\n @for (item of pageItems(); track $index) {\n @if (item === ELLIPSIS) {\n <span class=\"ui-paginator-ellipsis\" aria-hidden=\"true\">&hellip;</span>\n } @else {\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-page\"\n [class._current]=\"item === currentPage()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"pageLabel(item)\"\n [attr.aria-current]=\"item === currentPage() ? 'page' : null\"\n (click)=\"goToPage(item)\"\n >\n @if (pageLinkTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"pageLinkContext(item)\"\n />\n } @else {\n {{ item + 1 }}\n }\n </button>\n }\n }\n </div>\n }\n\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-control\"\n [disabled]=\"disabled() || isLastPage()\"\n [attr.aria-label]=\"nextPageAriaLabel()\"\n (click)=\"goToPage(currentPage() + 1)\"\n >\n @if (nextIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon name=\"chevron-right\" size=\"sm\" />\n }\n </button>\n @if (showFirstLastIcon()) {\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-control\"\n [disabled]=\"disabled() || isLastPage()\"\n [attr.aria-label]=\"lastPageAriaLabel()\"\n (click)=\"goToPage(pageCount() - 1)\"\n >\n @if (lastIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon name=\"angles-right\" size=\"sm\" />\n }\n </button>\n }\n </div>\n\n @if (rowsPerPageOptions()?.length) {\n <div class=\"ui-paginator-rows\">\n <ui-select\n size=\"small\"\n [options]=\"rowsPerPageOptions()!\"\n [ngModel]=\"rowsState()\"\n [disabled]=\"disabled()\"\n [ariaLabel]=\"rowsPerPageAriaLabel()\"\n (valueChange)=\"onRowsPerPageChange($event)\"\n />\n </div>\n }\n\n @if (endTemplate(); as tpl) {\n <div class=\"ui-paginator-end\">\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n </div>\n }\n</nav>\n",
378
+ styles: [".ui-paginator{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:var(--ui-paginator-bar-gap, var(--units-2xl));padding:var(--units-default)}.ui-paginator-content{display:flex;align-items:center;gap:var(--ui-paginator-blocks-gap, var(--units-default))}.ui-paginator-control{display:inline-flex;align-items:center;justify-content:center;height:var(--ui-paginator-button-size, 2rem);min-width:var(--ui-paginator-button-size, 2rem);border:none;border-radius:var(--ui-paginator-button-radius, var(--radius-default));background-color:var(--ui-paginator-button-surface, var(--navigation-high-surface-default));color:var(--ui-paginator-button-color, var(--navigation-high-content-default));font-family:var(--ui-paginator-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-md);font-weight:var(--ui-paginator-weight, var(--weight-bold));line-height:1;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-paginator-control:hover:not(:disabled){background-color:var(--ui-paginator-button-surface-hover, var(--navigation-high-surface-hover));color:var(--ui-paginator-button-color-hover, var(--navigation-high-content-hover))}.ui-paginator-control:focus-visible{outline:none;background-color:var(--ui-paginator-button-surface-focus, var(--navigation-high-surface-focused));color:var(--ui-paginator-button-color-focus, var(--navigation-high-content-focused));box-shadow:0 0 0 var(--ui-paginator-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-paginator-button-focus-ring-color, var(--navigation-high-stroke-focused))}.ui-paginator-control:active:not(:disabled){background-color:var(--ui-paginator-button-surface-pressed, var(--navigation-high-surface-pressed));color:var(--ui-paginator-button-color-pressed, var(--navigation-high-content-pressed))}.ui-paginator-control:disabled{cursor:not-allowed}.ui-paginator-control{width:var(--ui-paginator-button-size, 2rem);padding:0 var(--units-sm)}.ui-paginator-control:disabled{background-color:var(--ui-paginator-control-surface-disabled, var(--navigation-high-surface-disabled));color:var(--ui-paginator-control-color-disabled, var(--navigation-high-content-disabled))}.ui-paginator-pages{display:flex;align-items:center;gap:var(--ui-paginator-numbers-gap, var(--units-sm))}.ui-paginator-page{display:inline-flex;align-items:center;justify-content:center;height:var(--ui-paginator-button-size, 2rem);min-width:var(--ui-paginator-button-size, 2rem);border:none;border-radius:var(--ui-paginator-button-radius, var(--radius-default));background-color:var(--ui-paginator-button-surface, var(--navigation-high-surface-default));color:var(--ui-paginator-button-color, var(--navigation-high-content-default));font-family:var(--ui-paginator-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-md);font-weight:var(--ui-paginator-weight, var(--weight-bold));line-height:1;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-paginator-page:hover:not(:disabled){background-color:var(--ui-paginator-button-surface-hover, var(--navigation-high-surface-hover));color:var(--ui-paginator-button-color-hover, var(--navigation-high-content-hover))}.ui-paginator-page:focus-visible{outline:none;background-color:var(--ui-paginator-button-surface-focus, var(--navigation-high-surface-focused));color:var(--ui-paginator-button-color-focus, var(--navigation-high-content-focused));box-shadow:0 0 0 var(--ui-paginator-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-paginator-button-focus-ring-color, var(--navigation-high-stroke-focused))}.ui-paginator-page:active:not(:disabled){background-color:var(--ui-paginator-button-surface-pressed, var(--navigation-high-surface-pressed));color:var(--ui-paginator-button-color-pressed, var(--navigation-high-content-pressed))}.ui-paginator-page:disabled{cursor:not-allowed}.ui-paginator-page{padding:0 var(--units-md)}.ui-paginator-page:disabled{background-color:var(--ui-paginator-page-surface-disabled, var(--actions-low-surface-disabled));color:var(--ui-paginator-page-color-disabled, var(--actions-low-content-disabled))}.ui-paginator-page._current,.ui-paginator-page._current:hover:not(:disabled),.ui-paginator-page._current:focus-visible,.ui-paginator-page._current:active:not(:disabled),.ui-paginator-page._current:disabled{background-color:var(--ui-paginator-page-surface-current, var(--navigation-high-surface-active));color:var(--ui-paginator-page-color-current, var(--navigation-high-content-active))}.ui-paginator-report{display:inline-flex;align-items:center;color:var(--ui-paginator-report-color, var(--global-text-muted));font-size:var(--size-typography-text-md);white-space:nowrap}.ui-paginator-start,.ui-paginator-end{display:inline-flex;align-items:center;gap:var(--units-sm);color:var(--ui-paginator-slot-color, var(--global-text-muted));font-size:var(--size-typography-text-md)}.ui-paginator-ellipsis{display:inline-flex;align-items:center;justify-content:center;height:var(--ui-paginator-button-size, 2rem);min-width:var(--ui-paginator-button-size, 2rem);color:var(--ui-paginator-ellipsis-color, var(--navigation-high-content-default));font-size:var(--size-typography-text-md);font-weight:var(--ui-paginator-weight, var(--weight-bold));-webkit-user-select:none;user-select:none}\n"],
379
+ dependencies: [
380
+ {
381
+ kind: "directive",
382
+ type: NgTemplateOutlet,
383
+ selector: "[ngTemplateOutlet]",
384
+ inputs: [
385
+ "ngTemplateOutletContext",
386
+ "ngTemplateOutlet",
387
+ "ngTemplateOutletInjector"
388
+ ]
389
+ },
390
+ {
391
+ kind: "ngmodule",
392
+ type: FormsModule
393
+ },
394
+ {
395
+ kind: "directive",
396
+ type: i1.NgControlStatus,
397
+ selector: "[formControlName],[ngModel],[formControl]"
398
+ },
399
+ {
400
+ kind: "directive",
401
+ type: i1.NgModel,
402
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
403
+ inputs: [
404
+ "name",
405
+ "disabled",
406
+ "ngModel",
407
+ "ngModelOptions"
408
+ ],
409
+ outputs: ["ngModelChange"],
410
+ exportAs: ["ngModel"]
411
+ },
412
+ {
413
+ kind: "component",
414
+ type: UiIcon,
415
+ selector: "ui-icon",
416
+ inputs: [
417
+ "name",
418
+ "size",
419
+ "type",
420
+ "family",
421
+ "decorative",
422
+ "ariaLabel"
423
+ ]
424
+ },
425
+ {
426
+ kind: "component",
427
+ type: UiSelect,
428
+ selector: "ui-select",
429
+ inputs: [
430
+ "options",
431
+ "optionLabel",
432
+ "optionValue",
433
+ "optionDisabled",
434
+ "group",
435
+ "optionGroupLabel",
436
+ "optionGroupChildren",
437
+ "dataKey",
438
+ "multiple",
439
+ "checkmark",
440
+ "checkbox",
441
+ "maxSelectedLabels",
442
+ "overflowLabel",
443
+ "placeholder",
444
+ "showClear",
445
+ "clearAriaLabel",
446
+ "icon",
447
+ "showIcon",
448
+ "filter",
449
+ "filterPlaceholder",
450
+ "filterAriaLabel",
451
+ "filterBy",
452
+ "autofocusFilter",
453
+ "resetFilterOnHide",
454
+ "ripple",
455
+ "emptyMessage",
456
+ "emptyFilterMessage",
457
+ "editable",
458
+ "loading",
459
+ "autoOptionFocus",
460
+ "selectOnFocus",
461
+ "focusOnHover",
462
+ "virtualScroll",
463
+ "virtualScrollItemSize",
464
+ "lazy",
465
+ "scrollHeight",
466
+ "autoFlip",
467
+ "panelStyleClass",
468
+ "panelWidth"
469
+ ],
470
+ outputs: [
471
+ "valueChange",
472
+ "opened",
473
+ "closed",
474
+ "cleared",
475
+ "filterChange",
476
+ "lazyLoad",
477
+ "inputFocus",
478
+ "inputBlur"
479
+ ]
480
+ }
481
+ ]
482
+ });
483
+ }
484
+ };
485
+ i0.ɵɵngDeclareClassMetadata({
486
+ minVersion: "12.0.0",
487
+ version: "22.3.0",
488
+ ngImport: i0,
489
+ type: UiPaginator,
490
+ decorators: [{
491
+ type: Component,
492
+ args: [{
493
+ selector: "ui-paginator",
494
+ imports: [
495
+ NgTemplateOutlet,
496
+ FormsModule,
497
+ UiIcon,
498
+ UiSelect
499
+ ],
500
+ template: "<nav class=\"ui-paginator\" [attr.aria-label]=\"ariaLabel()\">\n @if (startTemplate(); as tpl) {\n <div class=\"ui-paginator-start\">\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n </div>\n }\n\n <div class=\"ui-paginator-content\">\n @if (showCurrentPageReport()) {\n <span class=\"ui-paginator-report\">\n @if (reportTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n } @else {\n {{ reportText() }}\n }\n </span>\n }\n\n @if (showFirstLastIcon()) {\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-control\"\n [disabled]=\"disabled() || isFirstPage()\"\n [attr.aria-label]=\"firstPageAriaLabel()\"\n (click)=\"goToPage(0)\"\n >\n @if (firstIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon name=\"angles-left\" size=\"sm\" />\n }\n </button>\n }\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-control\"\n [disabled]=\"disabled() || isFirstPage()\"\n [attr.aria-label]=\"prevPageAriaLabel()\"\n (click)=\"goToPage(currentPage() - 1)\"\n >\n @if (prevIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon name=\"chevron-left\" size=\"sm\" />\n }\n </button>\n\n @if (showPageLinks()) {\n <div class=\"ui-paginator-pages\">\n @for (item of pageItems(); track $index) {\n @if (item === ELLIPSIS) {\n <span class=\"ui-paginator-ellipsis\" aria-hidden=\"true\">&hellip;</span>\n } @else {\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-page\"\n [class._current]=\"item === currentPage()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"pageLabel(item)\"\n [attr.aria-current]=\"item === currentPage() ? 'page' : null\"\n (click)=\"goToPage(item)\"\n >\n @if (pageLinkTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"pageLinkContext(item)\"\n />\n } @else {\n {{ item + 1 }}\n }\n </button>\n }\n }\n </div>\n }\n\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-control\"\n [disabled]=\"disabled() || isLastPage()\"\n [attr.aria-label]=\"nextPageAriaLabel()\"\n (click)=\"goToPage(currentPage() + 1)\"\n >\n @if (nextIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon name=\"chevron-right\" size=\"sm\" />\n }\n </button>\n @if (showFirstLastIcon()) {\n <button\n type=\"button\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n class=\"ui-paginator-control\"\n [disabled]=\"disabled() || isLastPage()\"\n [attr.aria-label]=\"lastPageAriaLabel()\"\n (click)=\"goToPage(pageCount() - 1)\"\n >\n @if (lastIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <ui-icon name=\"angles-right\" size=\"sm\" />\n }\n </button>\n }\n </div>\n\n @if (rowsPerPageOptions()?.length) {\n <div class=\"ui-paginator-rows\">\n <ui-select\n size=\"small\"\n [options]=\"rowsPerPageOptions()!\"\n [ngModel]=\"rowsState()\"\n [disabled]=\"disabled()\"\n [ariaLabel]=\"rowsPerPageAriaLabel()\"\n (valueChange)=\"onRowsPerPageChange($event)\"\n />\n </div>\n }\n\n @if (endTemplate(); as tpl) {\n <div class=\"ui-paginator-end\">\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"stateContext()\" />\n </div>\n }\n</nav>\n",
501
+ styles: [".ui-paginator{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:var(--ui-paginator-bar-gap, var(--units-2xl));padding:var(--units-default)}.ui-paginator-content{display:flex;align-items:center;gap:var(--ui-paginator-blocks-gap, var(--units-default))}.ui-paginator-control{display:inline-flex;align-items:center;justify-content:center;height:var(--ui-paginator-button-size, 2rem);min-width:var(--ui-paginator-button-size, 2rem);border:none;border-radius:var(--ui-paginator-button-radius, var(--radius-default));background-color:var(--ui-paginator-button-surface, var(--navigation-high-surface-default));color:var(--ui-paginator-button-color, var(--navigation-high-content-default));font-family:var(--ui-paginator-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-md);font-weight:var(--ui-paginator-weight, var(--weight-bold));line-height:1;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-paginator-control:hover:not(:disabled){background-color:var(--ui-paginator-button-surface-hover, var(--navigation-high-surface-hover));color:var(--ui-paginator-button-color-hover, var(--navigation-high-content-hover))}.ui-paginator-control:focus-visible{outline:none;background-color:var(--ui-paginator-button-surface-focus, var(--navigation-high-surface-focused));color:var(--ui-paginator-button-color-focus, var(--navigation-high-content-focused));box-shadow:0 0 0 var(--ui-paginator-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-paginator-button-focus-ring-color, var(--navigation-high-stroke-focused))}.ui-paginator-control:active:not(:disabled){background-color:var(--ui-paginator-button-surface-pressed, var(--navigation-high-surface-pressed));color:var(--ui-paginator-button-color-pressed, var(--navigation-high-content-pressed))}.ui-paginator-control:disabled{cursor:not-allowed}.ui-paginator-control{width:var(--ui-paginator-button-size, 2rem);padding:0 var(--units-sm)}.ui-paginator-control:disabled{background-color:var(--ui-paginator-control-surface-disabled, var(--navigation-high-surface-disabled));color:var(--ui-paginator-control-color-disabled, var(--navigation-high-content-disabled))}.ui-paginator-pages{display:flex;align-items:center;gap:var(--ui-paginator-numbers-gap, var(--units-sm))}.ui-paginator-page{display:inline-flex;align-items:center;justify-content:center;height:var(--ui-paginator-button-size, 2rem);min-width:var(--ui-paginator-button-size, 2rem);border:none;border-radius:var(--ui-paginator-button-radius, var(--radius-default));background-color:var(--ui-paginator-button-surface, var(--navigation-high-surface-default));color:var(--ui-paginator-button-color, var(--navigation-high-content-default));font-family:var(--ui-paginator-font-family, var(--fontfamily-base));font-size:var(--size-typography-text-md);font-weight:var(--ui-paginator-weight, var(--weight-bold));line-height:1;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),box-shadow var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-paginator-page:hover:not(:disabled){background-color:var(--ui-paginator-button-surface-hover, var(--navigation-high-surface-hover));color:var(--ui-paginator-button-color-hover, var(--navigation-high-content-hover))}.ui-paginator-page:focus-visible{outline:none;background-color:var(--ui-paginator-button-surface-focus, var(--navigation-high-surface-focused));color:var(--ui-paginator-button-color-focus, var(--navigation-high-content-focused));box-shadow:0 0 0 var(--ui-paginator-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-paginator-button-focus-ring-color, var(--navigation-high-stroke-focused))}.ui-paginator-page:active:not(:disabled){background-color:var(--ui-paginator-button-surface-pressed, var(--navigation-high-surface-pressed));color:var(--ui-paginator-button-color-pressed, var(--navigation-high-content-pressed))}.ui-paginator-page:disabled{cursor:not-allowed}.ui-paginator-page{padding:0 var(--units-md)}.ui-paginator-page:disabled{background-color:var(--ui-paginator-page-surface-disabled, var(--actions-low-surface-disabled));color:var(--ui-paginator-page-color-disabled, var(--actions-low-content-disabled))}.ui-paginator-page._current,.ui-paginator-page._current:hover:not(:disabled),.ui-paginator-page._current:focus-visible,.ui-paginator-page._current:active:not(:disabled),.ui-paginator-page._current:disabled{background-color:var(--ui-paginator-page-surface-current, var(--navigation-high-surface-active));color:var(--ui-paginator-page-color-current, var(--navigation-high-content-active))}.ui-paginator-report{display:inline-flex;align-items:center;color:var(--ui-paginator-report-color, var(--global-text-muted));font-size:var(--size-typography-text-md);white-space:nowrap}.ui-paginator-start,.ui-paginator-end{display:inline-flex;align-items:center;gap:var(--units-sm);color:var(--ui-paginator-slot-color, var(--global-text-muted));font-size:var(--size-typography-text-md)}.ui-paginator-ellipsis{display:inline-flex;align-items:center;justify-content:center;height:var(--ui-paginator-button-size, 2rem);min-width:var(--ui-paginator-button-size, 2rem);color:var(--ui-paginator-ellipsis-color, var(--navigation-high-content-default));font-size:var(--size-typography-text-md);font-weight:var(--ui-paginator-weight, var(--weight-bold));-webkit-user-select:none;user-select:none}\n"]
502
+ }]
503
+ }],
504
+ propDecorators: {
505
+ totalRecords: [{
506
+ type: i0.Input,
507
+ args: [{
508
+ isSignal: true,
509
+ alias: "totalRecords",
510
+ required: false
511
+ }]
512
+ }],
513
+ rows: [{
514
+ type: i0.Input,
515
+ args: [{
516
+ isSignal: true,
517
+ alias: "rows",
518
+ required: false
519
+ }]
520
+ }, {
521
+ type: i0.Output,
522
+ args: ["rowsChange"]
523
+ }],
524
+ first: [{
525
+ type: i0.Input,
526
+ args: [{
527
+ isSignal: true,
528
+ alias: "first",
529
+ required: false
530
+ }]
531
+ }, {
532
+ type: i0.Output,
533
+ args: ["firstChange"]
534
+ }],
535
+ pageLinks: [{
536
+ type: i0.Input,
537
+ args: [{
538
+ isSignal: true,
539
+ alias: "pageLinks",
540
+ required: false
541
+ }]
542
+ }],
543
+ ellipsis: [{
544
+ type: i0.Input,
545
+ args: [{
546
+ isSignal: true,
547
+ alias: "ellipsis",
548
+ required: false
549
+ }]
550
+ }],
551
+ boundaryCount: [{
552
+ type: i0.Input,
553
+ args: [{
554
+ isSignal: true,
555
+ alias: "boundaryCount",
556
+ required: false
557
+ }]
558
+ }],
559
+ rowsPerPageOptions: [{
560
+ type: i0.Input,
561
+ args: [{
562
+ isSignal: true,
563
+ alias: "rowsPerPageOptions",
564
+ required: false
565
+ }]
566
+ }],
567
+ showFirstLastIcon: [{
568
+ type: i0.Input,
569
+ args: [{
570
+ isSignal: true,
571
+ alias: "showFirstLastIcon",
572
+ required: false
573
+ }]
574
+ }],
575
+ showPageLinks: [{
576
+ type: i0.Input,
577
+ args: [{
578
+ isSignal: true,
579
+ alias: "showPageLinks",
580
+ required: false
581
+ }]
582
+ }],
583
+ showCurrentPageReport: [{
584
+ type: i0.Input,
585
+ args: [{
586
+ isSignal: true,
587
+ alias: "showCurrentPageReport",
588
+ required: false
589
+ }]
590
+ }],
591
+ currentPageReportTemplate: [{
592
+ type: i0.Input,
593
+ args: [{
594
+ isSignal: true,
595
+ alias: "currentPageReportTemplate",
596
+ required: false
597
+ }]
598
+ }],
599
+ disabled: [{
600
+ type: i0.Input,
601
+ args: [{
602
+ isSignal: true,
603
+ alias: "disabled",
604
+ required: false
605
+ }]
606
+ }],
607
+ ripple: [{
608
+ type: i0.Input,
609
+ args: [{
610
+ isSignal: true,
611
+ alias: "ripple",
612
+ required: false
613
+ }]
614
+ }],
615
+ ariaLabel: [{
616
+ type: i0.Input,
617
+ args: [{
618
+ isSignal: true,
619
+ alias: "ariaLabel",
620
+ required: false
621
+ }]
622
+ }],
623
+ pageAriaLabel: [{
624
+ type: i0.Input,
625
+ args: [{
626
+ isSignal: true,
627
+ alias: "pageAriaLabel",
628
+ required: false
629
+ }]
630
+ }],
631
+ firstPageAriaLabel: [{
632
+ type: i0.Input,
633
+ args: [{
634
+ isSignal: true,
635
+ alias: "firstPageAriaLabel",
636
+ required: false
637
+ }]
638
+ }],
639
+ prevPageAriaLabel: [{
640
+ type: i0.Input,
641
+ args: [{
642
+ isSignal: true,
643
+ alias: "prevPageAriaLabel",
644
+ required: false
645
+ }]
646
+ }],
647
+ nextPageAriaLabel: [{
648
+ type: i0.Input,
649
+ args: [{
650
+ isSignal: true,
651
+ alias: "nextPageAriaLabel",
652
+ required: false
653
+ }]
654
+ }],
655
+ lastPageAriaLabel: [{
656
+ type: i0.Input,
657
+ args: [{
658
+ isSignal: true,
659
+ alias: "lastPageAriaLabel",
660
+ required: false
661
+ }]
662
+ }],
663
+ rowsPerPageAriaLabel: [{
664
+ type: i0.Input,
665
+ args: [{
666
+ isSignal: true,
667
+ alias: "rowsPerPageAriaLabel",
668
+ required: false
669
+ }]
670
+ }],
671
+ pageChange: [{
672
+ type: i0.Output,
673
+ args: ["pageChange"]
674
+ }],
675
+ firstIconTemplate: [{
676
+ type: i0.ContentChild,
677
+ args: ["firsticon", { isSignal: true }]
678
+ }],
679
+ prevIconTemplate: [{
680
+ type: i0.ContentChild,
681
+ args: ["previcon", { isSignal: true }]
682
+ }],
683
+ nextIconTemplate: [{
684
+ type: i0.ContentChild,
685
+ args: ["nexticon", { isSignal: true }]
686
+ }],
687
+ lastIconTemplate: [{
688
+ type: i0.ContentChild,
689
+ args: ["lasticon", { isSignal: true }]
690
+ }],
691
+ pageLinkTemplate: [{
692
+ type: i0.ContentChild,
693
+ args: ["pagelink", { isSignal: true }]
694
+ }],
695
+ startTemplate: [{
696
+ type: i0.ContentChild,
697
+ args: ["start", { isSignal: true }]
698
+ }],
699
+ endTemplate: [{
700
+ type: i0.ContentChild,
701
+ args: ["end", { isSignal: true }]
702
+ }],
703
+ reportTemplate: [{
704
+ type: i0.ContentChild,
705
+ args: ["report", { isSignal: true }]
706
+ }]
707
+ }
708
+ });
249
709
  export { UiPaginator };
250
- //# sourceMappingURL=4sh-ui-kit-table-ui-paginator.mjs.map
710
+
711
+ //# sourceMappingURL=4sh-ui-kit-table-ui-paginator.mjs.map