@aeris-ui/core 22.0.0-alpha.10 → 22.0.0-alpha.12
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/README.md +35 -3
- package/THIRD_PARTY_LICENSES.md +48 -0
- package/fesm2022/aeris-ui-core-accordion.mjs +34 -32
- package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +3 -3
- package/fesm2022/aeris-ui-core-auto-complete.mjs +119 -50
- package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-focus.mjs +3 -3
- package/fesm2022/aeris-ui-core-avatar.mjs +6 -6
- package/fesm2022/aeris-ui-core-badge.mjs +6 -6
- package/fesm2022/aeris-ui-core-block-ui.mjs +18 -6
- package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-breadcrumb.mjs +42 -24
- package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button-forms.mjs +78 -0
- package/fesm2022/aeris-ui-core-button-forms.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-button-group.mjs +417 -14
- package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button.mjs +191 -19
- package/fesm2022/aeris-ui-core-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-card.mjs +18 -18
- package/fesm2022/aeris-ui-core-carousel.mjs +81 -19
- package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-cascade-select.mjs +165 -46
- package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chart.mjs +171 -36
- package/fesm2022/aeris-ui-core-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-checkbox.mjs +191 -22
- package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chip.mjs +702 -27
- package/fesm2022/aeris-ui-core-chip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-class-names.mjs +3 -3
- package/fesm2022/aeris-ui-core-code-block.mjs +57 -7
- package/fesm2022/aeris-ui-core-code-block.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-color-picker.mjs +1223 -503
- package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-command-palette.mjs +996 -0
- package/fesm2022/aeris-ui-core-command-palette.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-compare.mjs +61 -34
- package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs +68 -38
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-popup.mjs +46 -38
- package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-context-menu.mjs +94 -43
- package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-date-picker-aeris-date-picker-input-66V2U8rC.mjs +946 -0
- package/fesm2022/aeris-ui-core-date-picker-aeris-date-picker-input-66V2U8rC.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-date-picker.mjs +1186 -650
- package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dialog.mjs +157 -71
- package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-divider.mjs +3 -3
- package/fesm2022/aeris-ui-core-drawer.mjs +751 -77
- package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +14 -6
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-editor.mjs +847 -202
- package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-file-upload.mjs +204 -68
- package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-filter-service.mjs +3 -3
- package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-fluid.mjs +5 -5
- package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-focus-trap.mjs +3 -3
- package/fesm2022/aeris-ui-core-form-field.mjs +15 -15
- package/fesm2022/aeris-ui-core-galleria.mjs +472 -123
- package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-glass.mjs +3 -3
- package/fesm2022/aeris-ui-core-icon-field.mjs +12 -12
- package/fesm2022/aeris-ui-core-inplace.mjs +56 -14
- package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-group.mjs +17 -17
- package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-mask.mjs +61 -8
- package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-number.mjs +191 -28
- package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-otp.mjs +6 -6
- package/fesm2022/aeris-ui-core-input-text.mjs +102 -26
- package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-kbd.mjs +243 -0
- package/fesm2022/aeris-ui-core-kbd.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-key-filter.mjs +3 -3
- package/fesm2022/aeris-ui-core-listbox.mjs +789 -0
- package/fesm2022/aeris-ui-core-listbox.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-mega-menu.mjs +59 -16
- package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menu.mjs +95 -52
- package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menubar.mjs +103 -34
- package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-message.mjs +48 -14
- package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-meter-group.mjs +33 -15
- package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-multi-select.mjs +283 -65
- package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-navbar.mjs +1407 -0
- package/fesm2022/aeris-ui-core-navbar.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-order-list.mjs +191 -35
- package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-organization-chart.mjs +48 -14
- package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-paginator.mjs +300 -61
- package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-panel.mjs +21 -29
- package/fesm2022/aeris-ui-core-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-password.mjs +166 -65
- package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-pick-list.mjs +528 -56
- package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-popover.mjs +504 -72
- package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-bar.mjs +75 -21
- package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-spinner.mjs +24 -6
- package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-radio-button.mjs +119 -19
- package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-rating.mjs +6 -6
- package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-panel.mjs +3 -3
- package/fesm2022/aeris-ui-core-scroll-top.mjs +59 -12
- package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-select-native.mjs +145 -0
- package/fesm2022/aeris-ui-core-select-native.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-select.mjs +206 -87
- package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-sidebar.mjs +1293 -0
- package/fesm2022/aeris-ui-core-sidebar.mjs.map +1 -0
- package/fesm2022/aeris-ui-core-skeleton.mjs +3 -3
- package/fesm2022/aeris-ui-core-slider.mjs +3 -3
- package/fesm2022/aeris-ui-core-speed-dial.mjs +34 -13
- package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-split-button.mjs +26 -11
- package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-splitter.mjs +35 -20
- package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-stepper.mjs +23 -17
- package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-style-class.mjs +3 -3
- package/fesm2022/aeris-ui-core-table.mjs +945 -106
- package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tabs.mjs +81 -19
- package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-textarea.mjs +89 -28
- package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theme-builder.mjs +202 -126
- package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theming.mjs +8 -8
- package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tiered-menu.mjs +94 -43
- package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-timeline.mjs +17 -17
- package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toast.mjs +73 -44
- package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toggle-switch.mjs +3 -3
- package/fesm2022/aeris-ui-core-toolbar.mjs +916 -44
- package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tooltip.mjs +6 -6
- package/fesm2022/aeris-ui-core-tree-select.mjs +252 -61
- package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-table.mjs +493 -124
- package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree.mjs +165 -27
- package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
- package/fesm2022/aeris-ui-core.mjs +632 -12
- package/fesm2022/aeris-ui-core.mjs.map +1 -1
- package/package.json +29 -1
- package/schematics/runtime/theme-builder/aeris-color-derivation.js +1 -1
- package/schematics/runtime/theme-builder/aeris-contrast.js +32 -0
- package/schematics/runtime/theme-builder/aeris-contrast.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-foundation.js +8 -9
- package/schematics/runtime/theme-builder/aeris-foundation.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js +8 -21
- package/schematics/runtime/theme-builder/aeris-semantic-tones.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-generator.js +6 -0
- package/schematics/runtime/theme-builder/aeris-theme-generator.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js +64 -91
- package/schematics/runtime/theme-builder/aeris-theme-resolver.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js +7 -5
- package/schematics/runtime/theme-builder/aeris-theme-tokens.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme-validation.js +11 -1
- package/schematics/runtime/theme-builder/aeris-theme-validation.js.map +1 -1
- package/schematics/runtime/theme-builder/aeris-theme.js +81 -10
- package/schematics/runtime/theme-builder/aeris-theme.js.map +1 -1
- package/styles/_choice-card.scss +93 -0
- package/styles/_icon-artwork.scss +14 -0
- package/styles/_icon-template.scss +42 -0
- package/styles/_selection-icons.scss +12 -0
- package/styles/_table-pinning.scss +119 -0
- package/styles/aeris.css +35 -12
- package/styles/controls.css +149 -11
- package/tools/aeris-theme.mjs +3 -3
- package/tools/aeris-theme.schema.json +13 -11
- package/types/aeris-ui-core-auto-complete.d.ts +12 -0
- package/types/aeris-ui-core-block-ui.d.ts +1 -0
- package/types/aeris-ui-core-button-forms.d.ts +18 -0
- package/types/aeris-ui-core-button-group.d.ts +116 -3
- package/types/aeris-ui-core-button.d.ts +52 -4
- package/types/aeris-ui-core-carousel.d.ts +12 -0
- package/types/aeris-ui-core-cascade-select.d.ts +18 -0
- package/types/aeris-ui-core-chart.d.ts +26 -10
- package/types/aeris-ui-core-checkbox.d.ts +36 -2
- package/types/aeris-ui-core-chip.d.ts +196 -1
- package/types/aeris-ui-core-code-block.d.ts +13 -4
- package/types/aeris-ui-core-color-picker.d.ts +117 -15
- package/types/aeris-ui-core-command-palette.d.ts +267 -0
- package/types/aeris-ui-core-compare.d.ts +6 -0
- package/types/aeris-ui-core-confirm-dialog.d.ts +9 -1
- package/types/aeris-ui-core-context-menu.d.ts +6 -0
- package/types/aeris-ui-core-date-picker.d.ts +90 -20
- package/types/aeris-ui-core-dialog.d.ts +15 -2
- package/types/aeris-ui-core-drawer.d.ts +105 -4
- package/types/aeris-ui-core-dynamic-dialog.d.ts +6 -2
- package/types/aeris-ui-core-editor.d.ts +8 -1
- package/types/aeris-ui-core-file-upload.d.ts +18 -0
- package/types/aeris-ui-core-galleria.d.ts +48 -0
- package/types/aeris-ui-core-inplace.d.ts +6 -0
- package/types/aeris-ui-core-input-mask.d.ts +8 -1
- package/types/aeris-ui-core-input-number.d.ts +20 -1
- package/types/aeris-ui-core-input-text.d.ts +11 -1
- package/types/aeris-ui-core-kbd.d.ts +74 -0
- package/types/aeris-ui-core-listbox.d.ts +222 -0
- package/types/aeris-ui-core-mega-menu.d.ts +6 -0
- package/types/aeris-ui-core-menu.d.ts +6 -0
- package/types/aeris-ui-core-menubar.d.ts +16 -0
- package/types/aeris-ui-core-message.d.ts +6 -0
- package/types/aeris-ui-core-meter-group.d.ts +6 -0
- package/types/aeris-ui-core-multi-select.d.ts +30 -0
- package/types/aeris-ui-core-navbar.d.ts +208 -0
- package/types/aeris-ui-core-order-list.d.ts +24 -0
- package/types/aeris-ui-core-organization-chart.d.ts +6 -0
- package/types/aeris-ui-core-paginator.d.ts +37 -1
- package/types/aeris-ui-core-password.d.ts +18 -0
- package/types/aeris-ui-core-pick-list.d.ts +54 -0
- package/types/aeris-ui-core-popover.d.ts +80 -5
- package/types/aeris-ui-core-progress-bar.d.ts +6 -0
- package/types/aeris-ui-core-progress-spinner.d.ts +6 -0
- package/types/aeris-ui-core-radio-button.d.ts +24 -2
- package/types/aeris-ui-core-rating.d.ts +1 -1
- package/types/aeris-ui-core-scroll-top.d.ts +7 -0
- package/types/aeris-ui-core-select-native.d.ts +40 -0
- package/types/aeris-ui-core-select.d.ts +12 -0
- package/types/aeris-ui-core-sidebar.d.ts +220 -0
- package/types/aeris-ui-core-splitter.d.ts +3 -4
- package/types/aeris-ui-core-table.d.ts +144 -11
- package/types/aeris-ui-core-tabs.d.ts +12 -0
- package/types/aeris-ui-core-textarea.d.ts +11 -1
- package/types/aeris-ui-core-theme-builder.d.ts +31 -296
- package/types/aeris-ui-core-tiered-menu.d.ts +6 -0
- package/types/aeris-ui-core-toast.d.ts +8 -2
- package/types/aeris-ui-core-toolbar.d.ts +213 -3
- package/types/aeris-ui-core-tree-select.d.ts +30 -0
- package/types/aeris-ui-core-tree-table.d.ts +75 -14
- package/types/aeris-ui-core-tree.d.ts +24 -0
- package/types/aeris-ui-core.d.ts +140 -3
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
1
2
|
import * as i0 from "@angular/core";
|
|
2
3
|
import { Component, computed, input, model, output, signal, viewChild } from "@angular/core";
|
|
3
|
-
import { ɵAerisAppendTo } from "@aeris-ui/core";
|
|
4
|
+
import { ɵAerisAppendTo, ɵAerisIcon } from "@aeris-ui/core";
|
|
4
5
|
var AerisPaginator = class AerisPaginator {
|
|
6
|
+
firstIconTemplate = input(...ngDevMode ? [void 0, { debugName: "firstIconTemplate" }] : /* istanbul ignore next */ []);
|
|
7
|
+
previousIconTemplate = input(...ngDevMode ? [void 0, { debugName: "previousIconTemplate" }] : /* istanbul ignore next */ []);
|
|
8
|
+
nextIconTemplate = input(...ngDevMode ? [void 0, { debugName: "nextIconTemplate" }] : /* istanbul ignore next */ []);
|
|
9
|
+
lastIconTemplate = input(...ngDevMode ? [void 0, { debugName: "lastIconTemplate" }] : /* istanbul ignore next */ []);
|
|
10
|
+
dropdownIconTemplate = input(...ngDevMode ? [void 0, { debugName: "dropdownIconTemplate" }] : /* istanbul ignore next */ []);
|
|
11
|
+
checkIconTemplate = input(...ngDevMode ? [void 0, { debugName: "checkIconTemplate" }] : /* istanbul ignore next */ []);
|
|
5
12
|
dismissOverlay = () => {
|
|
6
13
|
this.closeRowsPanel();
|
|
7
14
|
return true;
|
|
@@ -88,7 +95,7 @@ var AerisPaginator = class AerisPaginator {
|
|
|
88
95
|
}
|
|
89
96
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
90
97
|
minVersion: "12.0.0",
|
|
91
|
-
version: "22.2.
|
|
98
|
+
version: "22.2.4",
|
|
92
99
|
ngImport: i0,
|
|
93
100
|
type: AerisPaginator,
|
|
94
101
|
deps: [],
|
|
@@ -96,11 +103,53 @@ var AerisPaginator = class AerisPaginator {
|
|
|
96
103
|
});
|
|
97
104
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
98
105
|
minVersion: "17.0.0",
|
|
99
|
-
version: "22.2.
|
|
106
|
+
version: "22.2.4",
|
|
100
107
|
type: AerisPaginator,
|
|
101
108
|
isStandalone: true,
|
|
102
109
|
selector: "aeris-paginator",
|
|
103
110
|
inputs: {
|
|
111
|
+
firstIconTemplate: {
|
|
112
|
+
classPropertyName: "firstIconTemplate",
|
|
113
|
+
publicName: "firstIconTemplate",
|
|
114
|
+
isSignal: true,
|
|
115
|
+
isRequired: false,
|
|
116
|
+
transformFunction: null
|
|
117
|
+
},
|
|
118
|
+
previousIconTemplate: {
|
|
119
|
+
classPropertyName: "previousIconTemplate",
|
|
120
|
+
publicName: "previousIconTemplate",
|
|
121
|
+
isSignal: true,
|
|
122
|
+
isRequired: false,
|
|
123
|
+
transformFunction: null
|
|
124
|
+
},
|
|
125
|
+
nextIconTemplate: {
|
|
126
|
+
classPropertyName: "nextIconTemplate",
|
|
127
|
+
publicName: "nextIconTemplate",
|
|
128
|
+
isSignal: true,
|
|
129
|
+
isRequired: false,
|
|
130
|
+
transformFunction: null
|
|
131
|
+
},
|
|
132
|
+
lastIconTemplate: {
|
|
133
|
+
classPropertyName: "lastIconTemplate",
|
|
134
|
+
publicName: "lastIconTemplate",
|
|
135
|
+
isSignal: true,
|
|
136
|
+
isRequired: false,
|
|
137
|
+
transformFunction: null
|
|
138
|
+
},
|
|
139
|
+
dropdownIconTemplate: {
|
|
140
|
+
classPropertyName: "dropdownIconTemplate",
|
|
141
|
+
publicName: "dropdownIconTemplate",
|
|
142
|
+
isSignal: true,
|
|
143
|
+
isRequired: false,
|
|
144
|
+
transformFunction: null
|
|
145
|
+
},
|
|
146
|
+
checkIconTemplate: {
|
|
147
|
+
classPropertyName: "checkIconTemplate",
|
|
148
|
+
publicName: "checkIconTemplate",
|
|
149
|
+
isSignal: true,
|
|
150
|
+
isRequired: false,
|
|
151
|
+
transformFunction: null
|
|
152
|
+
},
|
|
104
153
|
first: {
|
|
105
154
|
classPropertyName: "first",
|
|
106
155
|
publicName: "first",
|
|
@@ -205,10 +254,20 @@ var AerisPaginator = class AerisPaginator {
|
|
|
205
254
|
[disabled]="currentPage() === 0"
|
|
206
255
|
(click)="goToPage(0)"
|
|
207
256
|
>
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
257
|
+
@if (firstIconTemplate(); as customIcon) {
|
|
258
|
+
<span
|
|
259
|
+
class="aeris-paginator__page-icon aeris-paginator__page-icon--first"
|
|
260
|
+
aria-hidden="true"
|
|
261
|
+
data-aeris-custom-icon
|
|
262
|
+
><ng-container [ngTemplateOutlet]="customIcon"
|
|
263
|
+
/></span>
|
|
264
|
+
} @else {
|
|
265
|
+
<span
|
|
266
|
+
aerisInternalIcon="chevrons"
|
|
267
|
+
class="aeris-paginator__page-icon aeris-paginator__page-icon--first"
|
|
268
|
+
aria-hidden="true"
|
|
269
|
+
></span>
|
|
270
|
+
}
|
|
212
271
|
</button>
|
|
213
272
|
<button
|
|
214
273
|
type="button"
|
|
@@ -216,10 +275,20 @@ var AerisPaginator = class AerisPaginator {
|
|
|
216
275
|
[disabled]="currentPage() === 0"
|
|
217
276
|
(click)="goToPage(currentPage() - 1)"
|
|
218
277
|
>
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
278
|
+
@if (previousIconTemplate(); as customIcon) {
|
|
279
|
+
<span
|
|
280
|
+
class="aeris-paginator__page-icon aeris-paginator__page-icon--previous"
|
|
281
|
+
aria-hidden="true"
|
|
282
|
+
data-aeris-custom-icon
|
|
283
|
+
><ng-container [ngTemplateOutlet]="customIcon"
|
|
284
|
+
/></span>
|
|
285
|
+
} @else {
|
|
286
|
+
<span
|
|
287
|
+
aerisInternalIcon="chevron"
|
|
288
|
+
class="aeris-paginator__page-icon aeris-paginator__page-icon--previous"
|
|
289
|
+
aria-hidden="true"
|
|
290
|
+
></span>
|
|
291
|
+
}
|
|
223
292
|
</button>
|
|
224
293
|
|
|
225
294
|
@for (page of visiblePages(); track page) {
|
|
@@ -239,10 +308,20 @@ var AerisPaginator = class AerisPaginator {
|
|
|
239
308
|
[disabled]="currentPage() >= pageCount() - 1"
|
|
240
309
|
(click)="goToPage(currentPage() + 1)"
|
|
241
310
|
>
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
311
|
+
@if (nextIconTemplate(); as customIcon) {
|
|
312
|
+
<span
|
|
313
|
+
class="aeris-paginator__page-icon aeris-paginator__page-icon--next"
|
|
314
|
+
aria-hidden="true"
|
|
315
|
+
data-aeris-custom-icon
|
|
316
|
+
><ng-container [ngTemplateOutlet]="customIcon"
|
|
317
|
+
/></span>
|
|
318
|
+
} @else {
|
|
319
|
+
<span
|
|
320
|
+
aerisInternalIcon="chevron"
|
|
321
|
+
class="aeris-paginator__page-icon aeris-paginator__page-icon--next"
|
|
322
|
+
aria-hidden="true"
|
|
323
|
+
></span>
|
|
324
|
+
}
|
|
246
325
|
</button>
|
|
247
326
|
<button
|
|
248
327
|
type="button"
|
|
@@ -250,10 +329,20 @@ var AerisPaginator = class AerisPaginator {
|
|
|
250
329
|
[disabled]="currentPage() >= pageCount() - 1"
|
|
251
330
|
(click)="goToPage(pageCount() - 1)"
|
|
252
331
|
>
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
332
|
+
@if (lastIconTemplate(); as customIcon) {
|
|
333
|
+
<span
|
|
334
|
+
class="aeris-paginator__page-icon aeris-paginator__page-icon--last"
|
|
335
|
+
aria-hidden="true"
|
|
336
|
+
data-aeris-custom-icon
|
|
337
|
+
><ng-container [ngTemplateOutlet]="customIcon"
|
|
338
|
+
/></span>
|
|
339
|
+
} @else {
|
|
340
|
+
<span
|
|
341
|
+
aerisInternalIcon="chevrons"
|
|
342
|
+
class="aeris-paginator__page-icon aeris-paginator__page-icon--last"
|
|
343
|
+
aria-hidden="true"
|
|
344
|
+
></span>
|
|
345
|
+
}
|
|
257
346
|
</button>
|
|
258
347
|
</div>
|
|
259
348
|
|
|
@@ -272,7 +361,17 @@ var AerisPaginator = class AerisPaginator {
|
|
|
272
361
|
(keydown)="handleRowsTriggerKeydown($event)"
|
|
273
362
|
>
|
|
274
363
|
<span [id]="rowsValueId">{{ rows() }}</span>
|
|
275
|
-
|
|
364
|
+
@if (dropdownIconTemplate(); as customIcon) {
|
|
365
|
+
<span class="aeris-paginator__chevron" aria-hidden="true" data-aeris-custom-icon
|
|
366
|
+
><ng-container [ngTemplateOutlet]="customIcon"
|
|
367
|
+
/></span>
|
|
368
|
+
} @else {
|
|
369
|
+
<span
|
|
370
|
+
aerisInternalIcon="chevron"
|
|
371
|
+
class="aeris-paginator__chevron"
|
|
372
|
+
aria-hidden="true"
|
|
373
|
+
></span>
|
|
374
|
+
}
|
|
276
375
|
</button>
|
|
277
376
|
|
|
278
377
|
@if (rowsPanelOpen()) {
|
|
@@ -298,7 +397,17 @@ var AerisPaginator = class AerisPaginator {
|
|
|
298
397
|
>
|
|
299
398
|
<span>{{ option }}</span>
|
|
300
399
|
@if (option === rows()) {
|
|
301
|
-
|
|
400
|
+
@if (checkIconTemplate(); as customIcon) {
|
|
401
|
+
<span class="aeris-paginator__check" aria-hidden="true" data-aeris-custom-icon
|
|
402
|
+
><ng-container [ngTemplateOutlet]="customIcon"
|
|
403
|
+
/></span>
|
|
404
|
+
} @else {
|
|
405
|
+
<span
|
|
406
|
+
aerisInternalIcon="check"
|
|
407
|
+
class="aeris-paginator__check"
|
|
408
|
+
aria-hidden="true"
|
|
409
|
+
></span>
|
|
410
|
+
}
|
|
302
411
|
}
|
|
303
412
|
</button>
|
|
304
413
|
}
|
|
@@ -309,37 +418,59 @@ var AerisPaginator = class AerisPaginator {
|
|
|
309
418
|
</nav>
|
|
310
419
|
`,
|
|
311
420
|
isInline: true,
|
|
312
|
-
styles: [":host{--_aeris-chevron-mask: var( --aeris-icon-chevron, url(data:image/svg+xml,%3Csvg
|
|
313
|
-
dependencies: [
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
"
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
"
|
|
322
|
-
|
|
323
|
-
"
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
421
|
+
styles: [":host{--_aeris-chevron-mask: var( --aeris-icon-chevron, url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"black\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"%3E%3Cpath d=\"m6 9 6 6 6-6\"/%3E%3C/svg%3E') );display:block;min-width:0}.aeris-paginator{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:calc(var(--aeris-density-gap, .5rem) * 2);min-width:0;color:var(--aeris-text-2, #454545);font-size:var(--aeris-font-size-md, .8125rem)}.aeris-paginator__pages{display:inline-flex;flex-wrap:wrap;flex:1 1 18rem;gap:calc(var(--aeris-density-gap, .5rem) * .7);justify-content:center;min-width:0}button,select{min-height:max(2rem,var(--aeris-control-height, 2.625rem) - .5rem);border:1px solid var(--aeris-border, #efefef);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .4375rem));background:var(--aeris-surface, #fff);color:var(--aeris-text, #111111);font:inherit}button{min-width:max(2rem,var(--aeris-control-height, 2.625rem) - .5rem);padding:0 calc(var(--aeris-control-padding-x, .75rem) * .75);border-color:var(--aeris-border);font-weight:var(--aeris-font-weight-bold, 700);cursor:pointer;transition:border-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),background-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),box-shadow var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}@media(hover:hover){button:hover:not(:disabled){border-color:color-mix(in srgb,var(--aeris-primary, #111111) 58%,var(--aeris-border, #efefef));background:var(--aeris-interactive-hover, var(--aeris-surface-2, #f3f3f3));color:var(--aeris-text, #111111);transform:translateY(-1px)}}@media(hover:hover){.aeris-paginator__pages>button[aria-current=page]:hover{background:color-mix(in srgb,var(--aeris-primary, #111111) 22%,var(--aeris-surface, #fff))}}button[aria-current=page]{border-color:var(--aeris-primary, #111111);background:color-mix(in srgb,var(--aeris-primary, #111111) 16%,var(--aeris-surface, #fff));color:var(--aeris-primary-text, #111111);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--aeris-primary, #111111) 28%,transparent)}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,.aeris-paginator__rows-trigger:focus-visible{outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-focus, #111111);outline-offset:var(--aeris-focus-ring-offset, 2px)}.aeris-paginator__page-icon{position:relative;width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem);display:block}.aeris-paginator__page-icon:before{position:absolute;inset:0;content:\"\";background:currentColor;-webkit-mask:var(--aeris-icon-chevron) center/100% 100% no-repeat;mask:var(--aeris-icon-chevron) center/100% 100% no-repeat}.aeris-paginator__page-icon--first:before,.aeris-paginator__page-icon--last:before{-webkit-mask-image:var(--aeris-icon-chevrons, url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"black\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"%3E%3Cpath d=\"m7 6 5 5 5-5\"/%3E%3Cpath d=\"m7 13 5 5 5-5\"/%3E%3C/svg%3E'));mask-image:var(--aeris-icon-chevrons, url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"black\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"%3E%3Cpath d=\"m7 6 5 5 5-5\"/%3E%3Cpath d=\"m7 13 5 5 5-5\"/%3E%3C/svg%3E'))}.aeris-paginator__page-icon--previous:before,.aeris-paginator__page-icon--first:before{transform:rotate(90deg)}.aeris-paginator__page-icon--next:before,.aeris-paginator__page-icon--last:before{transform:rotate(-90deg)}:host-context([dir=rtl]) .aeris-paginator__page-icon--previous:before,:host-context([dir=rtl]) .aeris-paginator__page-icon--first:before{transform:rotate(-90deg)}:host-context([dir=rtl]) .aeris-paginator__page-icon--next:before,:host-context([dir=rtl]) .aeris-paginator__page-icon--last:before{transform:rotate(90deg)}.aeris-paginator__rows{position:relative;display:inline-flex;flex:0 1 auto;align-items:center;gap:var(--aeris-density-gap, .5rem);min-width:0;white-space:nowrap}.aeris-paginator__rows-trigger{min-width:4.5rem;display:inline-flex;align-items:center;justify-content:space-between;gap:calc(var(--aeris-density-gap, .5rem) + .25rem);padding:0 var(--aeris-control-padding-x, .75rem);cursor:pointer}.aeris-paginator__chevron{position:relative;width:1rem;height:1rem}.aeris-paginator__chevron:before{position:absolute;top:50%;left:50%;width:1rem;height:1rem;background:currentColor;content:\"\";transform:translate(-50%,-50%);transition:transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease);-webkit-mask:var(--_aeris-chevron-mask) center/100% 100% no-repeat;mask:var(--_aeris-chevron-mask) center/100% 100% no-repeat}.aeris-paginator__rows-trigger[aria-expanded=true] .aeris-paginator__chevron:before{transform:translate(-50%,-50%) rotate(180deg)}.aeris-paginator__rows-panel{position:absolute;z-index:20;top:calc(100% + var(--aeris-density-gap, .5rem));right:0;min-width:5.75rem;padding:var(--aeris-overlay-padding, .375rem);border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-overlay, var(--aeris-radius-md, .6875rem));background:var(--aeris-surface, #fff);box-shadow:var(--aeris-overlay-shadow, var(--aeris-shadow-lg, 0 18px 48px rgba(0, 0, 0, .18)))}.aeris-paginator__rows-panel button{width:100%;min-height:var(--aeris-item-height, 2.5rem);justify-content:space-between;display:flex;align-items:center;border:0;border-radius:var(--aeris-radius-item, var(--aeris-radius-sm, .4375rem));background:transparent;color:var(--aeris-text-2, #454545);font-weight:var(--aeris-font-weight-semibold, 600);text-align:left}.aeris-paginator__rows-panel button[aria-selected=true]{background:color-mix(in srgb,var(--aeris-primary, #111111) 12%,transparent);color:var(--aeris-primary-text, #111111)}@media(hover:hover){.aeris-paginator__rows-panel button:hover{background:color-mix(in srgb,var(--aeris-primary, #111111) 12%,transparent);color:var(--aeris-primary-text, #111111)}}@media(max-width:42rem){.aeris-paginator{align-items:stretch;display:grid;grid-template-columns:1fr;justify-items:center;gap:calc(var(--aeris-density-gap, .5rem) + .25rem)}.aeris-paginator__report,.aeris-paginator__rows{justify-content:center}.aeris-paginator__pages{width:100%;flex:none;order:2}.aeris-paginator__rows{order:3}}@media(max-width:30rem){.aeris-paginator{font-size:var(--aeris-font-size-md, .8125rem)}.aeris-paginator__pages{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;padding-block:.15rem;scrollbar-width:thin}.aeris-paginator__pages button{flex:0 0 auto}.aeris-paginator__rows{width:100%;flex-wrap:wrap}.aeris-paginator__rows-trigger{flex:1 1 6rem;max-width:9rem}}@media(prefers-reduced-motion:reduce){button,.aeris-paginator__chevron:before{transition:none}}@media(prefers-reduced-motion:reduce)and (hover:hover){button:hover:not(:disabled){transform:none}}@media(pointer:coarse){.aeris-paginator__button{min-block-size:var(--aeris-touch-target-size, 2.75rem);min-inline-size:var(--aeris-touch-target-size, 2.75rem)}}:host [data-aeris-custom-icon]:not([data-aeris-global-icon]){display:inline-flex;align-items:center;justify-content:center;inline-size:var(--aeris-icon-size, 1rem);block-size:var(--aeris-icon-size, 1rem);background:transparent;border:0;box-shadow:none;-webkit-mask:none;mask:none;line-height:1}:host [data-aeris-custom-icon]:before,:host [data-aeris-custom-icon]:after{display:none}.aeris-paginator__page-icon--previous[data-aeris-custom-icon],.aeris-paginator__page-icon--first[data-aeris-custom-icon]{rotate:90deg}.aeris-paginator__page-icon--next[data-aeris-custom-icon],.aeris-paginator__page-icon--last[data-aeris-custom-icon]{rotate:-90deg}:host-context([dir=rtl]) .aeris-paginator__page-icon--previous[data-aeris-custom-icon]{rotate:-90deg}:host-context([dir=rtl]) .aeris-paginator__page-icon--first[data-aeris-custom-icon]{rotate:-90deg}:host-context([dir=rtl]) .aeris-paginator__page-icon--next[data-aeris-custom-icon]{rotate:90deg}:host-context([dir=rtl]) .aeris-paginator__page-icon--last[data-aeris-custom-icon]{rotate:90deg}.aeris-paginator__chevron[data-aeris-custom-icon]{transition:rotate var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-paginator__rows-trigger[aria-expanded=true] .aeris-paginator__chevron[data-aeris-custom-icon]{rotate:180deg}@media(prefers-reduced-motion:reduce){.aeris-paginator__chevron[data-aeris-custom-icon]{transition:none}}:host .aeris-paginator__check[data-aeris-custom-icon]{transform:none}.aeris-paginator__check:not([data-aeris-custom-icon]){top:0;width:min(var(--aeris-icon-size, 1rem),100%);height:min(var(--aeris-icon-size, 1rem),100%);border:0;background:currentColor;-webkit-mask:var(--aeris-icon-check) center/100% 100% no-repeat;mask:var(--aeris-icon-check) center/100% 100% no-repeat}\n"],
|
|
422
|
+
dependencies: [
|
|
423
|
+
{
|
|
424
|
+
kind: "component",
|
|
425
|
+
type: ɵAerisIcon,
|
|
426
|
+
selector: "span[aerisInternalIcon]",
|
|
427
|
+
inputs: ["aerisInternalIcon", "aerisInternalIconFallback"]
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
kind: "directive",
|
|
431
|
+
type: NgTemplateOutlet,
|
|
432
|
+
selector: "[ngTemplateOutlet]",
|
|
433
|
+
inputs: [
|
|
434
|
+
"ngTemplateOutletContext",
|
|
435
|
+
"ngTemplateOutlet",
|
|
436
|
+
"ngTemplateOutletInjector"
|
|
437
|
+
]
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
kind: "directive",
|
|
441
|
+
type: ɵAerisAppendTo,
|
|
442
|
+
selector: "[aerisInternalAppendTo]",
|
|
443
|
+
inputs: [
|
|
444
|
+
"aerisInternalAppendTo",
|
|
445
|
+
"aerisInternalAppendToDefault",
|
|
446
|
+
"aerisInternalAppendToAnchor",
|
|
447
|
+
"aerisInternalAppendToOffset",
|
|
448
|
+
"aerisInternalAppendToMatchWidth",
|
|
449
|
+
"aerisInternalAppendToPlacement",
|
|
450
|
+
"aerisInternalAppendToAlignment",
|
|
451
|
+
"aerisInternalAppendToCollisionPadding",
|
|
452
|
+
"aerisInternalAppendToPositionSelf",
|
|
453
|
+
"aerisInternalAppendToDismiss"
|
|
454
|
+
],
|
|
455
|
+
outputs: ["aerisInternalAppendToOutside"]
|
|
456
|
+
}
|
|
457
|
+
]
|
|
331
458
|
});
|
|
332
459
|
};
|
|
333
460
|
i0.ɵɵngDeclareClassMetadata({
|
|
334
461
|
minVersion: "12.0.0",
|
|
335
|
-
version: "22.2.
|
|
462
|
+
version: "22.2.4",
|
|
336
463
|
ngImport: i0,
|
|
337
464
|
type: AerisPaginator,
|
|
338
465
|
decorators: [{
|
|
339
466
|
type: Component,
|
|
340
467
|
args: [{
|
|
341
468
|
selector: "aeris-paginator",
|
|
342
|
-
imports: [
|
|
469
|
+
imports: [
|
|
470
|
+
ɵAerisIcon,
|
|
471
|
+
NgTemplateOutlet,
|
|
472
|
+
ɵAerisAppendTo
|
|
473
|
+
],
|
|
343
474
|
template: `
|
|
344
475
|
<nav class="aeris-paginator" [attr.aria-label]="ariaLabel()">
|
|
345
476
|
<span class="aeris-paginator__report" aria-live="polite">{{ pageReport() }}</span>
|
|
@@ -351,10 +482,20 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
351
482
|
[disabled]="currentPage() === 0"
|
|
352
483
|
(click)="goToPage(0)"
|
|
353
484
|
>
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
485
|
+
@if (firstIconTemplate(); as customIcon) {
|
|
486
|
+
<span
|
|
487
|
+
class="aeris-paginator__page-icon aeris-paginator__page-icon--first"
|
|
488
|
+
aria-hidden="true"
|
|
489
|
+
data-aeris-custom-icon
|
|
490
|
+
><ng-container [ngTemplateOutlet]="customIcon"
|
|
491
|
+
/></span>
|
|
492
|
+
} @else {
|
|
493
|
+
<span
|
|
494
|
+
aerisInternalIcon="chevrons"
|
|
495
|
+
class="aeris-paginator__page-icon aeris-paginator__page-icon--first"
|
|
496
|
+
aria-hidden="true"
|
|
497
|
+
></span>
|
|
498
|
+
}
|
|
358
499
|
</button>
|
|
359
500
|
<button
|
|
360
501
|
type="button"
|
|
@@ -362,10 +503,20 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
362
503
|
[disabled]="currentPage() === 0"
|
|
363
504
|
(click)="goToPage(currentPage() - 1)"
|
|
364
505
|
>
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
506
|
+
@if (previousIconTemplate(); as customIcon) {
|
|
507
|
+
<span
|
|
508
|
+
class="aeris-paginator__page-icon aeris-paginator__page-icon--previous"
|
|
509
|
+
aria-hidden="true"
|
|
510
|
+
data-aeris-custom-icon
|
|
511
|
+
><ng-container [ngTemplateOutlet]="customIcon"
|
|
512
|
+
/></span>
|
|
513
|
+
} @else {
|
|
514
|
+
<span
|
|
515
|
+
aerisInternalIcon="chevron"
|
|
516
|
+
class="aeris-paginator__page-icon aeris-paginator__page-icon--previous"
|
|
517
|
+
aria-hidden="true"
|
|
518
|
+
></span>
|
|
519
|
+
}
|
|
369
520
|
</button>
|
|
370
521
|
|
|
371
522
|
@for (page of visiblePages(); track page) {
|
|
@@ -385,10 +536,20 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
385
536
|
[disabled]="currentPage() >= pageCount() - 1"
|
|
386
537
|
(click)="goToPage(currentPage() + 1)"
|
|
387
538
|
>
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
539
|
+
@if (nextIconTemplate(); as customIcon) {
|
|
540
|
+
<span
|
|
541
|
+
class="aeris-paginator__page-icon aeris-paginator__page-icon--next"
|
|
542
|
+
aria-hidden="true"
|
|
543
|
+
data-aeris-custom-icon
|
|
544
|
+
><ng-container [ngTemplateOutlet]="customIcon"
|
|
545
|
+
/></span>
|
|
546
|
+
} @else {
|
|
547
|
+
<span
|
|
548
|
+
aerisInternalIcon="chevron"
|
|
549
|
+
class="aeris-paginator__page-icon aeris-paginator__page-icon--next"
|
|
550
|
+
aria-hidden="true"
|
|
551
|
+
></span>
|
|
552
|
+
}
|
|
392
553
|
</button>
|
|
393
554
|
<button
|
|
394
555
|
type="button"
|
|
@@ -396,10 +557,20 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
396
557
|
[disabled]="currentPage() >= pageCount() - 1"
|
|
397
558
|
(click)="goToPage(pageCount() - 1)"
|
|
398
559
|
>
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
560
|
+
@if (lastIconTemplate(); as customIcon) {
|
|
561
|
+
<span
|
|
562
|
+
class="aeris-paginator__page-icon aeris-paginator__page-icon--last"
|
|
563
|
+
aria-hidden="true"
|
|
564
|
+
data-aeris-custom-icon
|
|
565
|
+
><ng-container [ngTemplateOutlet]="customIcon"
|
|
566
|
+
/></span>
|
|
567
|
+
} @else {
|
|
568
|
+
<span
|
|
569
|
+
aerisInternalIcon="chevrons"
|
|
570
|
+
class="aeris-paginator__page-icon aeris-paginator__page-icon--last"
|
|
571
|
+
aria-hidden="true"
|
|
572
|
+
></span>
|
|
573
|
+
}
|
|
403
574
|
</button>
|
|
404
575
|
</div>
|
|
405
576
|
|
|
@@ -418,7 +589,17 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
418
589
|
(keydown)="handleRowsTriggerKeydown($event)"
|
|
419
590
|
>
|
|
420
591
|
<span [id]="rowsValueId">{{ rows() }}</span>
|
|
421
|
-
|
|
592
|
+
@if (dropdownIconTemplate(); as customIcon) {
|
|
593
|
+
<span class="aeris-paginator__chevron" aria-hidden="true" data-aeris-custom-icon
|
|
594
|
+
><ng-container [ngTemplateOutlet]="customIcon"
|
|
595
|
+
/></span>
|
|
596
|
+
} @else {
|
|
597
|
+
<span
|
|
598
|
+
aerisInternalIcon="chevron"
|
|
599
|
+
class="aeris-paginator__chevron"
|
|
600
|
+
aria-hidden="true"
|
|
601
|
+
></span>
|
|
602
|
+
}
|
|
422
603
|
</button>
|
|
423
604
|
|
|
424
605
|
@if (rowsPanelOpen()) {
|
|
@@ -444,7 +625,17 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
444
625
|
>
|
|
445
626
|
<span>{{ option }}</span>
|
|
446
627
|
@if (option === rows()) {
|
|
447
|
-
|
|
628
|
+
@if (checkIconTemplate(); as customIcon) {
|
|
629
|
+
<span class="aeris-paginator__check" aria-hidden="true" data-aeris-custom-icon
|
|
630
|
+
><ng-container [ngTemplateOutlet]="customIcon"
|
|
631
|
+
/></span>
|
|
632
|
+
} @else {
|
|
633
|
+
<span
|
|
634
|
+
aerisInternalIcon="check"
|
|
635
|
+
class="aeris-paginator__check"
|
|
636
|
+
aria-hidden="true"
|
|
637
|
+
></span>
|
|
638
|
+
}
|
|
448
639
|
}
|
|
449
640
|
</button>
|
|
450
641
|
}
|
|
@@ -454,10 +645,58 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
454
645
|
}
|
|
455
646
|
</nav>
|
|
456
647
|
`,
|
|
457
|
-
styles: [":host{--_aeris-chevron-mask: var( --aeris-icon-chevron, url(data:image/svg+xml,%3Csvg
|
|
648
|
+
styles: [":host{--_aeris-chevron-mask: var( --aeris-icon-chevron, url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"black\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"%3E%3Cpath d=\"m6 9 6 6 6-6\"/%3E%3C/svg%3E') );display:block;min-width:0}.aeris-paginator{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:calc(var(--aeris-density-gap, .5rem) * 2);min-width:0;color:var(--aeris-text-2, #454545);font-size:var(--aeris-font-size-md, .8125rem)}.aeris-paginator__pages{display:inline-flex;flex-wrap:wrap;flex:1 1 18rem;gap:calc(var(--aeris-density-gap, .5rem) * .7);justify-content:center;min-width:0}button,select{min-height:max(2rem,var(--aeris-control-height, 2.625rem) - .5rem);border:1px solid var(--aeris-border, #efefef);border-radius:var(--aeris-radius-control, var(--aeris-radius-sm, .4375rem));background:var(--aeris-surface, #fff);color:var(--aeris-text, #111111);font:inherit}button{min-width:max(2rem,var(--aeris-control-height, 2.625rem) - .5rem);padding:0 calc(var(--aeris-control-padding-x, .75rem) * .75);border-color:var(--aeris-border);font-weight:var(--aeris-font-weight-bold, 700);cursor:pointer;transition:border-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),background-color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),box-shadow var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),color var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease),transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}@media(hover:hover){button:hover:not(:disabled){border-color:color-mix(in srgb,var(--aeris-primary, #111111) 58%,var(--aeris-border, #efefef));background:var(--aeris-interactive-hover, var(--aeris-surface-2, #f3f3f3));color:var(--aeris-text, #111111);transform:translateY(-1px)}}@media(hover:hover){.aeris-paginator__pages>button[aria-current=page]:hover{background:color-mix(in srgb,var(--aeris-primary, #111111) 22%,var(--aeris-surface, #fff))}}button[aria-current=page]{border-color:var(--aeris-primary, #111111);background:color-mix(in srgb,var(--aeris-primary, #111111) 16%,var(--aeris-surface, #fff));color:var(--aeris-primary-text, #111111);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--aeris-primary, #111111) 28%,transparent)}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,.aeris-paginator__rows-trigger:focus-visible{outline:var(--aeris-focus-ring-width, 3px) solid var(--aeris-focus, #111111);outline-offset:var(--aeris-focus-ring-offset, 2px)}.aeris-paginator__page-icon{position:relative;width:var(--aeris-icon-size, 1rem);height:var(--aeris-icon-size, 1rem);display:block}.aeris-paginator__page-icon:before{position:absolute;inset:0;content:\"\";background:currentColor;-webkit-mask:var(--aeris-icon-chevron) center/100% 100% no-repeat;mask:var(--aeris-icon-chevron) center/100% 100% no-repeat}.aeris-paginator__page-icon--first:before,.aeris-paginator__page-icon--last:before{-webkit-mask-image:var(--aeris-icon-chevrons, url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"black\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"%3E%3Cpath d=\"m7 6 5 5 5-5\"/%3E%3Cpath d=\"m7 13 5 5 5-5\"/%3E%3C/svg%3E'));mask-image:var(--aeris-icon-chevrons, url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"black\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"%3E%3Cpath d=\"m7 6 5 5 5-5\"/%3E%3Cpath d=\"m7 13 5 5 5-5\"/%3E%3C/svg%3E'))}.aeris-paginator__page-icon--previous:before,.aeris-paginator__page-icon--first:before{transform:rotate(90deg)}.aeris-paginator__page-icon--next:before,.aeris-paginator__page-icon--last:before{transform:rotate(-90deg)}:host-context([dir=rtl]) .aeris-paginator__page-icon--previous:before,:host-context([dir=rtl]) .aeris-paginator__page-icon--first:before{transform:rotate(-90deg)}:host-context([dir=rtl]) .aeris-paginator__page-icon--next:before,:host-context([dir=rtl]) .aeris-paginator__page-icon--last:before{transform:rotate(90deg)}.aeris-paginator__rows{position:relative;display:inline-flex;flex:0 1 auto;align-items:center;gap:var(--aeris-density-gap, .5rem);min-width:0;white-space:nowrap}.aeris-paginator__rows-trigger{min-width:4.5rem;display:inline-flex;align-items:center;justify-content:space-between;gap:calc(var(--aeris-density-gap, .5rem) + .25rem);padding:0 var(--aeris-control-padding-x, .75rem);cursor:pointer}.aeris-paginator__chevron{position:relative;width:1rem;height:1rem}.aeris-paginator__chevron:before{position:absolute;top:50%;left:50%;width:1rem;height:1rem;background:currentColor;content:\"\";transform:translate(-50%,-50%);transition:transform var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease);-webkit-mask:var(--_aeris-chevron-mask) center/100% 100% no-repeat;mask:var(--_aeris-chevron-mask) center/100% 100% no-repeat}.aeris-paginator__rows-trigger[aria-expanded=true] .aeris-paginator__chevron:before{transform:translate(-50%,-50%) rotate(180deg)}.aeris-paginator__rows-panel{position:absolute;z-index:20;top:calc(100% + var(--aeris-density-gap, .5rem));right:0;min-width:5.75rem;padding:var(--aeris-overlay-padding, .375rem);border:1px solid var(--aeris-border);border-radius:var(--aeris-radius-overlay, var(--aeris-radius-md, .6875rem));background:var(--aeris-surface, #fff);box-shadow:var(--aeris-overlay-shadow, var(--aeris-shadow-lg, 0 18px 48px rgba(0, 0, 0, .18)))}.aeris-paginator__rows-panel button{width:100%;min-height:var(--aeris-item-height, 2.5rem);justify-content:space-between;display:flex;align-items:center;border:0;border-radius:var(--aeris-radius-item, var(--aeris-radius-sm, .4375rem));background:transparent;color:var(--aeris-text-2, #454545);font-weight:var(--aeris-font-weight-semibold, 600);text-align:left}.aeris-paginator__rows-panel button[aria-selected=true]{background:color-mix(in srgb,var(--aeris-primary, #111111) 12%,transparent);color:var(--aeris-primary-text, #111111)}@media(hover:hover){.aeris-paginator__rows-panel button:hover{background:color-mix(in srgb,var(--aeris-primary, #111111) 12%,transparent);color:var(--aeris-primary-text, #111111)}}@media(max-width:42rem){.aeris-paginator{align-items:stretch;display:grid;grid-template-columns:1fr;justify-items:center;gap:calc(var(--aeris-density-gap, .5rem) + .25rem)}.aeris-paginator__report,.aeris-paginator__rows{justify-content:center}.aeris-paginator__pages{width:100%;flex:none;order:2}.aeris-paginator__rows{order:3}}@media(max-width:30rem){.aeris-paginator{font-size:var(--aeris-font-size-md, .8125rem)}.aeris-paginator__pages{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;padding-block:.15rem;scrollbar-width:thin}.aeris-paginator__pages button{flex:0 0 auto}.aeris-paginator__rows{width:100%;flex-wrap:wrap}.aeris-paginator__rows-trigger{flex:1 1 6rem;max-width:9rem}}@media(prefers-reduced-motion:reduce){button,.aeris-paginator__chevron:before{transition:none}}@media(prefers-reduced-motion:reduce)and (hover:hover){button:hover:not(:disabled){transform:none}}@media(pointer:coarse){.aeris-paginator__button{min-block-size:var(--aeris-touch-target-size, 2.75rem);min-inline-size:var(--aeris-touch-target-size, 2.75rem)}}:host [data-aeris-custom-icon]:not([data-aeris-global-icon]){display:inline-flex;align-items:center;justify-content:center;inline-size:var(--aeris-icon-size, 1rem);block-size:var(--aeris-icon-size, 1rem);background:transparent;border:0;box-shadow:none;-webkit-mask:none;mask:none;line-height:1}:host [data-aeris-custom-icon]:before,:host [data-aeris-custom-icon]:after{display:none}.aeris-paginator__page-icon--previous[data-aeris-custom-icon],.aeris-paginator__page-icon--first[data-aeris-custom-icon]{rotate:90deg}.aeris-paginator__page-icon--next[data-aeris-custom-icon],.aeris-paginator__page-icon--last[data-aeris-custom-icon]{rotate:-90deg}:host-context([dir=rtl]) .aeris-paginator__page-icon--previous[data-aeris-custom-icon]{rotate:-90deg}:host-context([dir=rtl]) .aeris-paginator__page-icon--first[data-aeris-custom-icon]{rotate:-90deg}:host-context([dir=rtl]) .aeris-paginator__page-icon--next[data-aeris-custom-icon]{rotate:90deg}:host-context([dir=rtl]) .aeris-paginator__page-icon--last[data-aeris-custom-icon]{rotate:90deg}.aeris-paginator__chevron[data-aeris-custom-icon]{transition:rotate var(--aeris-motion-normal, .15s) var(--aeris-ease-standard, ease)}.aeris-paginator__rows-trigger[aria-expanded=true] .aeris-paginator__chevron[data-aeris-custom-icon]{rotate:180deg}@media(prefers-reduced-motion:reduce){.aeris-paginator__chevron[data-aeris-custom-icon]{transition:none}}:host .aeris-paginator__check[data-aeris-custom-icon]{transform:none}.aeris-paginator__check:not([data-aeris-custom-icon]){top:0;width:min(var(--aeris-icon-size, 1rem),100%);height:min(var(--aeris-icon-size, 1rem),100%);border:0;background:currentColor;-webkit-mask:var(--aeris-icon-check) center/100% 100% no-repeat;mask:var(--aeris-icon-check) center/100% 100% no-repeat}\n"]
|
|
458
649
|
}]
|
|
459
650
|
}],
|
|
460
651
|
propDecorators: {
|
|
652
|
+
firstIconTemplate: [{
|
|
653
|
+
type: i0.Input,
|
|
654
|
+
args: [{
|
|
655
|
+
isSignal: true,
|
|
656
|
+
alias: "firstIconTemplate",
|
|
657
|
+
required: false
|
|
658
|
+
}]
|
|
659
|
+
}],
|
|
660
|
+
previousIconTemplate: [{
|
|
661
|
+
type: i0.Input,
|
|
662
|
+
args: [{
|
|
663
|
+
isSignal: true,
|
|
664
|
+
alias: "previousIconTemplate",
|
|
665
|
+
required: false
|
|
666
|
+
}]
|
|
667
|
+
}],
|
|
668
|
+
nextIconTemplate: [{
|
|
669
|
+
type: i0.Input,
|
|
670
|
+
args: [{
|
|
671
|
+
isSignal: true,
|
|
672
|
+
alias: "nextIconTemplate",
|
|
673
|
+
required: false
|
|
674
|
+
}]
|
|
675
|
+
}],
|
|
676
|
+
lastIconTemplate: [{
|
|
677
|
+
type: i0.Input,
|
|
678
|
+
args: [{
|
|
679
|
+
isSignal: true,
|
|
680
|
+
alias: "lastIconTemplate",
|
|
681
|
+
required: false
|
|
682
|
+
}]
|
|
683
|
+
}],
|
|
684
|
+
dropdownIconTemplate: [{
|
|
685
|
+
type: i0.Input,
|
|
686
|
+
args: [{
|
|
687
|
+
isSignal: true,
|
|
688
|
+
alias: "dropdownIconTemplate",
|
|
689
|
+
required: false
|
|
690
|
+
}]
|
|
691
|
+
}],
|
|
692
|
+
checkIconTemplate: [{
|
|
693
|
+
type: i0.Input,
|
|
694
|
+
args: [{
|
|
695
|
+
isSignal: true,
|
|
696
|
+
alias: "checkIconTemplate",
|
|
697
|
+
required: false
|
|
698
|
+
}]
|
|
699
|
+
}],
|
|
461
700
|
first: [{
|
|
462
701
|
type: i0.Input,
|
|
463
702
|
args: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aeris-ui-core-paginator.mjs","names":[],"sources":["../../../projects/aeris-ui/paginator/aeris-paginator.ts"],"sourcesContent":["import {\n Component,\n ElementRef,\n computed,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n ɵAerisAppendTo,\n type AerisAppendTo,\n type AerisOverlayCollisionPadding,\n} from '@aeris-ui/core';\n\nexport interface AerisPaginatorPageEvent {\n readonly first: number;\n readonly rows: number;\n readonly page: number;\n readonly pageCount: number;\n}\n\n@Component({\n selector: 'aeris-paginator',\n imports: [ɵAerisAppendTo],\n template: `\n <nav class=\"aeris-paginator\" [attr.aria-label]=\"ariaLabel()\">\n <span class=\"aeris-paginator__report\" aria-live=\"polite\">{{ pageReport() }}</span>\n\n <div class=\"aeris-paginator__pages\">\n <button\n type=\"button\"\n aria-label=\"First page\"\n [disabled]=\"currentPage() === 0\"\n (click)=\"goToPage(0)\"\n >\n <span\n class=\"aeris-paginator__page-icon aeris-paginator__page-icon--first\"\n aria-hidden=\"true\"\n ></span>\n </button>\n <button\n type=\"button\"\n aria-label=\"Previous page\"\n [disabled]=\"currentPage() === 0\"\n (click)=\"goToPage(currentPage() - 1)\"\n >\n <span\n class=\"aeris-paginator__page-icon aeris-paginator__page-icon--previous\"\n aria-hidden=\"true\"\n ></span>\n </button>\n\n @for (page of visiblePages(); track page) {\n <button\n type=\"button\"\n [attr.aria-label]=\"'Page ' + (page + 1)\"\n [attr.aria-current]=\"page === currentPage() ? 'page' : null\"\n (click)=\"goToPage(page)\"\n >\n {{ page + 1 }}\n </button>\n }\n\n <button\n type=\"button\"\n aria-label=\"Next page\"\n [disabled]=\"currentPage() >= pageCount() - 1\"\n (click)=\"goToPage(currentPage() + 1)\"\n >\n <span\n class=\"aeris-paginator__page-icon aeris-paginator__page-icon--next\"\n aria-hidden=\"true\"\n ></span>\n </button>\n <button\n type=\"button\"\n aria-label=\"Last page\"\n [disabled]=\"currentPage() >= pageCount() - 1\"\n (click)=\"goToPage(pageCount() - 1)\"\n >\n <span\n class=\"aeris-paginator__page-icon aeris-paginator__page-icon--last\"\n aria-hidden=\"true\"\n ></span>\n </button>\n </div>\n\n @if (rowsPerPageOptions().length) {\n <div class=\"aeris-paginator__rows\" (focusout)=\"handleRowsFocusOut($event)\">\n <span [id]=\"rowsLabelId\">{{ rowsPerPageLabel() }}</span>\n <button\n #rowsTrigger\n class=\"aeris-paginator__rows-trigger\"\n type=\"button\"\n aria-haspopup=\"listbox\"\n [attr.aria-labelledby]=\"rowsLabelId + ' ' + rowsValueId\"\n [attr.aria-expanded]=\"rowsPanelOpen()\"\n [attr.aria-controls]=\"rowsListboxId\"\n (click)=\"toggleRowsPanel()\"\n (keydown)=\"handleRowsTriggerKeydown($event)\"\n >\n <span [id]=\"rowsValueId\">{{ rows() }}</span>\n <span class=\"aeris-paginator__chevron\" aria-hidden=\"true\"></span>\n </button>\n\n @if (rowsPanelOpen()) {\n <div\n #rowsPanel\n class=\"aeris-paginator__rows-panel\"\n [aerisInternalAppendTo]=\"appendTo()\"\n [aerisInternalAppendToDismiss]=\"dismissOverlay\"\n [aerisInternalAppendToAnchor]=\"this.rowsTrigger()?.nativeElement ?? null\"\n [aerisInternalAppendToCollisionPadding]=\"viewportMargin()\"\n (aerisInternalAppendToOutside)=\"closeRowsPanel()\"\n [id]=\"rowsListboxId\"\n role=\"listbox\"\n [attr.aria-labelledby]=\"rowsLabelId\"\n (keydown)=\"handleRowsPanelKeydown($event)\"\n >\n @for (option of rowsPerPageOptions(); track option) {\n <button\n type=\"button\"\n role=\"option\"\n [attr.aria-selected]=\"option === rows()\"\n (click)=\"selectRows(option)\"\n >\n <span>{{ option }}</span>\n @if (option === rows()) {\n <span class=\"aeris-paginator__check\" aria-hidden=\"true\"></span>\n }\n </button>\n }\n </div>\n }\n </div>\n }\n </nav>\n `,\n styleUrl: './aeris-paginator.scss',\n})\nexport class AerisPaginator {\n protected readonly dismissOverlay = (): boolean => {\n this.closeRowsPanel();\n return true;\n };\n\n private static nextId = 0;\n readonly first = model(0);\n readonly rows = model(10);\n readonly totalRecords = input(0);\n readonly pageLinkSize = input(5);\n readonly rowsPerPageOptions = input<readonly number[]>([]);\n readonly appendTo = input<AerisAppendTo>();\n readonly viewportMargin = input<number | AerisOverlayCollisionPadding>(8);\n readonly ariaLabel = input('Pagination');\n readonly rowsPerPageLabel = input('Rows per page');\n readonly page = output<AerisPaginatorPageEvent>();\n protected readonly rowsPanelOpen = signal(false);\n protected readonly rowsTrigger = viewChild<ElementRef<HTMLButtonElement>>('rowsTrigger');\n private readonly rowsPanel = viewChild<ElementRef<HTMLElement>>('rowsPanel');\n private readonly rowsPanelPortal = viewChild(ɵAerisAppendTo);\n protected readonly rowsLabelId = `aeris-paginator-rows-label-${AerisPaginator.nextId++}`;\n protected readonly rowsValueId = `${this.rowsLabelId}-value`;\n protected readonly rowsListboxId = `${this.rowsLabelId}-listbox`;\n\n protected readonly pageCount = computed(() =>\n Math.max(1, Math.ceil(this.totalRecords() / Math.max(1, this.rows()))),\n );\n protected readonly currentPage = computed(() =>\n Math.min(\n this.pageCount() - 1,\n Math.max(0, Math.floor(this.first() / Math.max(1, this.rows()))),\n ),\n );\n protected readonly visiblePages = computed(() => {\n const count = this.pageCount();\n const size = Math.max(1, this.pageLinkSize());\n const half = Math.floor(size / 2);\n const start = Math.min(Math.max(0, this.currentPage() - half), Math.max(0, count - size));\n const end = Math.min(count, start + size);\n return Array.from({ length: end - start }, (_, index) => start + index);\n });\n protected readonly pageReport = computed(() => {\n const total = this.totalRecords();\n if (total === 0) return '0 of 0';\n const start = Math.min(this.first() + 1, total);\n const end = Math.min(this.first() + this.rows(), total);\n return `${start}-${end} of ${total}`;\n });\n\n protected goToPage(page: number): void {\n const safePage = Math.min(Math.max(page, 0), this.pageCount() - 1);\n this.first.set(safePage * this.rows());\n this.emitPage();\n }\n\n protected toggleRowsPanel(): void {\n if (this.rowsPanelOpen()) this.closeRowsPanel();\n else this.rowsPanelOpen.set(true);\n }\n\n protected selectRows(rows: number): void {\n this.rows.set(rows);\n this.first.set(0);\n this.closeRowsPanel();\n this.emitPage();\n }\n\n protected handleRowsTriggerKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.closeRowsPanel();\n return;\n }\n\n if (event.key === 'Enter' || event.key === ' ' || event.key === 'ArrowDown') {\n event.preventDefault();\n this.rowsPanelOpen.set(true);\n }\n }\n\n protected handleRowsPanelKeydown(event: KeyboardEvent): void {\n if (event.key !== 'Escape') return;\n event.preventDefault();\n this.closeRowsPanel();\n }\n\n protected handleRowsFocusOut(event: FocusEvent): void {\n const nextTarget = event.relatedTarget;\n if (\n nextTarget instanceof Node &&\n ((event.currentTarget as HTMLElement).contains(nextTarget) ||\n this.rowsPanel()?.nativeElement.contains(nextTarget))\n ) {\n return;\n }\n this.closeRowsPanel();\n }\n\n protected closeRowsPanel(): void {\n this.rowsPanelPortal()?.restore();\n this.rowsPanelOpen.set(false);\n }\n\n private emitPage(): void {\n this.page.emit({\n first: this.first(),\n rows: this.rows(),\n page: this.currentPage(),\n pageCount: this.pageCount(),\n });\n }\n}\n"],"mappings":";;;AA8IA,IAAa,iBAAb,MAAa,eAAc;CACN,uBAA+B;EAChD,KAAK,eAAc;EACnB,OAAO;CACT;CAEQ,OAAO,SAAS;CACf,QAAQ,MAAM,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAChB,OAAO,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAChB,eAAe,MAAM,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CACvB,eAAe,MAAM,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CACvB,qBAAqB,MAAyB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,qBAAA,CAA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;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,kBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,MAAA;EAAA,CAAA;EAAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,eAAa,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CACvB,aAAW,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAC9B,cAAc,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"aeris-ui-core-paginator.mjs","names":[],"sources":["../../../projects/aeris-ui/paginator/aeris-paginator.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ElementRef,\n computed,\n input,\n model,\n output,\n signal,\n viewChild,\n TemplateRef,\n} from '@angular/core';\nimport {\n ɵAerisIcon,\n ɵAerisAppendTo,\n type AerisAppendTo,\n type AerisOverlayCollisionPadding,\n} from '@aeris-ui/core';\n\nexport interface AerisPaginatorPageEvent {\n readonly first: number;\n readonly rows: number;\n readonly page: number;\n readonly pageCount: number;\n}\n\n@Component({\n selector: 'aeris-paginator',\n imports: [ɵAerisIcon, NgTemplateOutlet, ɵAerisAppendTo],\n template: `\n <nav class=\"aeris-paginator\" [attr.aria-label]=\"ariaLabel()\">\n <span class=\"aeris-paginator__report\" aria-live=\"polite\">{{ pageReport() }}</span>\n\n <div class=\"aeris-paginator__pages\">\n <button\n type=\"button\"\n aria-label=\"First page\"\n [disabled]=\"currentPage() === 0\"\n (click)=\"goToPage(0)\"\n >\n @if (firstIconTemplate(); as customIcon) {\n <span\n class=\"aeris-paginator__page-icon aeris-paginator__page-icon--first\"\n aria-hidden=\"true\"\n data-aeris-custom-icon\n ><ng-container [ngTemplateOutlet]=\"customIcon\"\n /></span>\n } @else {\n <span\n aerisInternalIcon=\"chevrons\"\n class=\"aeris-paginator__page-icon aeris-paginator__page-icon--first\"\n aria-hidden=\"true\"\n ></span>\n }\n </button>\n <button\n type=\"button\"\n aria-label=\"Previous page\"\n [disabled]=\"currentPage() === 0\"\n (click)=\"goToPage(currentPage() - 1)\"\n >\n @if (previousIconTemplate(); as customIcon) {\n <span\n class=\"aeris-paginator__page-icon aeris-paginator__page-icon--previous\"\n aria-hidden=\"true\"\n data-aeris-custom-icon\n ><ng-container [ngTemplateOutlet]=\"customIcon\"\n /></span>\n } @else {\n <span\n aerisInternalIcon=\"chevron\"\n class=\"aeris-paginator__page-icon aeris-paginator__page-icon--previous\"\n aria-hidden=\"true\"\n ></span>\n }\n </button>\n\n @for (page of visiblePages(); track page) {\n <button\n type=\"button\"\n [attr.aria-label]=\"'Page ' + (page + 1)\"\n [attr.aria-current]=\"page === currentPage() ? 'page' : null\"\n (click)=\"goToPage(page)\"\n >\n {{ page + 1 }}\n </button>\n }\n\n <button\n type=\"button\"\n aria-label=\"Next page\"\n [disabled]=\"currentPage() >= pageCount() - 1\"\n (click)=\"goToPage(currentPage() + 1)\"\n >\n @if (nextIconTemplate(); as customIcon) {\n <span\n class=\"aeris-paginator__page-icon aeris-paginator__page-icon--next\"\n aria-hidden=\"true\"\n data-aeris-custom-icon\n ><ng-container [ngTemplateOutlet]=\"customIcon\"\n /></span>\n } @else {\n <span\n aerisInternalIcon=\"chevron\"\n class=\"aeris-paginator__page-icon aeris-paginator__page-icon--next\"\n aria-hidden=\"true\"\n ></span>\n }\n </button>\n <button\n type=\"button\"\n aria-label=\"Last page\"\n [disabled]=\"currentPage() >= pageCount() - 1\"\n (click)=\"goToPage(pageCount() - 1)\"\n >\n @if (lastIconTemplate(); as customIcon) {\n <span\n class=\"aeris-paginator__page-icon aeris-paginator__page-icon--last\"\n aria-hidden=\"true\"\n data-aeris-custom-icon\n ><ng-container [ngTemplateOutlet]=\"customIcon\"\n /></span>\n } @else {\n <span\n aerisInternalIcon=\"chevrons\"\n class=\"aeris-paginator__page-icon aeris-paginator__page-icon--last\"\n aria-hidden=\"true\"\n ></span>\n }\n </button>\n </div>\n\n @if (rowsPerPageOptions().length) {\n <div class=\"aeris-paginator__rows\" (focusout)=\"handleRowsFocusOut($event)\">\n <span [id]=\"rowsLabelId\">{{ rowsPerPageLabel() }}</span>\n <button\n #rowsTrigger\n class=\"aeris-paginator__rows-trigger\"\n type=\"button\"\n aria-haspopup=\"listbox\"\n [attr.aria-labelledby]=\"rowsLabelId + ' ' + rowsValueId\"\n [attr.aria-expanded]=\"rowsPanelOpen()\"\n [attr.aria-controls]=\"rowsListboxId\"\n (click)=\"toggleRowsPanel()\"\n (keydown)=\"handleRowsTriggerKeydown($event)\"\n >\n <span [id]=\"rowsValueId\">{{ rows() }}</span>\n @if (dropdownIconTemplate(); as customIcon) {\n <span class=\"aeris-paginator__chevron\" aria-hidden=\"true\" data-aeris-custom-icon\n ><ng-container [ngTemplateOutlet]=\"customIcon\"\n /></span>\n } @else {\n <span\n aerisInternalIcon=\"chevron\"\n class=\"aeris-paginator__chevron\"\n aria-hidden=\"true\"\n ></span>\n }\n </button>\n\n @if (rowsPanelOpen()) {\n <div\n #rowsPanel\n class=\"aeris-paginator__rows-panel\"\n [aerisInternalAppendTo]=\"appendTo()\"\n [aerisInternalAppendToDismiss]=\"dismissOverlay\"\n [aerisInternalAppendToAnchor]=\"this.rowsTrigger()?.nativeElement ?? null\"\n [aerisInternalAppendToCollisionPadding]=\"viewportMargin()\"\n (aerisInternalAppendToOutside)=\"closeRowsPanel()\"\n [id]=\"rowsListboxId\"\n role=\"listbox\"\n [attr.aria-labelledby]=\"rowsLabelId\"\n (keydown)=\"handleRowsPanelKeydown($event)\"\n >\n @for (option of rowsPerPageOptions(); track option) {\n <button\n type=\"button\"\n role=\"option\"\n [attr.aria-selected]=\"option === rows()\"\n (click)=\"selectRows(option)\"\n >\n <span>{{ option }}</span>\n @if (option === rows()) {\n @if (checkIconTemplate(); as customIcon) {\n <span class=\"aeris-paginator__check\" aria-hidden=\"true\" data-aeris-custom-icon\n ><ng-container [ngTemplateOutlet]=\"customIcon\"\n /></span>\n } @else {\n <span\n aerisInternalIcon=\"check\"\n class=\"aeris-paginator__check\"\n aria-hidden=\"true\"\n ></span>\n }\n }\n </button>\n }\n </div>\n }\n </div>\n }\n </nav>\n `,\n styleUrl: './aeris-paginator.scss',\n})\nexport class AerisPaginator {\n readonly firstIconTemplate = input<TemplateRef<void>>();\n readonly previousIconTemplate = input<TemplateRef<void>>();\n readonly nextIconTemplate = input<TemplateRef<void>>();\n readonly lastIconTemplate = input<TemplateRef<void>>();\n readonly dropdownIconTemplate = input<TemplateRef<void>>();\n readonly checkIconTemplate = input<TemplateRef<void>>();\n\n protected readonly dismissOverlay = (): boolean => {\n this.closeRowsPanel();\n return true;\n };\n\n private static nextId = 0;\n readonly first = model(0);\n readonly rows = model(10);\n readonly totalRecords = input(0);\n readonly pageLinkSize = input(5);\n readonly rowsPerPageOptions = input<readonly number[]>([]);\n readonly appendTo = input<AerisAppendTo>();\n readonly viewportMargin = input<number | AerisOverlayCollisionPadding>(8);\n readonly ariaLabel = input('Pagination');\n readonly rowsPerPageLabel = input('Rows per page');\n readonly page = output<AerisPaginatorPageEvent>();\n protected readonly rowsPanelOpen = signal(false);\n protected readonly rowsTrigger = viewChild<ElementRef<HTMLButtonElement>>('rowsTrigger');\n private readonly rowsPanel = viewChild<ElementRef<HTMLElement>>('rowsPanel');\n private readonly rowsPanelPortal = viewChild(ɵAerisAppendTo);\n protected readonly rowsLabelId = `aeris-paginator-rows-label-${AerisPaginator.nextId++}`;\n protected readonly rowsValueId = `${this.rowsLabelId}-value`;\n protected readonly rowsListboxId = `${this.rowsLabelId}-listbox`;\n\n protected readonly pageCount = computed(() =>\n Math.max(1, Math.ceil(this.totalRecords() / Math.max(1, this.rows()))),\n );\n protected readonly currentPage = computed(() =>\n Math.min(\n this.pageCount() - 1,\n Math.max(0, Math.floor(this.first() / Math.max(1, this.rows()))),\n ),\n );\n protected readonly visiblePages = computed(() => {\n const count = this.pageCount();\n const size = Math.max(1, this.pageLinkSize());\n const half = Math.floor(size / 2);\n const start = Math.min(Math.max(0, this.currentPage() - half), Math.max(0, count - size));\n const end = Math.min(count, start + size);\n return Array.from({ length: end - start }, (_, index) => start + index);\n });\n protected readonly pageReport = computed(() => {\n const total = this.totalRecords();\n if (total === 0) return '0 of 0';\n const start = Math.min(this.first() + 1, total);\n const end = Math.min(this.first() + this.rows(), total);\n return `${start}-${end} of ${total}`;\n });\n\n protected goToPage(page: number): void {\n const safePage = Math.min(Math.max(page, 0), this.pageCount() - 1);\n this.first.set(safePage * this.rows());\n this.emitPage();\n }\n\n protected toggleRowsPanel(): void {\n if (this.rowsPanelOpen()) this.closeRowsPanel();\n else this.rowsPanelOpen.set(true);\n }\n\n protected selectRows(rows: number): void {\n this.rows.set(rows);\n this.first.set(0);\n this.closeRowsPanel();\n this.emitPage();\n }\n\n protected handleRowsTriggerKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.closeRowsPanel();\n return;\n }\n\n if (event.key === 'Enter' || event.key === ' ' || event.key === 'ArrowDown') {\n event.preventDefault();\n this.rowsPanelOpen.set(true);\n }\n }\n\n protected handleRowsPanelKeydown(event: KeyboardEvent): void {\n if (event.key !== 'Escape') return;\n event.preventDefault();\n this.closeRowsPanel();\n }\n\n protected handleRowsFocusOut(event: FocusEvent): void {\n const nextTarget = event.relatedTarget;\n if (\n nextTarget instanceof Node &&\n ((event.currentTarget as HTMLElement).contains(nextTarget) ||\n this.rowsPanel()?.nativeElement.contains(nextTarget))\n ) {\n return;\n }\n this.closeRowsPanel();\n }\n\n protected closeRowsPanel(): void {\n this.rowsPanelPortal()?.restore();\n this.rowsPanelOpen.set(false);\n }\n\n private emitPage(): void {\n this.page.emit({\n first: this.first(),\n rows: this.rows(),\n page: this.currentPage(),\n pageCount: this.pageCount(),\n });\n }\n}\n"],"mappings":";;;;AA6MA,IAAa,iBAAb,MAAa,eAAc;CAChB,oBAAoB,MAA0B,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,oBAAA,CAAA,+BAAA,CAAA,CAAA;CAC9C,uBAAuB,MAA0B,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,uBAAA,CAAA,+BAAA,CAAA,CAAA;CACjD,mBAAmB,MAA0B,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,mBAAA,CAAA,+BAAA,CAAA,CAAA;CAC7C,mBAAmB,MAA0B,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,mBAAA,CAAA,+BAAA,CAAA,CAAA;CAC7C,uBAAuB,MAA0B,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,uBAAA,CAAA,+BAAA,CAAA,CAAA;CACjD,oBAAoB,MAA0B,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,oBAAA,CAAA,+BAAA,CAAA,CAAA;CAEpC,uBAA+B;EAChD,KAAK,eAAc;EACnB,OAAO;CACT;CAEQ,OAAO,SAAS;CACf,QAAQ,MAAM,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAChB,OAAO,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAChB,eAAe,MAAM,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CACvB,eAAe,MAAM,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CACvB,qBAAqB,MAAyB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,qBAAA,CAAA,+BAAA,CAAA,CAAA;CACjD,WAAW,MAAsB,GAAA,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