@nanahoshi/mona-ui 0.27.2 → 0.28.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.
- package/docs/api/chart.md +2 -2
- package/docs/api/popup.md +1 -1
- package/docs/api/theme.md +2 -2
- package/docs/chart.md +14 -0
- package/docs/editor.md +2 -0
- package/docs/installation.md +147 -15
- package/docs/introduction.md +37 -15
- package/docs/theming-built-in-themes.md +67 -0
- package/docs/theming-custom-colors.md +274 -0
- package/docs/theming-custom-themes.md +168 -0
- package/docs/theming.md +164 -248
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1089 -603
- package/fesm2022/nanahoshi-mona-ui-avatar.mjs +369 -184
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +658 -371
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +513 -359
- package/fesm2022/nanahoshi-mona-ui-button.mjs +622 -517
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +2070 -1573
- package/fesm2022/nanahoshi-mona-ui-card.mjs +620 -316
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +61151 -64921
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +646 -317
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +737 -516
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +441 -242
- package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +443 -390
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +1138 -814
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +1114 -959
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +858 -504
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1181 -742
- package/fesm2022/nanahoshi-mona-ui-command.mjs +1454 -853
- package/fesm2022/nanahoshi-mona-ui-common.mjs +569 -743
- package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +978 -532
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +283 -266
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +973 -451
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +1203 -658
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +1415 -936
- package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1165 -568
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1142 -677
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +1018 -734
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +3589 -2122
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +577 -359
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +311 -151
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +1086 -718
- package/fesm2022/nanahoshi-mona-ui-grid-grid-colgroup.component-NhONCVIX.mjs +77 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-Djv8ZnT5.mjs +480 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-WbXAzGCa.mjs +470 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-DkWTD3pN.mjs +2115 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DAHqTwBJ.mjs +330 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid.styles-BmLU-3zP.mjs +3766 -0
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +5418 -2
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +1379 -1079
- package/fesm2022/nanahoshi-mona-ui-i18n.mjs +4451 -5077
- package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +344 -143
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +257 -127
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +2080 -1829
- package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +103 -141
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2498 -2706
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +722 -1007
- package/fesm2022/nanahoshi-mona-ui-label.mjs +313 -202
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1308 -1009
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1411 -677
- package/fesm2022/nanahoshi-mona-ui-list.mjs +1 -6
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +556 -577
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +530 -573
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +530 -573
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +533 -576
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +530 -571
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +530 -571
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +576 -591
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +530 -565
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +520 -555
- package/fesm2022/nanahoshi-mona-ui-locales.mjs +59 -77
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +1411 -829
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1326 -702
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +763 -675
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1306 -826
- package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +1122 -897
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +1110 -651
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +95 -53
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +559 -397
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2323 -1694
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +1657 -1455
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +441 -267
- package/fesm2022/nanahoshi-mona-ui-query.mjs +211 -340
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +1017 -548
- package/fesm2022/nanahoshi-mona-ui-rating.mjs +874 -624
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +1130 -917
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +705 -455
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +461 -283
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +2791 -2449
- package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +145 -90
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +1563 -1103
- package/fesm2022/nanahoshi-mona-ui-spinner.mjs +738 -673
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1287 -647
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +1313 -909
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +761 -540
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +611 -280
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +1393 -841
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +142 -73
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +876 -374
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +1465 -1449
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +897 -443
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +1100 -703
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +789 -538
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +1361 -805
- package/fesm2022/nanahoshi-mona-ui-window.mjs +2145 -1531
- package/fesm2022/nanahoshi-mona-ui.mjs +1 -8
- package/llms.txt +6 -2
- package/package.json +62 -23
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +367 -233
- package/types/nanahoshi-mona-ui-avatar.d.ts +722 -649
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +134 -103
- package/types/nanahoshi-mona-ui-button-group.d.ts +213 -152
- package/types/nanahoshi-mona-ui-button.d.ts +227 -166
- package/types/nanahoshi-mona-ui-calendar.d.ts +324 -259
- package/types/nanahoshi-mona-ui-card.d.ts +125 -111
- package/types/nanahoshi-mona-ui-chart.d.ts +10483 -7326
- package/types/nanahoshi-mona-ui-check-box.d.ts +293 -180
- package/types/nanahoshi-mona-ui-chip.d.ts +208 -141
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +194 -133
- package/types/nanahoshi-mona-ui-collapsible.d.ts +103 -87
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +281 -213
- package/types/nanahoshi-mona-ui-color-palette.d.ts +201 -138
- package/types/nanahoshi-mona-ui-color-picker.d.ts +283 -194
- package/types/nanahoshi-mona-ui-combo-box.d.ts +401 -262
- package/types/nanahoshi-mona-ui-command.d.ts +279 -191
- package/types/nanahoshi-mona-ui-common.d.ts +354 -385
- package/types/nanahoshi-mona-ui-contextmenu.d.ts +142 -117
- package/types/nanahoshi-mona-ui-date-input.d.ts +79 -96
- package/types/nanahoshi-mona-ui-date-picker.d.ts +338 -208
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +413 -259
- package/types/nanahoshi-mona-ui-dialog.d.ts +470 -381
- package/types/nanahoshi-mona-ui-dropdown-button.d.ts +216 -168
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +369 -243
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +231 -217
- package/types/nanahoshi-mona-ui-editor.d.ts +302 -235
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +140 -109
- package/types/nanahoshi-mona-ui-fieldset.d.ts +98 -68
- package/types/nanahoshi-mona-ui-filter.d.ts +150 -124
- package/types/nanahoshi-mona-ui-grid.d.ts +1956 -1678
- package/types/nanahoshi-mona-ui-i18n-icu.d.ts +25 -34
- package/types/nanahoshi-mona-ui-i18n.d.ts +987 -1052
- package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +118 -71
- package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +56 -27
- package/types/nanahoshi-mona-ui-internal-list.d.ts +474 -408
- package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +143 -150
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +493 -506
- package/types/nanahoshi-mona-ui-internal.d.ts +195 -213
- package/types/nanahoshi-mona-ui-label.d.ts +108 -78
- package/types/nanahoshi-mona-ui-list-box.d.ts +392 -322
- package/types/nanahoshi-mona-ui-list-view.d.ts +423 -282
- package/types/nanahoshi-mona-ui-list.d.ts +2 -1
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +540 -542
- package/types/nanahoshi-mona-ui-locales.d.ts +17 -19
- package/types/nanahoshi-mona-ui-menubar.d.ts +210 -181
- package/types/nanahoshi-mona-ui-multi-select.d.ts +416 -276
- package/types/nanahoshi-mona-ui-notification.d.ts +140 -151
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +407 -270
- package/types/nanahoshi-mona-ui-otp-input.d.ts +364 -241
- package/types/nanahoshi-mona-ui-pager.d.ts +379 -301
- package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -28
- package/types/nanahoshi-mona-ui-popover.d.ts +176 -134
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +488 -344
- package/types/nanahoshi-mona-ui-popup.d.ts +698 -560
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +197 -137
- package/types/nanahoshi-mona-ui-query.d.ts +82 -88
- package/types/nanahoshi-mona-ui-radio-button.d.ts +434 -269
- package/types/nanahoshi-mona-ui-rating.d.ts +348 -254
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +244 -172
- package/types/nanahoshi-mona-ui-segmented.d.ts +250 -175
- package/types/nanahoshi-mona-ui-sheet.d.ts +115 -63
- package/types/nanahoshi-mona-ui-sidebar.d.ts +653 -493
- package/types/nanahoshi-mona-ui-skeleton.d.ts +55 -39
- package/types/nanahoshi-mona-ui-slider.d.ts +503 -354
- package/types/nanahoshi-mona-ui-spinner.d.ts +125 -112
- package/types/nanahoshi-mona-ui-split-button.d.ts +241 -196
- package/types/nanahoshi-mona-ui-splitter.d.ts +124 -78
- package/types/nanahoshi-mona-ui-stepper.d.ts +206 -181
- package/types/nanahoshi-mona-ui-switch.d.ts +197 -131
- package/types/nanahoshi-mona-ui-tabs.d.ts +349 -248
- package/types/nanahoshi-mona-ui-text-area.d.ts +52 -36
- package/types/nanahoshi-mona-ui-text-box.d.ts +349 -218
- package/types/nanahoshi-mona-ui-theme.d.ts +415 -408
- package/types/nanahoshi-mona-ui-time-picker.d.ts +357 -217
- package/types/nanahoshi-mona-ui-time-selector.d.ts +255 -170
- package/types/nanahoshi-mona-ui-tooltip.d.ts +222 -144
- package/types/nanahoshi-mona-ui-tree-view.d.ts +466 -308
- package/types/nanahoshi-mona-ui-window.d.ts +494 -399
- package/types/nanahoshi-mona-ui.d.ts +1 -2
- package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs +0 -181
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs +0 -208
- package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs +0 -1082
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs +0 -186
- package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs +0 -7568
|
@@ -1,123 +1,223 @@
|
|
|
1
|
-
import { DOCUMENT, NgTemplateOutlet } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { ButtonDirective } from
|
|
6
|
-
import { DropdownListComponent, DropdownListValueTemplateDirective } from
|
|
7
|
-
import {
|
|
8
|
-
import { formatNumber, injectComponentDirection
|
|
9
|
-
import {
|
|
10
|
-
import { NumericTextBoxComponent } from
|
|
11
|
-
import { twMerge } from
|
|
12
|
-
import { PreventableEvent } from
|
|
13
|
-
import { cva } from
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
class
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
1
|
+
import { DOCUMENT, NgTemplateOutlet } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { Component, DestroyRef, Directive, ElementRef, Injector, TemplateRef, afterNextRender, afterRenderEffect, booleanAttribute, computed, contentChild, contentChildren, effect, inject, input, linkedSignal, model, output, signal, untracked, viewChild } from "@angular/core";
|
|
4
|
+
import { LucideChevronLeft, LucideChevronRight, LucideChevronsLeft, LucideChevronsRight, LucideEllipsis } from "@lucide/angular";
|
|
5
|
+
import { ButtonDirective } from "@nanahoshi/mona-ui/button";
|
|
6
|
+
import { DropdownListComponent, DropdownListValueTemplateDirective } from "@nanahoshi/mona-ui/dropdown-list";
|
|
7
|
+
import { DropdownItemTemplateDirective, DropdownVirtualScrollDirective } from "@nanahoshi/mona-ui/dropdowns";
|
|
8
|
+
import { MonaI18nService, formatNumber, injectComponentDirection } from "@nanahoshi/mona-ui/i18n";
|
|
9
|
+
import { NavigationKeys, createElementControlId, themeRaisedBackdropClasses } from "@nanahoshi/mona-ui/internal";
|
|
10
|
+
import { NumericTextBoxComponent } from "@nanahoshi/mona-ui/numeric-text-box";
|
|
11
|
+
import { twMerge } from "tailwind-merge";
|
|
12
|
+
import { PreventableEvent } from "@nanahoshi/mona-ui/common";
|
|
13
|
+
import { cva } from "class-variance-authority";
|
|
14
|
+
var PagerInfoTemplateDirective = class PagerInfoTemplateDirective {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.templateRef = inject(TemplateRef);
|
|
17
|
+
}
|
|
18
|
+
static ngTemplateContextGuard(_directive, _context) {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
static {
|
|
22
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
23
|
+
minVersion: "12.0.0",
|
|
24
|
+
version: "22.2.6",
|
|
25
|
+
ngImport: i0,
|
|
26
|
+
type: PagerInfoTemplateDirective,
|
|
27
|
+
deps: [],
|
|
28
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
static {
|
|
32
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
33
|
+
minVersion: "14.0.0",
|
|
34
|
+
version: "22.2.6",
|
|
35
|
+
type: PagerInfoTemplateDirective,
|
|
36
|
+
isStandalone: true,
|
|
37
|
+
selector: "ng-template[monaPagerInfoTemplate]",
|
|
38
|
+
ngImport: i0
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
43
|
+
minVersion: "12.0.0",
|
|
44
|
+
version: "22.2.6",
|
|
45
|
+
ngImport: i0,
|
|
46
|
+
type: PagerInfoTemplateDirective,
|
|
47
|
+
decorators: [{
|
|
48
|
+
type: Directive,
|
|
49
|
+
args: [{ selector: "ng-template[monaPagerInfoTemplate]" }]
|
|
50
|
+
}]
|
|
51
|
+
});
|
|
52
|
+
var PagerNavigationButtonsTemplateDirective = class PagerNavigationButtonsTemplateDirective {
|
|
53
|
+
constructor() {
|
|
54
|
+
this.templateRef = inject(TemplateRef);
|
|
55
|
+
this.type = input.required(...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
|
|
56
|
+
}
|
|
57
|
+
static ngTemplateContextGuard(_directive, _context) {
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
static {
|
|
61
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
62
|
+
minVersion: "12.0.0",
|
|
63
|
+
version: "22.2.6",
|
|
64
|
+
ngImport: i0,
|
|
65
|
+
type: PagerNavigationButtonsTemplateDirective,
|
|
66
|
+
deps: [],
|
|
67
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
static {
|
|
71
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
72
|
+
minVersion: "17.1.0",
|
|
73
|
+
version: "22.2.6",
|
|
74
|
+
type: PagerNavigationButtonsTemplateDirective,
|
|
75
|
+
isStandalone: true,
|
|
76
|
+
selector: "ng-template[monaPagerNavigationButtonsTemplate]",
|
|
77
|
+
inputs: { type: {
|
|
78
|
+
classPropertyName: "type",
|
|
79
|
+
publicName: "type",
|
|
80
|
+
isSignal: true,
|
|
81
|
+
isRequired: true,
|
|
82
|
+
transformFunction: null
|
|
83
|
+
} },
|
|
84
|
+
ngImport: i0
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
89
|
+
minVersion: "12.0.0",
|
|
90
|
+
version: "22.2.6",
|
|
91
|
+
ngImport: i0,
|
|
92
|
+
type: PagerNavigationButtonsTemplateDirective,
|
|
93
|
+
decorators: [{
|
|
94
|
+
type: Directive,
|
|
95
|
+
args: [{ selector: "ng-template[monaPagerNavigationButtonsTemplate]" }]
|
|
96
|
+
}],
|
|
97
|
+
propDecorators: { type: [{
|
|
98
|
+
type: i0.Input,
|
|
99
|
+
args: [{
|
|
100
|
+
isSignal: true,
|
|
101
|
+
alias: "type",
|
|
102
|
+
required: true
|
|
103
|
+
}]
|
|
104
|
+
}] }
|
|
105
|
+
});
|
|
106
|
+
var PagerNumericButtonsTemplateDirective = class PagerNumericButtonsTemplateDirective {
|
|
107
|
+
constructor() {
|
|
108
|
+
this.templateRef = inject(TemplateRef);
|
|
109
|
+
}
|
|
110
|
+
static ngTemplateContextGuard(_directive, _context) {
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
static {
|
|
114
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
115
|
+
minVersion: "12.0.0",
|
|
116
|
+
version: "22.2.6",
|
|
117
|
+
ngImport: i0,
|
|
118
|
+
type: PagerNumericButtonsTemplateDirective,
|
|
119
|
+
deps: [],
|
|
120
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
static {
|
|
124
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
125
|
+
minVersion: "14.0.0",
|
|
126
|
+
version: "22.2.6",
|
|
127
|
+
type: PagerNumericButtonsTemplateDirective,
|
|
128
|
+
isStandalone: true,
|
|
129
|
+
selector: "ng-template[monaPagerNumericButtonsTemplate]",
|
|
130
|
+
ngImport: i0
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
135
|
+
minVersion: "12.0.0",
|
|
136
|
+
version: "22.2.6",
|
|
137
|
+
ngImport: i0,
|
|
138
|
+
type: PagerNumericButtonsTemplateDirective,
|
|
139
|
+
decorators: [{
|
|
140
|
+
type: Directive,
|
|
141
|
+
args: [{ selector: "ng-template[monaPagerNumericButtonsTemplate]" }]
|
|
142
|
+
}]
|
|
143
|
+
});
|
|
144
|
+
var PagerPageSizeTemplateDirective = class PagerPageSizeTemplateDirective {
|
|
145
|
+
static ngTemplateContextGuard(_directive, _context) {
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
static {
|
|
149
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
150
|
+
minVersion: "12.0.0",
|
|
151
|
+
version: "22.2.6",
|
|
152
|
+
ngImport: i0,
|
|
153
|
+
type: PagerPageSizeTemplateDirective,
|
|
154
|
+
deps: [],
|
|
155
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
static {
|
|
159
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
160
|
+
minVersion: "14.0.0",
|
|
161
|
+
version: "22.2.6",
|
|
162
|
+
type: PagerPageSizeTemplateDirective,
|
|
163
|
+
isStandalone: true,
|
|
164
|
+
selector: "ng-template[monaPagerPageSizeTemplate]",
|
|
165
|
+
ngImport: i0
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
170
|
+
minVersion: "12.0.0",
|
|
171
|
+
version: "22.2.6",
|
|
172
|
+
ngImport: i0,
|
|
173
|
+
type: PagerPageSizeTemplateDirective,
|
|
174
|
+
decorators: [{
|
|
175
|
+
type: Directive,
|
|
176
|
+
args: [{ selector: "ng-template[monaPagerPageSizeTemplate]" }]
|
|
177
|
+
}]
|
|
178
|
+
});
|
|
85
179
|
function localizeNumber(value, options) {
|
|
86
|
-
|
|
180
|
+
return formatNumber(value, "en-US", options);
|
|
87
181
|
}
|
|
88
182
|
const PLURAL_RULES = new Intl.PluralRules("en-US");
|
|
89
183
|
function plural(category, forms) {
|
|
90
|
-
|
|
184
|
+
return (forms[category] ?? forms.other)();
|
|
91
185
|
}
|
|
92
186
|
const PAGER_DEFAULT_MESSAGES = {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
187
|
+
firstPageLabel: "First page",
|
|
188
|
+
itemsPerPageLabel: "Items per page",
|
|
189
|
+
jumpBackwardLabel: (pages) => `Jump back ${plural(PLURAL_RULES.select(pages), {
|
|
190
|
+
one: () => `${localizeNumber(pages)} page`,
|
|
191
|
+
other: () => `${localizeNumber(pages)} pages`
|
|
192
|
+
})}`,
|
|
193
|
+
jumpForwardLabel: (pages) => `Jump forward ${plural(PLURAL_RULES.select(pages), {
|
|
194
|
+
one: () => `${localizeNumber(pages)} page`,
|
|
195
|
+
other: () => `${localizeNumber(pages)} pages`
|
|
196
|
+
})}`,
|
|
197
|
+
lastPageLabel: "Last page",
|
|
198
|
+
nextPageLabel: "Next page",
|
|
199
|
+
ofText: "of",
|
|
200
|
+
pageInputPrefix: (_totalPages) => "Page",
|
|
201
|
+
pageInputSuffix: (totalPages) => `of ${localizeNumber(totalPages)}`,
|
|
202
|
+
pageLabel: (page) => `Page ${localizeNumber(page)}`,
|
|
203
|
+
pageSelectLabel: "Page",
|
|
204
|
+
pageSizeLabel: (pageSize) => `${localizeNumber(pageSize)} / page`,
|
|
205
|
+
pageStatus: (page, totalPages) => `Page ${localizeNumber(page)} of ${localizeNumber(totalPages)}`,
|
|
206
|
+
pageText: "Page",
|
|
207
|
+
pagerLabel: "Pagination",
|
|
208
|
+
previousPageLabel: "Previous page",
|
|
209
|
+
rangeStatus: (start, end, total) => `${localizeNumber(start)} - ${localizeNumber(end)} of ${plural(PLURAL_RULES.select(total), {
|
|
210
|
+
one: () => `${localizeNumber(total)} item`,
|
|
211
|
+
other: () => `${localizeNumber(total)} items`
|
|
212
|
+
})}`
|
|
213
|
+
};
|
|
214
|
+
var PageSizeChangeEvent = class extends PreventableEvent {
|
|
215
|
+
constructor(newPageSize, oldPageSize) {
|
|
216
|
+
super("pageSizeSelect");
|
|
217
|
+
this.newPageSize = newPageSize;
|
|
218
|
+
this.oldPageSize = oldPageSize;
|
|
219
|
+
}
|
|
110
220
|
};
|
|
111
|
-
|
|
112
|
-
/** The cancelable payload of the pager's `pageSizeSelect` event. */
|
|
113
|
-
class PageSizeChangeEvent extends PreventableEvent {
|
|
114
|
-
constructor(newPageSize, oldPageSize) {
|
|
115
|
-
super("pageSizeSelect");
|
|
116
|
-
this.newPageSize = newPageSize;
|
|
117
|
-
this.oldPageSize = oldPageSize;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
221
|
const pagerBaseThemeVariants = cva(`
|
|
122
222
|
flex flex-wrap items-center gap-y-1 px-2 py-1
|
|
123
223
|
text-sm
|
|
@@ -129,22 +229,20 @@ const pagerBaseThemeVariants = cva(`
|
|
|
129
229
|
[&_mona-numeric-text-box_input]:text-center
|
|
130
230
|
[&_mona-dropdown-list]:mx-1
|
|
131
231
|
[&_mona-dropdown-list]:my-0
|
|
132
|
-
`, {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
});
|
|
232
|
+
`, { variants: {
|
|
233
|
+
rounded: {
|
|
234
|
+
none: "rounded-none",
|
|
235
|
+
small: "rounded-sm",
|
|
236
|
+
medium: "rounded-md",
|
|
237
|
+
large: "rounded-lg",
|
|
238
|
+
full: "rounded-full"
|
|
239
|
+
},
|
|
240
|
+
size: {
|
|
241
|
+
small: "text-xs",
|
|
242
|
+
medium: "text-sm",
|
|
243
|
+
large: "text-base"
|
|
244
|
+
}
|
|
245
|
+
} });
|
|
148
246
|
const pagerInfoThemeVariants = cva(`
|
|
149
247
|
flex flex-1 items-center justify-end ps-2
|
|
150
248
|
whitespace-nowrap text-muted-foreground
|
|
@@ -160,531 +258,892 @@ const pagerListThemeVariants = cva(`
|
|
|
160
258
|
[&_li]:items-center [&_li]:justify-center
|
|
161
259
|
`);
|
|
162
260
|
const pagerListItemThemeVariants = cva("", {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
},
|
|
169
|
-
defaultVariants: {
|
|
170
|
-
active: false
|
|
171
|
-
}
|
|
261
|
+
variants: { active: {
|
|
262
|
+
true: "font-semibold text-foreground",
|
|
263
|
+
false: ""
|
|
264
|
+
} },
|
|
265
|
+
defaultVariants: { active: false }
|
|
172
266
|
});
|
|
173
|
-
|
|
174
|
-
/** Below this width (in CSS pixels) a responsive pager replaces its page buttons with a page dropdown. */
|
|
175
267
|
const COMPACT_WIDTH = 480;
|
|
176
268
|
const DEFAULT_PAGE_SIZE = 5;
|
|
177
|
-
const DEFAULT_PAGE_SIZES = [
|
|
178
|
-
|
|
269
|
+
const DEFAULT_PAGE_SIZES = [
|
|
270
|
+
5,
|
|
271
|
+
10,
|
|
272
|
+
20,
|
|
273
|
+
50,
|
|
274
|
+
100
|
|
275
|
+
];
|
|
179
276
|
function toCount(value, fallback, minimum) {
|
|
180
|
-
|
|
181
|
-
|
|
277
|
+
const numeric = typeof value === "number" ? value : Number(value);
|
|
278
|
+
return Number.isFinite(numeric) ? Math.max(minimum, Math.floor(numeric)) : fallback;
|
|
182
279
|
}
|
|
183
|
-
class PagerComponent {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: PagerComponent, isStandalone: true, selector: "mona-pager", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, firstLast: { classPropertyName: "firstLast", publicName: "firstLast", isSignal: true, isRequired: false, transformFunction: null }, navigable: { classPropertyName: "navigable", publicName: "navigable", isSignal: true, isRequired: false, transformFunction: null }, pageInput: { classPropertyName: "pageInput", publicName: "pageInput", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSizeValues: { classPropertyName: "pageSizeValues", publicName: "pageSizeValues", isSignal: true, isRequired: false, transformFunction: null }, previousNext: { classPropertyName: "previousNext", publicName: "previousNext", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, showInfo: { classPropertyName: "showInfo", publicName: "showInfo", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, skip: { classPropertyName: "skip", publicName: "skip", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, userClasses: { classPropertyName: "userClasses", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, visiblePages: { classPropertyName: "visiblePages", publicName: "visiblePages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange", pageSize: "pageSizeChange", pageSizeSelect: "pageSizeSelect", skip: "skipChange" }, host: { attributes: { "role": "navigation" }, listeners: { "keydown": "onKeydown($event)" }, properties: { "attr.aria-label": "ariaLabelledBy() ? null : ariaLabel() || messages().pagerLabel", "attr.aria-labelledby": "ariaLabelledBy() || null", "class": "baseClasses()" } }, queries: [{ propertyName: "navigationButtonsTemplateList", predicate: PagerNavigationButtonsTemplateDirective, isSignal: true }, { propertyName: "numericButtonsTemplate", first: true, predicate: PagerNumericButtonsTemplateDirective, descendants: true, isSignal: true }, { propertyName: "pageSizeTemplate", first: true, predicate: PagerPageSizeTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "pagerInfoTemplate", first: true, predicate: PagerInfoTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "pageSizeDropdownList", first: true, predicate: ["pageSizeDropdownList"], descendants: true, isSignal: true }], ngImport: i0, template: "@let numericButtonsTemplateRef = numericButtonsTemplate()?.templateRef;\n@let pageSizeTemplateRef = pageSizeTemplate();\n@let pagerInfoTemplateRef = pagerInfoTemplate()?.templateRef;\n\n@if (compact()) {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li>\n <mona-dropdown-list\n class=\"w-20\"\n [data]=\"pageList()\"\n [value]=\"page()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n monaDropDownVirtualScroll\n (valueChange)=\"goToPage($event)\">\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else if (type() === \"numeric\") {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n\n @if (numericButtonsTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"numericButtonsTemplateRef\"\n [ngTemplateOutletContext]=\"numericButtonsContext()\"></ng-container>\n } @else {\n @for (item of pageItems(); track item.key) {\n @if (item.kind === \"page\") {\n <li [attr.data-page]=\"item.page\" [class]=\"pageItemClasses(page() === item.page)\">\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [selected]=\"page() === item.page\"\n [attr.aria-label]=\"messages().pageLabel(item.page)\"\n [attr.aria-current]=\"page() === item.page ? 'page' : null\"\n (click)=\"goToPage(item.page)\">\n {{ formatPageNumber(item.page) }}\n </button>\n </li>\n } @else {\n <li>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"item.direction === 'backward' ? jumpPreviousLabel() : jumpNextLabel()\"\n (click)=\"goToPage(item.page)\">\n <svg lucideEllipsis [size]=\"iconSize()\"></svg>\n </button>\n </li>\n }\n }\n }\n\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n\n @if (hasPages() && pageInput()) {\n <li>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n </li>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else {\n <div [class]=\"inputClasses\">\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li class=\"flex items-center gap-2 mx-2\">\n <span [id]=\"pageInputPrefixId\">{{ messages().pageInputPrefix(pageCount()) }}</span>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-labelledby]=\"pageInputLabelledBy\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n <span [id]=\"pageInputSuffixId\">{{ messages().pageInputSuffix(pageCount()) }}</span>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n </ol>\n </div>\n}\n\n@if (showInfo()) {\n @if (pagerInfoTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"pagerInfoTemplateRef\" [ngTemplateOutletContext]=\"infoContext()\"></ng-container>\n } @else {\n <span [class]=\"infoClasses\">{{ pagerInfo() }}</span>\n }\n}\n<span class=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveStatus() }}</span>\n\n<ng-template #pageSizeSelector>\n @if (pageSizeOptions().length > 0) {\n <li>\n @if (pageSizeTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"pageSizeTemplateRef\"\n [ngTemplateOutletContext]=\"pageSizeContext()\"></ng-container>\n } @else {\n <mona-dropdown-list\n [data]=\"pageSizeOptions()\"\n [aria-label]=\"messages().itemsPerPageLabel\"\n [value]=\"pageSizeValue()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (valueChange)=\"changePageSize($event)\"\n #pageSizeDropdownList>\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ messages().pageSizeLabel(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n }\n </li>\n }\n</ng-template>\n\n<ng-template #firstPageButton>\n <li>\n @let firstPageTemplate = firstPageNavigationTemplate();\n @if (firstPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"firstPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"firstNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().firstPageLabel\"\n [disabled]=\"firstNavigationContext().disabled\"\n (click)=\"goToPage(1)\">\n <svg lucideChevronsLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #previousPageButton>\n <li>\n @let previousPageTemplate = previousPageNavigationTemplate();\n @if (previousPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"previousPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"previousNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"previousNavigationContext().disabled\"\n [attr.aria-label]=\"messages().previousPageLabel\"\n (click)=\"goToPage(page() - 1)\">\n <svg lucideChevronLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #nextPageButton>\n <li>\n @let nextPageTemplate = nextPageNavigationTemplate();\n @if (nextPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"nextPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"nextNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"nextNavigationContext().disabled\"\n [attr.aria-label]=\"messages().nextPageLabel\"\n (click)=\"goToPage(page() + 1)\">\n <svg lucideChevronRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #lastPageButton>\n <li>\n @let lastPageTemplate = lastPageNavigationTemplate();\n @if (lastPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"lastPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"lastNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().lastPageLabel\"\n [disabled]=\"lastNavigationContext().disabled\"\n (click)=\"goToPage(pageCount())\">\n <svg lucideChevronsRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class", "value"], outputs: ["lookChange", "selectedChange"] }, { kind: "component", type: NumericTextBoxComponent, selector: "mona-numeric-text-box", inputs: ["formatter", "maxValue", "minValue", "step", "value"], outputs: ["valueChange"] }, { kind: "component", type: DropdownListComponent, selector: "mona-dropdown-list", inputs: ["aria-describedby", "aria-label", "aria-labelledby", "data", "disabled", "invalid", "itemDisabled", "loading", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "required", "rounded", "showClearButton", "size", "textField", "touched", "class", "value", "valueField", "valuePrimitive"], outputs: ["close", "closed", "open", "opened", "touch", "valueChange"] }, { kind: "directive", type: DropdownVirtualScrollDirective, selector: " mona-auto-complete[monaDropDownVirtualScroll], mona-dropdown-list[monaDropDownVirtualScroll], mona-combo-box[monaDropDownVirtualScroll], mona-multi-select[monaDropDownVirtualScroll] ", inputs: ["monaDropDownVirtualScroll"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: DropdownListValueTemplateDirective, selector: "ng-template[monaDropDownListValueTemplate]" }, { kind: "directive", type: DropdownItemTemplateDirective, selector: " ng-template[monaDropDownItemTemplate], ng-template[monaAutoCompleteItemTemplate], ng-template[monaDropDownListItemTemplate], ng-template[monaComboBoxItemTemplate], ng-template[monaMultiSelectItemTemplate] " }, { kind: "component", type: LucideEllipsis, selector: "svg[lucideEllipsis], svg[lucideMoreHorizontal]" }, { kind: "component", type: LucideChevronsLeft, selector: "svg[lucideChevronsLeft]" }, { kind: "component", type: LucideChevronLeft, selector: "svg[lucideChevronLeft]" }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "component", type: LucideChevronsRight, selector: "svg[lucideChevronsRight]" }] }); }
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
}, template: "@let numericButtonsTemplateRef = numericButtonsTemplate()?.templateRef;\n@let pageSizeTemplateRef = pageSizeTemplate();\n@let pagerInfoTemplateRef = pagerInfoTemplate()?.templateRef;\n\n@if (compact()) {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li>\n <mona-dropdown-list\n class=\"w-20\"\n [data]=\"pageList()\"\n [value]=\"page()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n monaDropDownVirtualScroll\n (valueChange)=\"goToPage($event)\">\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else if (type() === \"numeric\") {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n\n @if (numericButtonsTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"numericButtonsTemplateRef\"\n [ngTemplateOutletContext]=\"numericButtonsContext()\"></ng-container>\n } @else {\n @for (item of pageItems(); track item.key) {\n @if (item.kind === \"page\") {\n <li [attr.data-page]=\"item.page\" [class]=\"pageItemClasses(page() === item.page)\">\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [selected]=\"page() === item.page\"\n [attr.aria-label]=\"messages().pageLabel(item.page)\"\n [attr.aria-current]=\"page() === item.page ? 'page' : null\"\n (click)=\"goToPage(item.page)\">\n {{ formatPageNumber(item.page) }}\n </button>\n </li>\n } @else {\n <li>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"item.direction === 'backward' ? jumpPreviousLabel() : jumpNextLabel()\"\n (click)=\"goToPage(item.page)\">\n <svg lucideEllipsis [size]=\"iconSize()\"></svg>\n </button>\n </li>\n }\n }\n }\n\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n\n @if (hasPages() && pageInput()) {\n <li>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n </li>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else {\n <div [class]=\"inputClasses\">\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li class=\"flex items-center gap-2 mx-2\">\n <span [id]=\"pageInputPrefixId\">{{ messages().pageInputPrefix(pageCount()) }}</span>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-labelledby]=\"pageInputLabelledBy\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n <span [id]=\"pageInputSuffixId\">{{ messages().pageInputSuffix(pageCount()) }}</span>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n </ol>\n </div>\n}\n\n@if (showInfo()) {\n @if (pagerInfoTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"pagerInfoTemplateRef\" [ngTemplateOutletContext]=\"infoContext()\"></ng-container>\n } @else {\n <span [class]=\"infoClasses\">{{ pagerInfo() }}</span>\n }\n}\n<span class=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveStatus() }}</span>\n\n<ng-template #pageSizeSelector>\n @if (pageSizeOptions().length > 0) {\n <li>\n @if (pageSizeTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"pageSizeTemplateRef\"\n [ngTemplateOutletContext]=\"pageSizeContext()\"></ng-container>\n } @else {\n <mona-dropdown-list\n [data]=\"pageSizeOptions()\"\n [aria-label]=\"messages().itemsPerPageLabel\"\n [value]=\"pageSizeValue()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (valueChange)=\"changePageSize($event)\"\n #pageSizeDropdownList>\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ messages().pageSizeLabel(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n }\n </li>\n }\n</ng-template>\n\n<ng-template #firstPageButton>\n <li>\n @let firstPageTemplate = firstPageNavigationTemplate();\n @if (firstPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"firstPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"firstNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().firstPageLabel\"\n [disabled]=\"firstNavigationContext().disabled\"\n (click)=\"goToPage(1)\">\n <svg lucideChevronsLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #previousPageButton>\n <li>\n @let previousPageTemplate = previousPageNavigationTemplate();\n @if (previousPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"previousPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"previousNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"previousNavigationContext().disabled\"\n [attr.aria-label]=\"messages().previousPageLabel\"\n (click)=\"goToPage(page() - 1)\">\n <svg lucideChevronLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #nextPageButton>\n <li>\n @let nextPageTemplate = nextPageNavigationTemplate();\n @if (nextPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"nextPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"nextNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"nextNavigationContext().disabled\"\n [attr.aria-label]=\"messages().nextPageLabel\"\n (click)=\"goToPage(page() + 1)\">\n <svg lucideChevronRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #lastPageButton>\n <li>\n @let lastPageTemplate = lastPageNavigationTemplate();\n @if (lastPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"lastPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"lastNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().lastPageLabel\"\n [disabled]=\"lastNavigationContext().disabled\"\n (click)=\"goToPage(pageCount())\">\n <svg lucideChevronsRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n" }]
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
280
|
+
var PagerComponent = class PagerComponent {
|
|
281
|
+
#compact;
|
|
282
|
+
#destroyRef;
|
|
283
|
+
#direction;
|
|
284
|
+
#document;
|
|
285
|
+
#hostElementRef;
|
|
286
|
+
#i18n;
|
|
287
|
+
#id;
|
|
288
|
+
#injector;
|
|
289
|
+
#widthObserver;
|
|
290
|
+
constructor() {
|
|
291
|
+
this.#compact = signal(false, ...ngDevMode ? [{ debugName: "#compact" }] : /* istanbul ignore next */ []);
|
|
292
|
+
this.#destroyRef = inject(DestroyRef);
|
|
293
|
+
this.#direction = injectComponentDirection();
|
|
294
|
+
this.#document = inject(DOCUMENT);
|
|
295
|
+
this.#hostElementRef = inject(ElementRef);
|
|
296
|
+
this.#i18n = inject(MonaI18nService);
|
|
297
|
+
this.#id = createElementControlId();
|
|
298
|
+
this.#injector = inject(Injector);
|
|
299
|
+
this.#widthObserver = null;
|
|
300
|
+
this.navigationButtonsTemplateList = contentChildren(PagerNavigationButtonsTemplateDirective, ...ngDevMode ? [{ debugName: "navigationButtonsTemplateList" }] : /* istanbul ignore next */ []);
|
|
301
|
+
this.baseClasses = computed(() => twMerge(pagerBaseThemeVariants({
|
|
302
|
+
rounded: this.rounded(),
|
|
303
|
+
size: this.size()
|
|
304
|
+
}), this.userClasses()), ...ngDevMode ? [{ debugName: "baseClasses" }] : /* istanbul ignore next */ []);
|
|
305
|
+
this.compact = this.#compact.asReadonly();
|
|
306
|
+
this.end = computed(() => this.hasPages() ? Math.min(this.page() * this.pageSizeValue(), this.total()) : 0, ...ngDevMode ? [{ debugName: "end" }] : /* istanbul ignore next */ []);
|
|
307
|
+
this.firstNavigationContext = computed(() => this.createNavigationContext("first"), ...ngDevMode ? [{ debugName: "firstNavigationContext" }] : /* istanbul ignore next */ []);
|
|
308
|
+
this.firstPageNavigationTemplate = computed(() => this.findNavigationTemplate("first"), ...ngDevMode ? [{ debugName: "firstPageNavigationTemplate" }] : /* istanbul ignore next */ []);
|
|
309
|
+
this.hasPages = computed(() => this.pageCount() > 0, ...ngDevMode ? [{ debugName: "hasPages" }] : /* istanbul ignore next */ []);
|
|
310
|
+
this.iconSize = computed(() => {
|
|
311
|
+
switch (this.size()) {
|
|
312
|
+
case "small": return 18;
|
|
313
|
+
case "large": return 22;
|
|
314
|
+
default: return 20;
|
|
315
|
+
}
|
|
316
|
+
}, ...ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []);
|
|
317
|
+
this.infoClasses = pagerInfoThemeVariants();
|
|
318
|
+
this.infoContext = computed(() => {
|
|
319
|
+
const context = this.pagerContext();
|
|
320
|
+
return {
|
|
321
|
+
...context,
|
|
322
|
+
$implicit: context
|
|
323
|
+
};
|
|
324
|
+
}, ...ngDevMode ? [{ debugName: "infoContext" }] : /* istanbul ignore next */ []);
|
|
325
|
+
this.inputClasses = pagerInputThemeVariants();
|
|
326
|
+
this.inputValue = linkedSignal(() => this.page(), ...ngDevMode ? [{ debugName: "inputValue" }] : /* istanbul ignore next */ []);
|
|
327
|
+
this.jumpNextLabel = computed(() => this.messages().jumpForwardLabel(this.visiblePages()), ...ngDevMode ? [{ debugName: "jumpNextLabel" }] : /* istanbul ignore next */ []);
|
|
328
|
+
this.jumpPreviousLabel = computed(() => this.messages().jumpBackwardLabel(this.visiblePages()), ...ngDevMode ? [{ debugName: "jumpPreviousLabel" }] : /* istanbul ignore next */ []);
|
|
329
|
+
this.lastNavigationContext = computed(() => this.createNavigationContext("last"), ...ngDevMode ? [{ debugName: "lastNavigationContext" }] : /* istanbul ignore next */ []);
|
|
330
|
+
this.lastPageNavigationTemplate = computed(() => this.findNavigationTemplate("last"), ...ngDevMode ? [{ debugName: "lastPageNavigationTemplate" }] : /* istanbul ignore next */ []);
|
|
331
|
+
this.listClasses = pagerListThemeVariants();
|
|
332
|
+
this.liveStatus = signal("", ...ngDevMode ? [{ debugName: "liveStatus" }] : /* istanbul ignore next */ []);
|
|
333
|
+
this.messages = this.#i18n.componentMessages("pager", PAGER_DEFAULT_MESSAGES);
|
|
334
|
+
this.nextNavigationContext = computed(() => this.createNavigationContext("next"), ...ngDevMode ? [{ debugName: "nextNavigationContext" }] : /* istanbul ignore next */ []);
|
|
335
|
+
this.nextPageNavigationTemplate = computed(() => this.findNavigationTemplate("next"), ...ngDevMode ? [{ debugName: "nextPageNavigationTemplate" }] : /* istanbul ignore next */ []);
|
|
336
|
+
this.numericButtonsContext = computed(() => {
|
|
337
|
+
const context = this.pagerContext();
|
|
338
|
+
const pages = this.pageItems().filter((item) => item.kind === "page").map((item) => item.page);
|
|
339
|
+
return {
|
|
340
|
+
...context,
|
|
341
|
+
$implicit: context,
|
|
342
|
+
pages
|
|
343
|
+
};
|
|
344
|
+
}, ...ngDevMode ? [{ debugName: "numericButtonsContext" }] : /* istanbul ignore next */ []);
|
|
345
|
+
this.numericButtonsTemplate = contentChild(PagerNumericButtonsTemplateDirective, ...ngDevMode ? [{ debugName: "numericButtonsTemplate" }] : /* istanbul ignore next */ []);
|
|
346
|
+
this.page = computed(() => {
|
|
347
|
+
const pageCount = this.pageCount();
|
|
348
|
+
const page = Math.floor(this.skipValue() / this.pageSizeValue()) + 1;
|
|
349
|
+
return pageCount === 0 ? 1 : Math.min(page, pageCount);
|
|
350
|
+
}, ...ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []);
|
|
351
|
+
this.pageCount = computed(() => Math.ceil(this.total() / this.pageSizeValue()), ...ngDevMode ? [{ debugName: "pageCount" }] : /* istanbul ignore next */ []);
|
|
352
|
+
this.pageInputId = `${this.#id}-page`;
|
|
353
|
+
this.pageInputLabelledBy = `${this.#id}-page-prefix ${this.#id}-page ${this.#id}-page-suffix`;
|
|
354
|
+
this.pageInputPrefixId = `${this.#id}-page-prefix`;
|
|
355
|
+
this.pageInputSuffixId = `${this.#id}-page-suffix`;
|
|
356
|
+
this.pageItems = computed(() => this.buildPageItems(this.page(), this.visiblePages(), this.pageCount()), ...ngDevMode ? [{ debugName: "pageItems" }] : /* istanbul ignore next */ []);
|
|
357
|
+
this.pageList = computed(() => Array.from({ length: this.pageCount() }, (_, index) => index + 1), ...ngDevMode ? [{ debugName: "pageList" }] : /* istanbul ignore next */ []);
|
|
358
|
+
this.pageSizeContext = computed(() => ({
|
|
359
|
+
...this.pagerContext(),
|
|
360
|
+
$implicit: this.pageSizeOptions()
|
|
361
|
+
}), ...ngDevMode ? [{ debugName: "pageSizeContext" }] : /* istanbul ignore next */ []);
|
|
362
|
+
this.pageSizeDropdownList = viewChild("pageSizeDropdownList", ...ngDevMode ? [{ debugName: "pageSizeDropdownList" }] : /* istanbul ignore next */ []);
|
|
363
|
+
this.pageSizeOptions = computed(() => {
|
|
364
|
+
const values = this.pageSizeValues();
|
|
365
|
+
if (values === false) return [];
|
|
366
|
+
return Array.isArray(values) ? values : DEFAULT_PAGE_SIZES;
|
|
367
|
+
}, ...ngDevMode ? [{ debugName: "pageSizeOptions" }] : /* istanbul ignore next */ []);
|
|
368
|
+
this.pageSizeTemplate = contentChild(PagerPageSizeTemplateDirective, {
|
|
369
|
+
...ngDevMode ? { debugName: "pageSizeTemplate" } : /* istanbul ignore next */ {},
|
|
370
|
+
read: TemplateRef
|
|
371
|
+
});
|
|
372
|
+
this.pageSizeValue = computed(() => toCount(this.pageSize(), DEFAULT_PAGE_SIZE, 1), ...ngDevMode ? [{ debugName: "pageSizeValue" }] : /* istanbul ignore next */ []);
|
|
373
|
+
this.pagerContext = computed(() => ({
|
|
374
|
+
currentPage: this.page(),
|
|
375
|
+
end: this.end(),
|
|
376
|
+
goToPage: (page) => this.goToPage(page),
|
|
377
|
+
pageSize: this.pageSizeValue(),
|
|
378
|
+
pageSizes: this.pageSizeOptions(),
|
|
379
|
+
setPageSize: (pageSize) => this.changePageSize(pageSize),
|
|
380
|
+
skip: (this.page() - 1) * this.pageSizeValue(),
|
|
381
|
+
start: this.start(),
|
|
382
|
+
total: this.total(),
|
|
383
|
+
totalPages: this.pageCount()
|
|
384
|
+
}), ...ngDevMode ? [{ debugName: "pagerContext" }] : /* istanbul ignore next */ []);
|
|
385
|
+
this.pagerInfo = computed(() => this.messages().rangeStatus(this.start(), this.end(), this.total()), ...ngDevMode ? [{ debugName: "pagerInfo" }] : /* istanbul ignore next */ []);
|
|
386
|
+
this.pagerInfoTemplate = contentChild(PagerInfoTemplateDirective, ...ngDevMode ? [{ debugName: "pagerInfoTemplate" }] : /* istanbul ignore next */ []);
|
|
387
|
+
this.previousNavigationContext = computed(() => this.createNavigationContext("previous"), ...ngDevMode ? [{ debugName: "previousNavigationContext" }] : /* istanbul ignore next */ []);
|
|
388
|
+
this.previousPageNavigationTemplate = computed(() => this.findNavigationTemplate("previous"), ...ngDevMode ? [{ debugName: "previousPageNavigationTemplate" }] : /* istanbul ignore next */ []);
|
|
389
|
+
this.skipValue = computed(() => toCount(this.skip(), 0, 0), ...ngDevMode ? [{ debugName: "skipValue" }] : /* istanbul ignore next */ []);
|
|
390
|
+
this.start = computed(() => this.hasPages() ? (this.page() - 1) * this.pageSizeValue() + 1 : 0, ...ngDevMode ? [{ debugName: "start" }] : /* istanbul ignore next */ []);
|
|
391
|
+
this.ariaLabel = input(null, {
|
|
392
|
+
...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
|
|
393
|
+
alias: "aria-label"
|
|
394
|
+
});
|
|
395
|
+
this.ariaLabelledBy = input("", {
|
|
396
|
+
...ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {},
|
|
397
|
+
alias: "aria-labelledby"
|
|
398
|
+
});
|
|
399
|
+
this.firstLast = input(true, {
|
|
400
|
+
...ngDevMode ? { debugName: "firstLast" } : /* istanbul ignore next */ {},
|
|
401
|
+
transform: booleanAttribute
|
|
402
|
+
});
|
|
403
|
+
this.navigable = input(true, {
|
|
404
|
+
...ngDevMode ? { debugName: "navigable" } : /* istanbul ignore next */ {},
|
|
405
|
+
transform: booleanAttribute
|
|
406
|
+
});
|
|
407
|
+
this.pageChange = output();
|
|
408
|
+
this.pageInput = input(false, {
|
|
409
|
+
...ngDevMode ? { debugName: "pageInput" } : /* istanbul ignore next */ {},
|
|
410
|
+
transform: booleanAttribute
|
|
411
|
+
});
|
|
412
|
+
this.pageSize = model(DEFAULT_PAGE_SIZE, ...ngDevMode ? [{ debugName: "pageSize" }] : /* istanbul ignore next */ []);
|
|
413
|
+
this.pageSizeSelect = output();
|
|
414
|
+
this.pageSizeValues = input(DEFAULT_PAGE_SIZES, ...ngDevMode ? [{ debugName: "pageSizeValues" }] : /* istanbul ignore next */ []);
|
|
415
|
+
this.previousNext = input(true, {
|
|
416
|
+
...ngDevMode ? { debugName: "previousNext" } : /* istanbul ignore next */ {},
|
|
417
|
+
transform: booleanAttribute
|
|
418
|
+
});
|
|
419
|
+
this.responsive = input(true, {
|
|
420
|
+
...ngDevMode ? { debugName: "responsive" } : /* istanbul ignore next */ {},
|
|
421
|
+
transform: booleanAttribute
|
|
422
|
+
});
|
|
423
|
+
this.rounded = input("medium", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
|
|
424
|
+
this.showInfo = input(true, {
|
|
425
|
+
...ngDevMode ? { debugName: "showInfo" } : /* istanbul ignore next */ {},
|
|
426
|
+
transform: booleanAttribute
|
|
427
|
+
});
|
|
428
|
+
this.size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
429
|
+
this.skip = model(0, ...ngDevMode ? [{ debugName: "skip" }] : /* istanbul ignore next */ []);
|
|
430
|
+
this.total = input(0, {
|
|
431
|
+
...ngDevMode ? { debugName: "total" } : /* istanbul ignore next */ {},
|
|
432
|
+
transform: (value) => toCount(value, 0, 0)
|
|
433
|
+
});
|
|
434
|
+
this.type = input("numeric", ...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
|
|
435
|
+
this.userClasses = input("", {
|
|
436
|
+
...ngDevMode ? { debugName: "userClasses" } : /* istanbul ignore next */ {},
|
|
437
|
+
alias: "class"
|
|
438
|
+
});
|
|
439
|
+
this.visiblePages = input(5, {
|
|
440
|
+
...ngDevMode ? { debugName: "visiblePages" } : /* istanbul ignore next */ {},
|
|
441
|
+
transform: (value) => toCount(value, 5, 1)
|
|
442
|
+
});
|
|
443
|
+
effect(() => {
|
|
444
|
+
const pageCount = this.pageCount();
|
|
445
|
+
const skip = this.skip();
|
|
446
|
+
const alignedSkip = (this.page() - 1) * this.pageSizeValue();
|
|
447
|
+
if (pageCount === 0 || skip === alignedSkip) return;
|
|
448
|
+
untracked(() => {
|
|
449
|
+
this.skip.set(alignedSkip);
|
|
450
|
+
this.emitPageChange();
|
|
451
|
+
});
|
|
452
|
+
});
|
|
453
|
+
afterRenderEffect(() => {
|
|
454
|
+
if (!this.responsive()) {
|
|
455
|
+
this.#widthObserver?.disconnect();
|
|
456
|
+
this.#widthObserver = null;
|
|
457
|
+
untracked(() => this.#compact.set(false));
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
if (this.#widthObserver == null) {
|
|
461
|
+
const host = this.#hostElementRef.nativeElement;
|
|
462
|
+
this.#widthObserver = new ResizeObserver(() => {
|
|
463
|
+
untracked(() => this.#compact.set(host.clientWidth < COMPACT_WIDTH));
|
|
464
|
+
});
|
|
465
|
+
this.#widthObserver.observe(host);
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
this.#destroyRef.onDestroy(() => this.#widthObserver?.disconnect());
|
|
469
|
+
}
|
|
470
|
+
changePageSize(value) {
|
|
471
|
+
const previous = this.pageSizeValue();
|
|
472
|
+
if (value == null || !Number.isFinite(value) || value < 1 || value === previous) return;
|
|
473
|
+
const event = new PageSizeChangeEvent(value, previous);
|
|
474
|
+
this.pageSizeSelect.emit(event);
|
|
475
|
+
if (event.isDefaultPrevented()) {
|
|
476
|
+
this.pageSizeDropdownList()?.setValue(previous);
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
const firstItemSkip = (this.page() - 1) * previous;
|
|
480
|
+
const focused = this.focusedInside();
|
|
481
|
+
this.pageSize.set(value);
|
|
482
|
+
this.skip.set(Math.floor(firstItemSkip / value) * value);
|
|
483
|
+
this.emitPageChange();
|
|
484
|
+
this.afterUserChange(focused);
|
|
485
|
+
}
|
|
486
|
+
commitPageInput() {
|
|
487
|
+
const value = this.inputValue();
|
|
488
|
+
if (value == null || !Number.isFinite(value) || !this.hasPages()) {
|
|
489
|
+
this.inputValue.set(this.page());
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
const page = Math.min(Math.max(Math.round(value), 1), this.pageCount());
|
|
493
|
+
this.inputValue.set(page);
|
|
494
|
+
this.goToPage(page);
|
|
495
|
+
}
|
|
496
|
+
formatPageNumber(value) {
|
|
497
|
+
return formatNumber(value, this.#i18n.localeId(), { maximumFractionDigits: 0 });
|
|
498
|
+
}
|
|
499
|
+
goToPage(page) {
|
|
500
|
+
if (page == null || !Number.isFinite(page) || !this.hasPages()) return;
|
|
501
|
+
const target = Math.min(Math.max(Math.round(page), 1), this.pageCount());
|
|
502
|
+
const skip = (target - 1) * this.pageSizeValue();
|
|
503
|
+
if (target === this.page() && skip === this.skip()) return;
|
|
504
|
+
const focused = this.focusedInside();
|
|
505
|
+
this.skip.set(skip);
|
|
506
|
+
this.emitPageChange();
|
|
507
|
+
this.afterUserChange(focused);
|
|
508
|
+
}
|
|
509
|
+
onKeydown(event) {
|
|
510
|
+
if (!this.navigable() || event.defaultPrevented || event.altKey || event.ctrlKey || event.metaKey || !(event.target instanceof HTMLButtonElement) || !this.hasPages()) return;
|
|
511
|
+
const rtl = this.#direction() === "rtl";
|
|
512
|
+
let page;
|
|
513
|
+
switch (event.key) {
|
|
514
|
+
case NavigationKeys.Home:
|
|
515
|
+
page = 1;
|
|
516
|
+
break;
|
|
517
|
+
case NavigationKeys.End:
|
|
518
|
+
page = this.pageCount();
|
|
519
|
+
break;
|
|
520
|
+
case NavigationKeys.PageUp:
|
|
521
|
+
page = this.page() - 1;
|
|
522
|
+
break;
|
|
523
|
+
case NavigationKeys.PageDown:
|
|
524
|
+
page = this.page() + 1;
|
|
525
|
+
break;
|
|
526
|
+
case NavigationKeys.ArrowLeft:
|
|
527
|
+
page = this.page() + (rtl ? 1 : -1);
|
|
528
|
+
break;
|
|
529
|
+
case NavigationKeys.ArrowRight:
|
|
530
|
+
page = this.page() + (rtl ? -1 : 1);
|
|
531
|
+
break;
|
|
532
|
+
default: return;
|
|
533
|
+
}
|
|
534
|
+
event.preventDefault();
|
|
535
|
+
this.goToPage(page);
|
|
536
|
+
}
|
|
537
|
+
onPageInputEnter(event) {
|
|
538
|
+
const keyboardEvent = event;
|
|
539
|
+
if (keyboardEvent.isComposing || keyboardEvent.keyCode === 229) return;
|
|
540
|
+
keyboardEvent.preventDefault();
|
|
541
|
+
this.commitPageInput();
|
|
542
|
+
}
|
|
543
|
+
pageItemClasses(active) {
|
|
544
|
+
return pagerListItemThemeVariants({ active });
|
|
545
|
+
}
|
|
546
|
+
afterUserChange(focusedInside) {
|
|
547
|
+
this.liveStatus.set(this.pagerInfo());
|
|
548
|
+
if (!focusedInside) return;
|
|
549
|
+
const host = this.#hostElementRef.nativeElement;
|
|
550
|
+
afterNextRender({ read: () => {
|
|
551
|
+
const active = this.#document.activeElement;
|
|
552
|
+
if (active instanceof HTMLElement && host.contains(active) && !this.isDisabled(active)) return;
|
|
553
|
+
(host.querySelector("button[aria-current='page']") ?? Array.from(host.querySelectorAll("button")).find((b) => !b.disabled))?.focus();
|
|
554
|
+
} }, { injector: this.#injector });
|
|
555
|
+
}
|
|
556
|
+
buildPageItems(current, visible, count) {
|
|
557
|
+
const page = (value) => ({
|
|
558
|
+
key: `page-${value}`,
|
|
559
|
+
kind: "page",
|
|
560
|
+
page: value
|
|
561
|
+
});
|
|
562
|
+
if (count === 0) return [];
|
|
563
|
+
if (count <= visible + 2) return Array.from({ length: count }, (_, index) => page(index + 1));
|
|
564
|
+
const windowStart = Math.min(Math.max(current - Math.floor((visible - 1) / 2), 2), count - visible);
|
|
565
|
+
const windowEnd = windowStart + visible - 1;
|
|
566
|
+
const items = [page(1)];
|
|
567
|
+
if (windowStart === 3) items.push(page(2));
|
|
568
|
+
else if (windowStart > 3) items.push({
|
|
569
|
+
direction: "backward",
|
|
570
|
+
key: "jump-backward",
|
|
571
|
+
kind: "jump",
|
|
572
|
+
page: Math.max(current - visible, 1)
|
|
573
|
+
});
|
|
574
|
+
for (let value = windowStart; value <= windowEnd; value++) items.push(page(value));
|
|
575
|
+
if (windowEnd === count - 2) items.push(page(count - 1));
|
|
576
|
+
else if (windowEnd < count - 2) items.push({
|
|
577
|
+
direction: "forward",
|
|
578
|
+
key: "jump-forward",
|
|
579
|
+
kind: "jump",
|
|
580
|
+
page: Math.min(current + visible, count)
|
|
581
|
+
});
|
|
582
|
+
items.push(page(count));
|
|
583
|
+
return items;
|
|
584
|
+
}
|
|
585
|
+
createNavigationContext(type) {
|
|
586
|
+
const context = this.pagerContext();
|
|
587
|
+
const page = this.page();
|
|
588
|
+
const pageCount = this.pageCount();
|
|
589
|
+
const backward = type === "first" || type === "previous";
|
|
590
|
+
const targetPage = type === "first" ? 1 : type === "previous" ? page - 1 : type === "next" ? page + 1 : pageCount;
|
|
591
|
+
const disabled = !this.hasPages() || (backward ? page <= 1 : page >= pageCount);
|
|
592
|
+
return {
|
|
593
|
+
...context,
|
|
594
|
+
$implicit: context,
|
|
595
|
+
disabled,
|
|
596
|
+
navigate: () => this.goToPage(targetPage),
|
|
597
|
+
targetPage: Math.min(Math.max(targetPage, 1), Math.max(pageCount, 1))
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
emitPageChange() {
|
|
601
|
+
const take = this.pageSizeValue();
|
|
602
|
+
this.pageChange.emit({
|
|
603
|
+
page: this.page(),
|
|
604
|
+
skip: (this.page() - 1) * take,
|
|
605
|
+
take
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
findNavigationTemplate(type) {
|
|
609
|
+
return this.navigationButtonsTemplateList().find((template) => template.type() === type);
|
|
610
|
+
}
|
|
611
|
+
focusedInside() {
|
|
612
|
+
const active = this.#document.activeElement;
|
|
613
|
+
return active != null && this.#hostElementRef.nativeElement.contains(active);
|
|
614
|
+
}
|
|
615
|
+
isDisabled(element) {
|
|
616
|
+
return element.disabled === true || element.getAttribute("aria-disabled") === "true";
|
|
617
|
+
}
|
|
618
|
+
static {
|
|
619
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
620
|
+
minVersion: "12.0.0",
|
|
621
|
+
version: "22.2.6",
|
|
622
|
+
ngImport: i0,
|
|
623
|
+
type: PagerComponent,
|
|
624
|
+
deps: [],
|
|
625
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
static {
|
|
629
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
630
|
+
minVersion: "17.0.0",
|
|
631
|
+
version: "22.2.6",
|
|
632
|
+
type: PagerComponent,
|
|
633
|
+
isStandalone: true,
|
|
634
|
+
selector: "mona-pager",
|
|
635
|
+
inputs: {
|
|
636
|
+
ariaLabel: {
|
|
637
|
+
classPropertyName: "ariaLabel",
|
|
638
|
+
publicName: "aria-label",
|
|
639
|
+
isSignal: true,
|
|
640
|
+
isRequired: false,
|
|
641
|
+
transformFunction: null
|
|
642
|
+
},
|
|
643
|
+
ariaLabelledBy: {
|
|
644
|
+
classPropertyName: "ariaLabelledBy",
|
|
645
|
+
publicName: "aria-labelledby",
|
|
646
|
+
isSignal: true,
|
|
647
|
+
isRequired: false,
|
|
648
|
+
transformFunction: null
|
|
649
|
+
},
|
|
650
|
+
firstLast: {
|
|
651
|
+
classPropertyName: "firstLast",
|
|
652
|
+
publicName: "firstLast",
|
|
653
|
+
isSignal: true,
|
|
654
|
+
isRequired: false,
|
|
655
|
+
transformFunction: null
|
|
656
|
+
},
|
|
657
|
+
navigable: {
|
|
658
|
+
classPropertyName: "navigable",
|
|
659
|
+
publicName: "navigable",
|
|
660
|
+
isSignal: true,
|
|
661
|
+
isRequired: false,
|
|
662
|
+
transformFunction: null
|
|
663
|
+
},
|
|
664
|
+
pageInput: {
|
|
665
|
+
classPropertyName: "pageInput",
|
|
666
|
+
publicName: "pageInput",
|
|
667
|
+
isSignal: true,
|
|
668
|
+
isRequired: false,
|
|
669
|
+
transformFunction: null
|
|
670
|
+
},
|
|
671
|
+
pageSize: {
|
|
672
|
+
classPropertyName: "pageSize",
|
|
673
|
+
publicName: "pageSize",
|
|
674
|
+
isSignal: true,
|
|
675
|
+
isRequired: false,
|
|
676
|
+
transformFunction: null
|
|
677
|
+
},
|
|
678
|
+
pageSizeValues: {
|
|
679
|
+
classPropertyName: "pageSizeValues",
|
|
680
|
+
publicName: "pageSizeValues",
|
|
681
|
+
isSignal: true,
|
|
682
|
+
isRequired: false,
|
|
683
|
+
transformFunction: null
|
|
684
|
+
},
|
|
685
|
+
previousNext: {
|
|
686
|
+
classPropertyName: "previousNext",
|
|
687
|
+
publicName: "previousNext",
|
|
688
|
+
isSignal: true,
|
|
689
|
+
isRequired: false,
|
|
690
|
+
transformFunction: null
|
|
691
|
+
},
|
|
692
|
+
responsive: {
|
|
693
|
+
classPropertyName: "responsive",
|
|
694
|
+
publicName: "responsive",
|
|
695
|
+
isSignal: true,
|
|
696
|
+
isRequired: false,
|
|
697
|
+
transformFunction: null
|
|
698
|
+
},
|
|
699
|
+
rounded: {
|
|
700
|
+
classPropertyName: "rounded",
|
|
701
|
+
publicName: "rounded",
|
|
702
|
+
isSignal: true,
|
|
703
|
+
isRequired: false,
|
|
704
|
+
transformFunction: null
|
|
705
|
+
},
|
|
706
|
+
showInfo: {
|
|
707
|
+
classPropertyName: "showInfo",
|
|
708
|
+
publicName: "showInfo",
|
|
709
|
+
isSignal: true,
|
|
710
|
+
isRequired: false,
|
|
711
|
+
transformFunction: null
|
|
712
|
+
},
|
|
713
|
+
size: {
|
|
714
|
+
classPropertyName: "size",
|
|
715
|
+
publicName: "size",
|
|
716
|
+
isSignal: true,
|
|
717
|
+
isRequired: false,
|
|
718
|
+
transformFunction: null
|
|
719
|
+
},
|
|
720
|
+
skip: {
|
|
721
|
+
classPropertyName: "skip",
|
|
722
|
+
publicName: "skip",
|
|
723
|
+
isSignal: true,
|
|
724
|
+
isRequired: false,
|
|
725
|
+
transformFunction: null
|
|
726
|
+
},
|
|
727
|
+
total: {
|
|
728
|
+
classPropertyName: "total",
|
|
729
|
+
publicName: "total",
|
|
730
|
+
isSignal: true,
|
|
731
|
+
isRequired: false,
|
|
732
|
+
transformFunction: null
|
|
733
|
+
},
|
|
734
|
+
type: {
|
|
735
|
+
classPropertyName: "type",
|
|
736
|
+
publicName: "type",
|
|
737
|
+
isSignal: true,
|
|
738
|
+
isRequired: false,
|
|
739
|
+
transformFunction: null
|
|
740
|
+
},
|
|
741
|
+
userClasses: {
|
|
742
|
+
classPropertyName: "userClasses",
|
|
743
|
+
publicName: "class",
|
|
744
|
+
isSignal: true,
|
|
745
|
+
isRequired: false,
|
|
746
|
+
transformFunction: null
|
|
747
|
+
},
|
|
748
|
+
visiblePages: {
|
|
749
|
+
classPropertyName: "visiblePages",
|
|
750
|
+
publicName: "visiblePages",
|
|
751
|
+
isSignal: true,
|
|
752
|
+
isRequired: false,
|
|
753
|
+
transformFunction: null
|
|
754
|
+
}
|
|
755
|
+
},
|
|
756
|
+
outputs: {
|
|
757
|
+
pageChange: "pageChange",
|
|
758
|
+
pageSize: "pageSizeChange",
|
|
759
|
+
pageSizeSelect: "pageSizeSelect",
|
|
760
|
+
skip: "skipChange"
|
|
761
|
+
},
|
|
762
|
+
host: {
|
|
763
|
+
attributes: { "role": "navigation" },
|
|
764
|
+
listeners: { "keydown": "onKeydown($event)" },
|
|
765
|
+
properties: {
|
|
766
|
+
"attr.aria-label": "ariaLabelledBy() ? null : ariaLabel() || messages().pagerLabel",
|
|
767
|
+
"attr.aria-labelledby": "ariaLabelledBy() || null",
|
|
768
|
+
"class": "baseClasses()"
|
|
769
|
+
}
|
|
770
|
+
},
|
|
771
|
+
queries: [
|
|
772
|
+
{
|
|
773
|
+
propertyName: "navigationButtonsTemplateList",
|
|
774
|
+
predicate: PagerNavigationButtonsTemplateDirective,
|
|
775
|
+
isSignal: true
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
propertyName: "numericButtonsTemplate",
|
|
779
|
+
first: true,
|
|
780
|
+
predicate: PagerNumericButtonsTemplateDirective,
|
|
781
|
+
descendants: true,
|
|
782
|
+
isSignal: true
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
propertyName: "pageSizeTemplate",
|
|
786
|
+
first: true,
|
|
787
|
+
predicate: PagerPageSizeTemplateDirective,
|
|
788
|
+
descendants: true,
|
|
789
|
+
read: TemplateRef,
|
|
790
|
+
isSignal: true
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
propertyName: "pagerInfoTemplate",
|
|
794
|
+
first: true,
|
|
795
|
+
predicate: PagerInfoTemplateDirective,
|
|
796
|
+
descendants: true,
|
|
797
|
+
isSignal: true
|
|
798
|
+
}
|
|
799
|
+
],
|
|
800
|
+
viewQueries: [{
|
|
801
|
+
propertyName: "pageSizeDropdownList",
|
|
802
|
+
first: true,
|
|
803
|
+
predicate: ["pageSizeDropdownList"],
|
|
804
|
+
descendants: true,
|
|
805
|
+
isSignal: true
|
|
806
|
+
}],
|
|
807
|
+
ngImport: i0,
|
|
808
|
+
template: "@let numericButtonsTemplateRef = numericButtonsTemplate()?.templateRef;\n@let pageSizeTemplateRef = pageSizeTemplate();\n@let pagerInfoTemplateRef = pagerInfoTemplate()?.templateRef;\n\n@if (compact()) {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li>\n <mona-dropdown-list\n class=\"w-20\"\n [data]=\"pageList()\"\n [value]=\"page()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n monaDropDownVirtualScroll\n (valueChange)=\"goToPage($event)\">\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else if (type() === \"numeric\") {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n\n @if (numericButtonsTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"numericButtonsTemplateRef\"\n [ngTemplateOutletContext]=\"numericButtonsContext()\"></ng-container>\n } @else {\n @for (item of pageItems(); track item.key) {\n @if (item.kind === \"page\") {\n <li [attr.data-page]=\"item.page\" [class]=\"pageItemClasses(page() === item.page)\">\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [selected]=\"page() === item.page\"\n [attr.aria-label]=\"messages().pageLabel(item.page)\"\n [attr.aria-current]=\"page() === item.page ? 'page' : null\"\n (click)=\"goToPage(item.page)\">\n {{ formatPageNumber(item.page) }}\n </button>\n </li>\n } @else {\n <li>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"item.direction === 'backward' ? jumpPreviousLabel() : jumpNextLabel()\"\n (click)=\"goToPage(item.page)\">\n <svg lucideEllipsis [size]=\"iconSize()\"></svg>\n </button>\n </li>\n }\n }\n }\n\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n\n @if (hasPages() && pageInput()) {\n <li>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n </li>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else {\n <div [class]=\"inputClasses\">\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li class=\"flex items-center gap-2 mx-2\">\n <span [id]=\"pageInputPrefixId\">{{ messages().pageInputPrefix(pageCount()) }}</span>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-labelledby]=\"pageInputLabelledBy\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n <span [id]=\"pageInputSuffixId\">{{ messages().pageInputSuffix(pageCount()) }}</span>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n </ol>\n </div>\n}\n\n@if (showInfo()) {\n @if (pagerInfoTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"pagerInfoTemplateRef\" [ngTemplateOutletContext]=\"infoContext()\"></ng-container>\n } @else {\n <span [class]=\"infoClasses\">{{ pagerInfo() }}</span>\n }\n}\n<span class=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveStatus() }}</span>\n\n<ng-template #pageSizeSelector>\n @if (pageSizeOptions().length > 0) {\n <li>\n @if (pageSizeTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"pageSizeTemplateRef\"\n [ngTemplateOutletContext]=\"pageSizeContext()\"></ng-container>\n } @else {\n <mona-dropdown-list\n [data]=\"pageSizeOptions()\"\n [aria-label]=\"messages().itemsPerPageLabel\"\n [value]=\"pageSizeValue()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (valueChange)=\"changePageSize($event)\"\n #pageSizeDropdownList>\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ messages().pageSizeLabel(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n }\n </li>\n }\n</ng-template>\n\n<ng-template #firstPageButton>\n <li>\n @let firstPageTemplate = firstPageNavigationTemplate();\n @if (firstPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"firstPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"firstNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().firstPageLabel\"\n [disabled]=\"firstNavigationContext().disabled\"\n (click)=\"goToPage(1)\">\n <svg lucideChevronsLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #previousPageButton>\n <li>\n @let previousPageTemplate = previousPageNavigationTemplate();\n @if (previousPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"previousPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"previousNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"previousNavigationContext().disabled\"\n [attr.aria-label]=\"messages().previousPageLabel\"\n (click)=\"goToPage(page() - 1)\">\n <svg lucideChevronLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #nextPageButton>\n <li>\n @let nextPageTemplate = nextPageNavigationTemplate();\n @if (nextPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"nextPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"nextNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"nextNavigationContext().disabled\"\n [attr.aria-label]=\"messages().nextPageLabel\"\n (click)=\"goToPage(page() + 1)\">\n <svg lucideChevronRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #lastPageButton>\n <li>\n @let lastPageTemplate = lastPageNavigationTemplate();\n @if (lastPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"lastPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"lastNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().lastPageLabel\"\n [disabled]=\"lastNavigationContext().disabled\"\n (click)=\"goToPage(pageCount())\">\n <svg lucideChevronsRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n",
|
|
809
|
+
dependencies: [
|
|
810
|
+
{
|
|
811
|
+
kind: "directive",
|
|
812
|
+
type: ButtonDirective,
|
|
813
|
+
selector: "button[monaButton]",
|
|
814
|
+
inputs: [
|
|
815
|
+
"aria-haspopup",
|
|
816
|
+
"disabled",
|
|
817
|
+
"iconOnly",
|
|
818
|
+
"loading",
|
|
819
|
+
"look",
|
|
820
|
+
"rounded",
|
|
821
|
+
"selected",
|
|
822
|
+
"size",
|
|
823
|
+
"tabindex",
|
|
824
|
+
"toggleable",
|
|
825
|
+
"type",
|
|
826
|
+
"class",
|
|
827
|
+
"value"
|
|
828
|
+
],
|
|
829
|
+
outputs: ["lookChange", "selectedChange"]
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
kind: "component",
|
|
833
|
+
type: NumericTextBoxComponent,
|
|
834
|
+
selector: "mona-numeric-text-box",
|
|
835
|
+
inputs: [
|
|
836
|
+
"formatter",
|
|
837
|
+
"maxValue",
|
|
838
|
+
"minValue",
|
|
839
|
+
"step",
|
|
840
|
+
"value"
|
|
841
|
+
],
|
|
842
|
+
outputs: ["valueChange"]
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
kind: "component",
|
|
846
|
+
type: DropdownListComponent,
|
|
847
|
+
selector: "mona-dropdown-list",
|
|
848
|
+
inputs: [
|
|
849
|
+
"aria-describedby",
|
|
850
|
+
"aria-label",
|
|
851
|
+
"aria-labelledby",
|
|
852
|
+
"data",
|
|
853
|
+
"disabled",
|
|
854
|
+
"invalid",
|
|
855
|
+
"itemDisabled",
|
|
856
|
+
"loading",
|
|
857
|
+
"placeholder",
|
|
858
|
+
"popupClass",
|
|
859
|
+
"popupHeight",
|
|
860
|
+
"popupWidth",
|
|
861
|
+
"readonly",
|
|
862
|
+
"required",
|
|
863
|
+
"rounded",
|
|
864
|
+
"showClearButton",
|
|
865
|
+
"size",
|
|
866
|
+
"textField",
|
|
867
|
+
"touched",
|
|
868
|
+
"class",
|
|
869
|
+
"value",
|
|
870
|
+
"valueField",
|
|
871
|
+
"valuePrimitive"
|
|
872
|
+
],
|
|
873
|
+
outputs: [
|
|
874
|
+
"close",
|
|
875
|
+
"closed",
|
|
876
|
+
"open",
|
|
877
|
+
"opened",
|
|
878
|
+
"touch",
|
|
879
|
+
"valueChange"
|
|
880
|
+
]
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
kind: "directive",
|
|
884
|
+
type: DropdownVirtualScrollDirective,
|
|
885
|
+
selector: " mona-auto-complete[monaDropDownVirtualScroll], mona-dropdown-list[monaDropDownVirtualScroll], mona-combo-box[monaDropDownVirtualScroll], mona-multi-select[monaDropDownVirtualScroll] ",
|
|
886
|
+
inputs: ["monaDropDownVirtualScroll"]
|
|
887
|
+
},
|
|
888
|
+
{
|
|
889
|
+
kind: "directive",
|
|
890
|
+
type: NgTemplateOutlet,
|
|
891
|
+
selector: "[ngTemplateOutlet]",
|
|
892
|
+
inputs: [
|
|
893
|
+
"ngTemplateOutletContext",
|
|
894
|
+
"ngTemplateOutlet",
|
|
895
|
+
"ngTemplateOutletInjector"
|
|
896
|
+
]
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
kind: "directive",
|
|
900
|
+
type: DropdownListValueTemplateDirective,
|
|
901
|
+
selector: "ng-template[monaDropDownListValueTemplate]"
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
kind: "directive",
|
|
905
|
+
type: DropdownItemTemplateDirective,
|
|
906
|
+
selector: " ng-template[monaDropDownItemTemplate], ng-template[monaAutoCompleteItemTemplate], ng-template[monaDropDownListItemTemplate], ng-template[monaComboBoxItemTemplate], ng-template[monaMultiSelectItemTemplate] "
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
kind: "component",
|
|
910
|
+
type: LucideEllipsis,
|
|
911
|
+
selector: "svg[lucideEllipsis], svg[lucideMoreHorizontal]"
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
kind: "component",
|
|
915
|
+
type: LucideChevronsLeft,
|
|
916
|
+
selector: "svg[lucideChevronsLeft]"
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
kind: "component",
|
|
920
|
+
type: LucideChevronLeft,
|
|
921
|
+
selector: "svg[lucideChevronLeft]"
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
kind: "component",
|
|
925
|
+
type: LucideChevronRight,
|
|
926
|
+
selector: "svg[lucideChevronRight]"
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
kind: "component",
|
|
930
|
+
type: LucideChevronsRight,
|
|
931
|
+
selector: "svg[lucideChevronsRight]"
|
|
932
|
+
}
|
|
933
|
+
]
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
};
|
|
937
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
938
|
+
minVersion: "12.0.0",
|
|
939
|
+
version: "22.2.6",
|
|
940
|
+
ngImport: i0,
|
|
941
|
+
type: PagerComponent,
|
|
942
|
+
decorators: [{
|
|
943
|
+
type: Component,
|
|
944
|
+
args: [{
|
|
945
|
+
selector: "mona-pager",
|
|
946
|
+
imports: [
|
|
947
|
+
ButtonDirective,
|
|
948
|
+
NumericTextBoxComponent,
|
|
949
|
+
DropdownListComponent,
|
|
950
|
+
DropdownVirtualScrollDirective,
|
|
951
|
+
NgTemplateOutlet,
|
|
952
|
+
DropdownListValueTemplateDirective,
|
|
953
|
+
DropdownItemTemplateDirective,
|
|
954
|
+
LucideEllipsis,
|
|
955
|
+
LucideChevronsLeft,
|
|
956
|
+
LucideChevronLeft,
|
|
957
|
+
LucideChevronRight,
|
|
958
|
+
LucideChevronsRight
|
|
959
|
+
],
|
|
960
|
+
host: {
|
|
961
|
+
"[attr.aria-label]": "ariaLabelledBy() ? null : ariaLabel() || messages().pagerLabel",
|
|
962
|
+
"[attr.aria-labelledby]": "ariaLabelledBy() || null",
|
|
963
|
+
"[class]": "baseClasses()",
|
|
964
|
+
"(keydown)": "onKeydown($event)",
|
|
965
|
+
role: "navigation"
|
|
966
|
+
},
|
|
967
|
+
template: "@let numericButtonsTemplateRef = numericButtonsTemplate()?.templateRef;\n@let pageSizeTemplateRef = pageSizeTemplate();\n@let pagerInfoTemplateRef = pagerInfoTemplate()?.templateRef;\n\n@if (compact()) {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li>\n <mona-dropdown-list\n class=\"w-20\"\n [data]=\"pageList()\"\n [value]=\"page()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n monaDropDownVirtualScroll\n (valueChange)=\"goToPage($event)\">\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else if (type() === \"numeric\") {\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n\n @if (numericButtonsTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"numericButtonsTemplateRef\"\n [ngTemplateOutletContext]=\"numericButtonsContext()\"></ng-container>\n } @else {\n @for (item of pageItems(); track item.key) {\n @if (item.kind === \"page\") {\n <li [attr.data-page]=\"item.page\" [class]=\"pageItemClasses(page() === item.page)\">\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [selected]=\"page() === item.page\"\n [attr.aria-label]=\"messages().pageLabel(item.page)\"\n [attr.aria-current]=\"page() === item.page ? 'page' : null\"\n (click)=\"goToPage(item.page)\">\n {{ formatPageNumber(item.page) }}\n </button>\n </li>\n } @else {\n <li>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"item.direction === 'backward' ? jumpPreviousLabel() : jumpNextLabel()\"\n (click)=\"goToPage(item.page)\">\n <svg lucideEllipsis [size]=\"iconSize()\"></svg>\n </button>\n </li>\n }\n }\n }\n\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n\n @if (hasPages() && pageInput()) {\n <li>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-label]=\"messages().pageSelectLabel\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n </li>\n }\n <ng-container [ngTemplateOutlet]=\"pageSizeSelector\"></ng-container>\n </ol>\n} @else {\n <div [class]=\"inputClasses\">\n <ol [class]=\"listClasses\">\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"firstPageButton\"></ng-container>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"previousPageButton\"></ng-container>\n }\n @if (hasPages()) {\n <li class=\"flex items-center gap-2 mx-2\">\n <span [id]=\"pageInputPrefixId\">{{ messages().pageInputPrefix(pageCount()) }}</span>\n <mona-numeric-text-box\n [inputId]=\"pageInputId\"\n [spinners]=\"false\"\n [minValue]=\"1\"\n [maxValue]=\"pageCount()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [aria-labelledby]=\"pageInputLabelledBy\"\n [value]=\"inputValue()\"\n (valueChange)=\"inputValue.set($event)\"\n (keydown.enter)=\"onPageInputEnter($event)\"\n (inputBlur)=\"commitPageInput()\"></mona-numeric-text-box>\n <span [id]=\"pageInputSuffixId\">{{ messages().pageInputSuffix(pageCount()) }}</span>\n </li>\n }\n @if (previousNext()) {\n <ng-container [ngTemplateOutlet]=\"nextPageButton\"></ng-container>\n }\n @if (firstLast()) {\n <ng-container [ngTemplateOutlet]=\"lastPageButton\"></ng-container>\n }\n </ol>\n </div>\n}\n\n@if (showInfo()) {\n @if (pagerInfoTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"pagerInfoTemplateRef\" [ngTemplateOutletContext]=\"infoContext()\"></ng-container>\n } @else {\n <span [class]=\"infoClasses\">{{ pagerInfo() }}</span>\n }\n}\n<span class=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveStatus() }}</span>\n\n<ng-template #pageSizeSelector>\n @if (pageSizeOptions().length > 0) {\n <li>\n @if (pageSizeTemplateRef) {\n <ng-container\n [ngTemplateOutlet]=\"pageSizeTemplateRef\"\n [ngTemplateOutletContext]=\"pageSizeContext()\"></ng-container>\n } @else {\n <mona-dropdown-list\n [data]=\"pageSizeOptions()\"\n [aria-label]=\"messages().itemsPerPageLabel\"\n [value]=\"pageSizeValue()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (valueChange)=\"changePageSize($event)\"\n #pageSizeDropdownList>\n <ng-template monaDropDownListValueTemplate let-item>\n <span>{{ messages().pageSizeLabel(item) }}</span>\n </ng-template>\n <ng-template monaDropDownItemTemplate let-item>\n <span>{{ formatPageNumber(item) }}</span>\n </ng-template>\n </mona-dropdown-list>\n }\n </li>\n }\n</ng-template>\n\n<ng-template #firstPageButton>\n <li>\n @let firstPageTemplate = firstPageNavigationTemplate();\n @if (firstPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"firstPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"firstNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().firstPageLabel\"\n [disabled]=\"firstNavigationContext().disabled\"\n (click)=\"goToPage(1)\">\n <svg lucideChevronsLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #previousPageButton>\n <li>\n @let previousPageTemplate = previousPageNavigationTemplate();\n @if (previousPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"previousPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"previousNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"previousNavigationContext().disabled\"\n [attr.aria-label]=\"messages().previousPageLabel\"\n (click)=\"goToPage(page() - 1)\">\n <svg lucideChevronLeft class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #nextPageButton>\n <li>\n @let nextPageTemplate = nextPageNavigationTemplate();\n @if (nextPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"nextPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"nextNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [disabled]=\"nextNavigationContext().disabled\"\n [attr.aria-label]=\"messages().nextPageLabel\"\n (click)=\"goToPage(page() + 1)\">\n <svg lucideChevronRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n\n<ng-template #lastPageButton>\n <li>\n @let lastPageTemplate = lastPageNavigationTemplate();\n @if (lastPageTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"lastPageTemplate.templateRef\"\n [ngTemplateOutletContext]=\"lastNavigationContext()\"></ng-container>\n } @else {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [attr.aria-label]=\"messages().lastPageLabel\"\n [disabled]=\"lastNavigationContext().disabled\"\n (click)=\"goToPage(pageCount())\">\n <svg lucideChevronsRight class=\"rtl:rotate-180\" [size]=\"iconSize()\"></svg>\n </button>\n }\n </li>\n</ng-template>\n"
|
|
968
|
+
}]
|
|
969
|
+
}],
|
|
970
|
+
ctorParameters: () => [],
|
|
971
|
+
propDecorators: {
|
|
972
|
+
navigationButtonsTemplateList: [{
|
|
973
|
+
type: i0.ContentChildren,
|
|
974
|
+
args: [i0.forwardRef(() => PagerNavigationButtonsTemplateDirective), { isSignal: true }]
|
|
975
|
+
}],
|
|
976
|
+
numericButtonsTemplate: [{
|
|
977
|
+
type: i0.ContentChild,
|
|
978
|
+
args: [i0.forwardRef(() => PagerNumericButtonsTemplateDirective), { isSignal: true }]
|
|
979
|
+
}],
|
|
980
|
+
pageSizeDropdownList: [{
|
|
981
|
+
type: i0.ViewChild,
|
|
982
|
+
args: ["pageSizeDropdownList", { isSignal: true }]
|
|
983
|
+
}],
|
|
984
|
+
pageSizeTemplate: [{
|
|
985
|
+
type: i0.ContentChild,
|
|
986
|
+
args: [i0.forwardRef(() => PagerPageSizeTemplateDirective), {
|
|
987
|
+
read: TemplateRef,
|
|
988
|
+
isSignal: true
|
|
989
|
+
}]
|
|
990
|
+
}],
|
|
991
|
+
pagerInfoTemplate: [{
|
|
992
|
+
type: i0.ContentChild,
|
|
993
|
+
args: [i0.forwardRef(() => PagerInfoTemplateDirective), { isSignal: true }]
|
|
994
|
+
}],
|
|
995
|
+
ariaLabel: [{
|
|
996
|
+
type: i0.Input,
|
|
997
|
+
args: [{
|
|
998
|
+
isSignal: true,
|
|
999
|
+
alias: "aria-label",
|
|
1000
|
+
required: false
|
|
1001
|
+
}]
|
|
1002
|
+
}],
|
|
1003
|
+
ariaLabelledBy: [{
|
|
1004
|
+
type: i0.Input,
|
|
1005
|
+
args: [{
|
|
1006
|
+
isSignal: true,
|
|
1007
|
+
alias: "aria-labelledby",
|
|
1008
|
+
required: false
|
|
1009
|
+
}]
|
|
1010
|
+
}],
|
|
1011
|
+
firstLast: [{
|
|
1012
|
+
type: i0.Input,
|
|
1013
|
+
args: [{
|
|
1014
|
+
isSignal: true,
|
|
1015
|
+
alias: "firstLast",
|
|
1016
|
+
required: false
|
|
1017
|
+
}]
|
|
1018
|
+
}],
|
|
1019
|
+
navigable: [{
|
|
1020
|
+
type: i0.Input,
|
|
1021
|
+
args: [{
|
|
1022
|
+
isSignal: true,
|
|
1023
|
+
alias: "navigable",
|
|
1024
|
+
required: false
|
|
1025
|
+
}]
|
|
1026
|
+
}],
|
|
1027
|
+
pageChange: [{
|
|
1028
|
+
type: i0.Output,
|
|
1029
|
+
args: ["pageChange"]
|
|
1030
|
+
}],
|
|
1031
|
+
pageInput: [{
|
|
1032
|
+
type: i0.Input,
|
|
1033
|
+
args: [{
|
|
1034
|
+
isSignal: true,
|
|
1035
|
+
alias: "pageInput",
|
|
1036
|
+
required: false
|
|
1037
|
+
}]
|
|
1038
|
+
}],
|
|
1039
|
+
pageSize: [{
|
|
1040
|
+
type: i0.Input,
|
|
1041
|
+
args: [{
|
|
1042
|
+
isSignal: true,
|
|
1043
|
+
alias: "pageSize",
|
|
1044
|
+
required: false
|
|
1045
|
+
}]
|
|
1046
|
+
}, {
|
|
1047
|
+
type: i0.Output,
|
|
1048
|
+
args: ["pageSizeChange"]
|
|
1049
|
+
}],
|
|
1050
|
+
pageSizeSelect: [{
|
|
1051
|
+
type: i0.Output,
|
|
1052
|
+
args: ["pageSizeSelect"]
|
|
1053
|
+
}],
|
|
1054
|
+
pageSizeValues: [{
|
|
1055
|
+
type: i0.Input,
|
|
1056
|
+
args: [{
|
|
1057
|
+
isSignal: true,
|
|
1058
|
+
alias: "pageSizeValues",
|
|
1059
|
+
required: false
|
|
1060
|
+
}]
|
|
1061
|
+
}],
|
|
1062
|
+
previousNext: [{
|
|
1063
|
+
type: i0.Input,
|
|
1064
|
+
args: [{
|
|
1065
|
+
isSignal: true,
|
|
1066
|
+
alias: "previousNext",
|
|
1067
|
+
required: false
|
|
1068
|
+
}]
|
|
1069
|
+
}],
|
|
1070
|
+
responsive: [{
|
|
1071
|
+
type: i0.Input,
|
|
1072
|
+
args: [{
|
|
1073
|
+
isSignal: true,
|
|
1074
|
+
alias: "responsive",
|
|
1075
|
+
required: false
|
|
1076
|
+
}]
|
|
1077
|
+
}],
|
|
1078
|
+
rounded: [{
|
|
1079
|
+
type: i0.Input,
|
|
1080
|
+
args: [{
|
|
1081
|
+
isSignal: true,
|
|
1082
|
+
alias: "rounded",
|
|
1083
|
+
required: false
|
|
1084
|
+
}]
|
|
1085
|
+
}],
|
|
1086
|
+
showInfo: [{
|
|
1087
|
+
type: i0.Input,
|
|
1088
|
+
args: [{
|
|
1089
|
+
isSignal: true,
|
|
1090
|
+
alias: "showInfo",
|
|
1091
|
+
required: false
|
|
1092
|
+
}]
|
|
1093
|
+
}],
|
|
1094
|
+
size: [{
|
|
1095
|
+
type: i0.Input,
|
|
1096
|
+
args: [{
|
|
1097
|
+
isSignal: true,
|
|
1098
|
+
alias: "size",
|
|
1099
|
+
required: false
|
|
1100
|
+
}]
|
|
1101
|
+
}],
|
|
1102
|
+
skip: [{
|
|
1103
|
+
type: i0.Input,
|
|
1104
|
+
args: [{
|
|
1105
|
+
isSignal: true,
|
|
1106
|
+
alias: "skip",
|
|
1107
|
+
required: false
|
|
1108
|
+
}]
|
|
1109
|
+
}, {
|
|
1110
|
+
type: i0.Output,
|
|
1111
|
+
args: ["skipChange"]
|
|
1112
|
+
}],
|
|
1113
|
+
total: [{
|
|
1114
|
+
type: i0.Input,
|
|
1115
|
+
args: [{
|
|
1116
|
+
isSignal: true,
|
|
1117
|
+
alias: "total",
|
|
1118
|
+
required: false
|
|
1119
|
+
}]
|
|
1120
|
+
}],
|
|
1121
|
+
type: [{
|
|
1122
|
+
type: i0.Input,
|
|
1123
|
+
args: [{
|
|
1124
|
+
isSignal: true,
|
|
1125
|
+
alias: "type",
|
|
1126
|
+
required: false
|
|
1127
|
+
}]
|
|
1128
|
+
}],
|
|
1129
|
+
userClasses: [{
|
|
1130
|
+
type: i0.Input,
|
|
1131
|
+
args: [{
|
|
1132
|
+
isSignal: true,
|
|
1133
|
+
alias: "class",
|
|
1134
|
+
required: false
|
|
1135
|
+
}]
|
|
1136
|
+
}],
|
|
1137
|
+
visiblePages: [{
|
|
1138
|
+
type: i0.Input,
|
|
1139
|
+
args: [{
|
|
1140
|
+
isSignal: true,
|
|
1141
|
+
alias: "visiblePages",
|
|
1142
|
+
required: false
|
|
1143
|
+
}]
|
|
1144
|
+
}]
|
|
1145
|
+
}
|
|
1146
|
+
});
|
|
689
1147
|
export { PAGER_DEFAULT_MESSAGES, PageSizeChangeEvent, PagerComponent, PagerInfoTemplateDirective, PagerNavigationButtonsTemplateDirective, PagerNumericButtonsTemplateDirective, PagerPageSizeTemplateDirective };
|
|
690
|
-
|
|
1148
|
+
|
|
1149
|
+
//# sourceMappingURL=nanahoshi-mona-ui-pager.mjs.map
|