@edsis/angular 22.1.3 → 22.2.8
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/LICENSE +21 -0
- package/README.md +87 -399
- package/SECURITY.md +18 -0
- package/SUPPORT.md +15 -0
- package/chart/README.md +272 -0
- package/component/README.md +89 -0
- package/component/accordion/README.md +195 -0
- package/component/alert/README.md +184 -0
- package/component/alert-dialog/README.md +255 -0
- package/component/aspect-ratio/README.md +116 -0
- package/component/avatar/README.md +182 -0
- package/component/badge/README.md +143 -0
- package/component/breadcrumb/README.md +223 -0
- package/component/button/README.md +141 -0
- package/component/button-group/README.md +214 -0
- package/component/calendar/README.md +125 -0
- package/component/card/README.md +232 -0
- package/component/carousel/README.md +276 -0
- package/component/checkbox/README.md +153 -0
- package/component/collapsible/README.md +216 -0
- package/component/combobox/README.md +202 -0
- package/component/command/README.md +287 -0
- package/component/composer/README.md +241 -0
- package/component/context-menu/README.md +268 -0
- package/component/date-picker/README.md +202 -0
- package/component/dialog/README.md +276 -0
- package/component/drawer/README.md +146 -0
- package/component/dropdown-menu/README.md +336 -0
- package/component/editor/README.md +152 -0
- package/component/empty/README.md +193 -0
- package/component/form/README.md +216 -0
- package/component/hover-card/README.md +150 -0
- package/component/icon/README.md +52 -0
- package/component/input/README.md +160 -0
- package/component/input-group/README.md +245 -0
- package/component/input-otp/README.md +331 -0
- package/component/item/README.md +254 -0
- package/component/kanban/README.md +81 -0
- package/component/kbd/README.md +141 -0
- package/component/label/README.md +137 -0
- package/component/menubar/README.md +270 -0
- package/component/native-select/README.md +176 -0
- package/component/navigation-menu/README.md +165 -0
- package/component/pagination/README.md +151 -0
- package/component/pillbox/README.md +68 -0
- package/component/popover/README.md +54 -0
- package/component/progress/README.md +160 -0
- package/component/radio/README.md +212 -0
- package/component/resizable/README.md +178 -0
- package/component/scroll-area/README.md +150 -0
- package/component/select/README.md +228 -0
- package/component/separator/README.md +175 -0
- package/component/sheet/README.md +190 -0
- package/component/skeleton/README.md +158 -0
- package/component/slider/README.md +207 -0
- package/component/spinner/README.md +160 -0
- package/component/switch/README.md +170 -0
- package/component/table/README.md +292 -0
- package/component/tabs/README.md +220 -0
- package/component/textarea/README.md +169 -0
- package/component/timeline/README.md +94 -0
- package/component/toast/README.md +173 -0
- package/component/toggle/README.md +133 -0
- package/component/toggle-group/README.md +234 -0
- package/component/tooltip/README.md +230 -0
- package/fesm2022/edsis-angular-chart-area.mjs +508 -0
- package/fesm2022/edsis-angular-chart-bar.mjs +946 -0
- package/fesm2022/edsis-angular-chart-core.mjs +1282 -0
- package/fesm2022/edsis-angular-chart-line.mjs +544 -0
- package/fesm2022/edsis-angular-chart-pie.mjs +524 -0
- package/fesm2022/edsis-angular-chart-primitives.mjs +1647 -0
- package/fesm2022/edsis-angular-chart-radar.mjs +693 -0
- package/fesm2022/edsis-angular-chart-radial.mjs +542 -0
- package/fesm2022/edsis-angular-chart-scatter.mjs +486 -0
- package/fesm2022/edsis-angular-chart.mjs +3 -0
- package/fesm2022/edsis-angular-component-accordion.mjs +513 -0
- package/fesm2022/edsis-angular-component-alert-dialog.mjs +1001 -0
- package/fesm2022/edsis-angular-component-alert.mjs +268 -0
- package/fesm2022/edsis-angular-component-aspect-ratio.mjs +80 -0
- package/fesm2022/edsis-angular-component-avatar.mjs +410 -0
- package/fesm2022/edsis-angular-component-badge.mjs +111 -0
- package/fesm2022/edsis-angular-component-breadcrumb.mjs +464 -0
- package/fesm2022/edsis-angular-component-button-group.mjs +252 -0
- package/fesm2022/edsis-angular-component-button.mjs +155 -0
- package/fesm2022/edsis-angular-component-calendar.mjs +835 -0
- package/fesm2022/edsis-angular-component-card.mjs +460 -0
- package/fesm2022/edsis-angular-component-carousel.mjs +700 -0
- package/fesm2022/edsis-angular-component-checkbox.mjs +398 -0
- package/fesm2022/edsis-angular-component-collapsible.mjs +305 -0
- package/fesm2022/edsis-angular-component-combobox.mjs +544 -0
- package/fesm2022/edsis-angular-component-command.mjs +815 -0
- package/fesm2022/edsis-angular-component-composer.mjs +840 -0
- package/fesm2022/edsis-angular-component-context-menu.mjs +197 -0
- package/fesm2022/edsis-angular-component-date-picker.mjs +798 -0
- package/fesm2022/edsis-angular-component-dialog.mjs +798 -0
- package/fesm2022/edsis-angular-component-drawer.mjs +2 -0
- package/fesm2022/edsis-angular-component-dropdown-menu.mjs +1259 -0
- package/fesm2022/edsis-angular-component-editor.mjs +1000 -0
- package/fesm2022/edsis-angular-component-empty.mjs +351 -0
- package/fesm2022/edsis-angular-component-form.mjs +821 -0
- package/fesm2022/edsis-angular-component-hover-card.mjs +486 -0
- package/fesm2022/edsis-angular-component-icon.mjs +253 -0
- package/fesm2022/edsis-angular-component-input-group.mjs +453 -0
- package/fesm2022/edsis-angular-component-input-otp.mjs +957 -0
- package/fesm2022/edsis-angular-component-input.mjs +87 -0
- package/fesm2022/edsis-angular-component-item.mjs +720 -0
- package/fesm2022/edsis-angular-component-kanban.mjs +812 -0
- package/fesm2022/edsis-angular-component-kbd.mjs +124 -0
- package/fesm2022/edsis-angular-component-label.mjs +82 -0
- package/fesm2022/edsis-angular-component-menubar.mjs +481 -0
- package/fesm2022/edsis-angular-component-native-select.mjs +168 -0
- package/fesm2022/edsis-angular-component-navigation-menu.mjs +685 -0
- package/fesm2022/edsis-angular-component-pagination.mjs +425 -0
- package/fesm2022/edsis-angular-component-pillbox.mjs +1679 -0
- package/fesm2022/edsis-angular-component-popover.mjs +292 -0
- package/fesm2022/edsis-angular-component-progress.mjs +184 -0
- package/fesm2022/edsis-angular-component-radio.mjs +491 -0
- package/fesm2022/edsis-angular-component-resizable.mjs +703 -0
- package/fesm2022/edsis-angular-component-scroll-area.mjs +133 -0
- package/fesm2022/edsis-angular-component-segmented-control.mjs +408 -0
- package/fesm2022/edsis-angular-component-select.mjs +743 -0
- package/fesm2022/edsis-angular-component-separator.mjs +102 -0
- package/fesm2022/edsis-angular-component-sheet.mjs +874 -0
- package/fesm2022/edsis-angular-component-skeleton.mjs +62 -0
- package/fesm2022/edsis-angular-component-slider.mjs +676 -0
- package/fesm2022/edsis-angular-component-spinner.mjs +157 -0
- package/fesm2022/edsis-angular-component-switch.mjs +361 -0
- package/fesm2022/edsis-angular-component-table.mjs +446 -0
- package/fesm2022/edsis-angular-component-tabs.mjs +592 -0
- package/fesm2022/edsis-angular-component-textarea.mjs +85 -0
- package/fesm2022/edsis-angular-component-timeline.mjs +619 -0
- package/fesm2022/edsis-angular-component-toast.mjs +231 -0
- package/fesm2022/edsis-angular-component-toggle-group.mjs +579 -0
- package/fesm2022/edsis-angular-component-toggle.mjs +189 -0
- package/fesm2022/edsis-angular-component-tooltip.mjs +804 -0
- package/fesm2022/edsis-angular-component-utils-core.mjs +181 -0
- package/fesm2022/edsis-angular-component-utils-overlay.mjs +54 -0
- package/fesm2022/edsis-angular-component-utils-scale.mjs +76 -0
- package/fesm2022/edsis-angular-component-utils.mjs +2 -0
- package/fesm2022/edsis-angular-component.mjs +0 -0
- package/fesm2022/edsis-angular-navigation-core.mjs +15 -0
- package/fesm2022/edsis-angular-navigation-icon.mjs +35 -0
- package/fesm2022/edsis-angular-navigation-navigation-badge-count.component-BWWWaUgy.mjs +234 -0
- package/fesm2022/edsis-angular-navigation-navigation-dockbar-menu.component-Bx2bxTID.mjs +834 -0
- package/fesm2022/edsis-angular-navigation-navigation-entry-grid.component-Duzt1ffz.mjs +823 -0
- package/fesm2022/edsis-angular-navigation-navigation-flyout-menu.component-cJ8Q1vM6.mjs +670 -0
- package/fesm2022/edsis-angular-navigation-navigation-horizontal.component-CDQ1wt2_.mjs +689 -0
- package/fesm2022/edsis-angular-navigation-navigation-item.component-C1VzerJp.mjs +1522 -0
- package/fesm2022/edsis-angular-navigation-navigation-list.component-BPYLfrID.mjs +346 -0
- package/fesm2022/edsis-angular-navigation-service.mjs +558 -0
- package/fesm2022/edsis-angular-navigation-types.mjs +151 -0
- package/fesm2022/edsis-angular-navigation.mjs +3338 -0
- package/fesm2022/edsis-angular-sdk.mjs +100 -0
- package/fesm2022/edsis-angular-theme-component-settings.mjs +1877 -0
- package/fesm2022/edsis-angular-theme-layout-services.mjs +252 -0
- package/fesm2022/edsis-angular-theme-layout-types.mjs +45 -0
- package/fesm2022/edsis-angular-theme-layout-wrapper.mjs +2568 -0
- package/fesm2022/edsis-angular-theme-layout.mjs +1089 -0
- package/fesm2022/edsis-angular-theme-page-core.mjs +315 -0
- package/fesm2022/edsis-angular-theme-page-filter.mjs +409 -0
- package/fesm2022/edsis-angular-theme-page-overview.mjs +88 -0
- package/fesm2022/edsis-angular-theme-page-root.mjs +693 -0
- package/fesm2022/edsis-angular-theme-page-side.mjs +342 -0
- package/fesm2022/edsis-angular-theme-page-slots.mjs +258 -0
- package/fesm2022/edsis-angular-theme-page.mjs +7 -0
- package/fesm2022/edsis-angular-theme-shell-services.mjs +231 -0
- package/fesm2022/edsis-angular-theme-shell-types.mjs +102 -0
- package/fesm2022/edsis-angular-theme-shell.mjs +1352 -0
- package/fesm2022/edsis-angular-theme-styles.mjs +572 -0
- package/fesm2022/edsis-angular-theme.mjs +0 -0
- package/fesm2022/edsis-angular.mjs +5 -8
- package/navigation/README.md +576 -0
- package/package.json +477 -52
- package/sdk/README.md +212 -0
- package/sdk/schematics/collection.json +20 -0
- package/sdk/schematics/init/index.js +83 -0
- package/sdk/schematics/init/schema.json +19 -0
- package/sdk/schematics/ng-add/index.js +147 -0
- package/sdk/schematics/ng-add/schema.json +14 -0
- package/sdk/schematics/package.json +3 -0
- package/sdk/schematics/sdk/index.js +175 -0
- package/sdk/schematics/sdk/schema.json +19 -0
- package/sdk/sdk.config.example.json +24 -0
- package/sdk/src/config/loader.js +43 -0
- package/sdk/src/config/schema.js +59 -0
- package/sdk/src/emit/client.js +251 -0
- package/sdk/src/emit/metadata.js +310 -0
- package/sdk/src/emit/models.js +104 -0
- package/sdk/src/emit/navigation.js +56 -0
- package/sdk/src/emit/operations.js +118 -0
- package/sdk/src/emit/public-api.js +54 -0
- package/sdk/src/emit/services.js +110 -0
- package/sdk/src/engine.js +67 -0
- package/sdk/src/layout/per-domain.js +360 -0
- package/sdk/src/package.json +3 -0
- package/sdk/src/parser/bundle.js +25 -0
- package/sdk/src/parser/ir.js +429 -0
- package/sdk/src/parser/types.js +7 -0
- package/sdk/src/render/template.js +152 -0
- package/sdk/src/writer/index.js +286 -0
- package/theme/README.md +120 -0
- package/theme/component/settings/README.md +154 -0
- package/theme/layout/README.md +604 -0
- package/theme/page/README.md +505 -0
- package/theme/shell/README.md +344 -0
- package/theme/styles/README.md +202 -0
- package/theme/styles/css/base/components.css +577 -0
- package/theme/styles/css/base/index.css +14 -0
- package/theme/styles/css/base/package.css +9 -0
- package/theme/styles/css/base/prefers-dark.css +86 -0
- package/theme/styles/css/base/print.css +62 -0
- package/theme/styles/css/base/status.css +38 -0
- package/theme/styles/css/base/tailwind.css +208 -0
- package/theme/styles/css/base/theme.css +353 -0
- package/theme/styles/css/base/tokens.css +388 -0
- package/theme/styles/css/color/amber.css +72 -0
- package/theme/styles/css/color/blue.css +72 -0
- package/theme/styles/css/color/brand.css +38 -0
- package/theme/styles/css/color/cyan.css +72 -0
- package/theme/styles/css/color/emerald.css +72 -0
- package/theme/styles/css/color/fuchsia.css +72 -0
- package/theme/styles/css/color/green.css +72 -0
- package/theme/styles/css/color/index.css +19 -0
- package/theme/styles/css/color/indigo.css +72 -0
- package/theme/styles/css/color/lime.css +72 -0
- package/theme/styles/css/color/orange.css +72 -0
- package/theme/styles/css/color/pink.css +72 -0
- package/theme/styles/css/color/purple.css +72 -0
- package/theme/styles/css/color/red.css +72 -0
- package/theme/styles/css/color/rose.css +72 -0
- package/theme/styles/css/color/sky.css +72 -0
- package/theme/styles/css/color/teal.css +72 -0
- package/theme/styles/css/color/violet.css +72 -0
- package/theme/styles/css/color/yellow.css +72 -0
- package/theme/styles/css/fonts.css +85 -0
- package/theme/styles/css/index.css +18 -0
- package/theme/styles/css/neutral/gray.css +63 -0
- package/theme/styles/css/neutral/index.css +11 -0
- package/theme/styles/css/neutral/mauve.css +63 -0
- package/theme/styles/css/neutral/mist.css +63 -0
- package/theme/styles/css/neutral/neutral.css +63 -0
- package/theme/styles/css/neutral/olive.css +63 -0
- package/theme/styles/css/neutral/slate.css +63 -0
- package/theme/styles/css/neutral/stone.css +63 -0
- package/theme/styles/css/neutral/taupe.css +63 -0
- package/theme/styles/css/neutral/zinc.css +63 -0
- package/theme/styles/css/radius/index.css +30 -0
- package/theme/styles/css/space/index.css +20 -0
- package/types/edsis-angular-chart-area.d.ts +139 -0
- package/types/edsis-angular-chart-bar.d.ts +291 -0
- package/types/edsis-angular-chart-core.d.ts +822 -0
- package/types/edsis-angular-chart-line.d.ts +148 -0
- package/types/edsis-angular-chart-pie.d.ts +202 -0
- package/types/edsis-angular-chart-primitives.d.ts +360 -0
- package/types/edsis-angular-chart-radar.d.ts +198 -0
- package/types/edsis-angular-chart-radial.d.ts +187 -0
- package/types/edsis-angular-chart-scatter.d.ts +181 -0
- package/types/edsis-angular-chart.d.ts +3 -0
- package/types/edsis-angular-component-accordion.d.ts +139 -0
- package/types/edsis-angular-component-alert-dialog.d.ts +288 -0
- package/types/edsis-angular-component-alert.d.ts +72 -0
- package/types/edsis-angular-component-aspect-ratio.d.ts +20 -0
- package/types/edsis-angular-component-avatar.d.ts +111 -0
- package/types/edsis-angular-component-badge.d.ts +36 -0
- package/types/edsis-angular-component-breadcrumb.d.ts +85 -0
- package/types/edsis-angular-component-button-group.d.ts +50 -0
- package/types/edsis-angular-component-button.d.ts +44 -0
- package/types/edsis-angular-component-calendar.d.ts +150 -0
- package/types/edsis-angular-component-card.d.ts +123 -0
- package/types/edsis-angular-component-carousel.d.ts +155 -0
- package/types/edsis-angular-component-checkbox.d.ts +100 -0
- package/types/edsis-angular-component-collapsible.d.ts +68 -0
- package/types/edsis-angular-component-combobox.d.ts +105 -0
- package/types/edsis-angular-component-command.d.ts +215 -0
- package/types/edsis-angular-component-composer.d.ts +190 -0
- package/types/edsis-angular-component-context-menu.d.ts +64 -0
- package/types/edsis-angular-component-date-picker.d.ts +199 -0
- package/types/edsis-angular-component-dialog.d.ts +231 -0
- package/types/edsis-angular-component-drawer.d.ts +2 -0
- package/types/edsis-angular-component-dropdown-menu.d.ts +370 -0
- package/types/edsis-angular-component-editor.d.ts +234 -0
- package/types/edsis-angular-component-empty.d.ts +85 -0
- package/types/edsis-angular-component-form.d.ts +223 -0
- package/types/edsis-angular-component-hover-card.d.ts +133 -0
- package/types/edsis-angular-component-icon.d.ts +90 -0
- package/types/edsis-angular-component-input-group.d.ts +98 -0
- package/types/edsis-angular-component-input-otp.d.ts +249 -0
- package/types/edsis-angular-component-input.d.ts +31 -0
- package/types/edsis-angular-component-item.d.ts +169 -0
- package/types/edsis-angular-component-kanban.d.ts +165 -0
- package/types/edsis-angular-component-kbd.d.ts +25 -0
- package/types/edsis-angular-component-label.d.ts +19 -0
- package/types/edsis-angular-component-menubar.d.ts +123 -0
- package/types/edsis-angular-component-native-select.d.ts +39 -0
- package/types/edsis-angular-component-navigation-menu.d.ts +163 -0
- package/types/edsis-angular-component-pagination.d.ts +83 -0
- package/types/edsis-angular-component-pillbox.d.ts +380 -0
- package/types/edsis-angular-component-popover.d.ts +96 -0
- package/types/edsis-angular-component-progress.d.ts +45 -0
- package/types/edsis-angular-component-radio.d.ts +137 -0
- package/types/edsis-angular-component-resizable.d.ts +166 -0
- package/types/edsis-angular-component-scroll-area.d.ts +37 -0
- package/types/edsis-angular-component-segmented-control.d.ts +102 -0
- package/types/edsis-angular-component-select.d.ts +138 -0
- package/types/edsis-angular-component-separator.d.ts +26 -0
- package/types/edsis-angular-component-sheet.d.ts +240 -0
- package/types/edsis-angular-component-skeleton.d.ts +13 -0
- package/types/edsis-angular-component-slider.d.ts +148 -0
- package/types/edsis-angular-component-spinner.d.ts +31 -0
- package/types/edsis-angular-component-switch.d.ts +101 -0
- package/types/edsis-angular-component-table.d.ts +109 -0
- package/types/edsis-angular-component-tabs.d.ts +183 -0
- package/types/edsis-angular-component-textarea.d.ts +27 -0
- package/types/edsis-angular-component-timeline.d.ts +146 -0
- package/types/edsis-angular-component-toast.d.ts +60 -0
- package/types/edsis-angular-component-toggle-group.d.ts +161 -0
- package/types/edsis-angular-component-toggle.d.ts +47 -0
- package/types/edsis-angular-component-tooltip.d.ts +233 -0
- package/types/edsis-angular-component-utils-core.d.ts +175 -0
- package/types/edsis-angular-component-utils-overlay.d.ts +17 -0
- package/types/edsis-angular-component-utils-scale.d.ts +27 -0
- package/types/edsis-angular-component-utils.d.ts +2 -0
- package/types/edsis-angular-component.d.ts +1 -0
- package/types/edsis-angular-navigation-core.d.ts +55 -0
- package/types/edsis-angular-navigation-icon.d.ts +9 -0
- package/types/edsis-angular-navigation-service.d.ts +121 -0
- package/types/edsis-angular-navigation-types.d.ts +185 -0
- package/types/edsis-angular-navigation.d.ts +862 -0
- package/types/edsis-angular-sdk.d.ts +87 -0
- package/types/edsis-angular-theme-component-settings.d.ts +205 -0
- package/types/edsis-angular-theme-layout-services.d.ts +143 -0
- package/types/edsis-angular-theme-layout-types.d.ts +36 -0
- package/types/edsis-angular-theme-layout-wrapper.d.ts +670 -0
- package/types/edsis-angular-theme-layout.d.ts +218 -0
- package/types/edsis-angular-theme-page-core.d.ts +151 -0
- package/types/edsis-angular-theme-page-filter.d.ts +127 -0
- package/types/edsis-angular-theme-page-overview.d.ts +28 -0
- package/types/edsis-angular-theme-page-root.d.ts +172 -0
- package/types/edsis-angular-theme-page-side.d.ts +90 -0
- package/types/edsis-angular-theme-page-slots.d.ts +61 -0
- package/types/edsis-angular-theme-page.d.ts +7 -0
- package/types/edsis-angular-theme-shell-services.d.ts +188 -0
- package/types/edsis-angular-theme-shell-types.d.ts +102 -0
- package/types/edsis-angular-theme-shell.d.ts +178 -0
- package/types/edsis-angular-theme-styles.d.ts +295 -0
- package/types/edsis-angular-theme.d.ts +1 -0
- package/types/edsis-angular.d.ts +5 -2
- package/fesm2022/edsis-angular-block-shell.mjs +0 -1329
- package/fesm2022/edsis-angular-block-shell.mjs.map +0 -1
- package/fesm2022/edsis-angular-block-themes.mjs +0 -1007
- package/fesm2022/edsis-angular-block-themes.mjs.map +0 -1
- package/fesm2022/edsis-angular-module-auth.mjs +0 -2582
- package/fesm2022/edsis-angular-module-auth.mjs.map +0 -1
- package/fesm2022/edsis-angular-platform-mfe.mjs +0 -329
- package/fesm2022/edsis-angular-platform-mfe.mjs.map +0 -1
- package/fesm2022/edsis-angular-services-runtime.mjs +0 -385
- package/fesm2022/edsis-angular-services-runtime.mjs.map +0 -1
- package/fesm2022/edsis-angular.mjs.map +0 -1
- package/types/edsis-angular-block-shell.d.ts +0 -190
- package/types/edsis-angular-block-themes.d.ts +0 -94
- package/types/edsis-angular-module-auth.d.ts +0 -533
- package/types/edsis-angular-platform-mfe.d.ts +0 -126
- package/types/edsis-angular-services-runtime.d.ts +0 -118
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
import { buttonVariants } from "@edsis/angular/component/button";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { Component, computed, input, model } from "@angular/core";
|
|
4
|
+
import { cn } from "@edsis/angular/component/utils/core";
|
|
5
|
+
var PaginationComponent = class PaginationComponent {
|
|
6
|
+
page = model(1, ...ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []);
|
|
7
|
+
total = input(1, ...ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []);
|
|
8
|
+
siblingCount = input(1, ...ngDevMode ? [{ debugName: "siblingCount" }] : /* istanbul ignore next */ []);
|
|
9
|
+
showPageNumbers = input(true, ...ngDevMode ? [{ debugName: "showPageNumbers" }] : /* istanbul ignore next */ []);
|
|
10
|
+
previousText = input("Previous", ...ngDevMode ? [{ debugName: "previousText" }] : /* istanbul ignore next */ []);
|
|
11
|
+
nextText = input("Next", ...ngDevMode ? [{ debugName: "nextText" }] : /* istanbul ignore next */ []);
|
|
12
|
+
previousAriaLabel = input("Go to previous page", ...ngDevMode ? [{ debugName: "previousAriaLabel" }] : /* istanbul ignore next */ []);
|
|
13
|
+
nextAriaLabel = input("Go to next page", ...ngDevMode ? [{ debugName: "nextAriaLabel" }] : /* istanbul ignore next */ []);
|
|
14
|
+
formatPageLabel = input((page) => page.toString(), ...ngDevMode ? [{ debugName: "formatPageLabel" }] : /* istanbul ignore next */ []);
|
|
15
|
+
class = input("", ...ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []);
|
|
16
|
+
classes = computed(() => cn("mx-auto flex w-full justify-center", this.class()), ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
|
|
17
|
+
pages = computed(() => {
|
|
18
|
+
if (!this.showPageNumbers()) return [];
|
|
19
|
+
const total = Math.max(1, this.total());
|
|
20
|
+
const current = Math.min(Math.max(1, this.page()), total);
|
|
21
|
+
const siblings = Math.max(0, this.siblingCount());
|
|
22
|
+
const range = [];
|
|
23
|
+
const start = Math.max(2, current - siblings);
|
|
24
|
+
const end = Math.min(total - 1, current + siblings);
|
|
25
|
+
range.push({
|
|
26
|
+
key: "p-1",
|
|
27
|
+
kind: "page",
|
|
28
|
+
value: 1
|
|
29
|
+
});
|
|
30
|
+
if (start > 2) range.push({
|
|
31
|
+
key: "e-start",
|
|
32
|
+
kind: "ellipsis",
|
|
33
|
+
value: -1
|
|
34
|
+
});
|
|
35
|
+
for (let i = start; i <= end; i++) range.push({
|
|
36
|
+
key: `p-${i}`,
|
|
37
|
+
kind: "page",
|
|
38
|
+
value: i
|
|
39
|
+
});
|
|
40
|
+
if (end < total - 1) range.push({
|
|
41
|
+
key: "e-end",
|
|
42
|
+
kind: "ellipsis",
|
|
43
|
+
value: -1
|
|
44
|
+
});
|
|
45
|
+
if (total > 1) range.push({
|
|
46
|
+
key: `p-${total}`,
|
|
47
|
+
kind: "page",
|
|
48
|
+
value: total
|
|
49
|
+
});
|
|
50
|
+
return range;
|
|
51
|
+
}, ...ngDevMode ? [{ debugName: "pages" }] : /* istanbul ignore next */ []);
|
|
52
|
+
navClasses(hasText) {
|
|
53
|
+
return hasText ? cn(buttonVariants({
|
|
54
|
+
variant: "ghost",
|
|
55
|
+
size: "default"
|
|
56
|
+
}), "gap-1 pl-2.5 pr-2.5") : cn(buttonVariants({
|
|
57
|
+
variant: "ghost",
|
|
58
|
+
size: "icon"
|
|
59
|
+
}), "h-control-md w-control-md");
|
|
60
|
+
}
|
|
61
|
+
pageClasses(active) {
|
|
62
|
+
return cn(buttonVariants({
|
|
63
|
+
variant: active ? "outline" : "ghost",
|
|
64
|
+
size: "icon"
|
|
65
|
+
}), "h-control-md w-control-md");
|
|
66
|
+
}
|
|
67
|
+
go(target) {
|
|
68
|
+
const total = Math.max(1, this.total());
|
|
69
|
+
const next = Math.min(Math.max(1, target), total);
|
|
70
|
+
if (next === this.page()) return;
|
|
71
|
+
this.page.set(next);
|
|
72
|
+
}
|
|
73
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
74
|
+
minVersion: "12.0.0",
|
|
75
|
+
version: "22.2.3",
|
|
76
|
+
ngImport: i0,
|
|
77
|
+
type: PaginationComponent,
|
|
78
|
+
deps: [],
|
|
79
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
80
|
+
});
|
|
81
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
82
|
+
minVersion: "17.0.0",
|
|
83
|
+
version: "22.2.3",
|
|
84
|
+
type: PaginationComponent,
|
|
85
|
+
isStandalone: true,
|
|
86
|
+
selector: "Pagination, nav[Pagination]",
|
|
87
|
+
inputs: {
|
|
88
|
+
page: {
|
|
89
|
+
classPropertyName: "page",
|
|
90
|
+
publicName: "page",
|
|
91
|
+
isSignal: true,
|
|
92
|
+
isRequired: false,
|
|
93
|
+
transformFunction: null
|
|
94
|
+
},
|
|
95
|
+
total: {
|
|
96
|
+
classPropertyName: "total",
|
|
97
|
+
publicName: "total",
|
|
98
|
+
isSignal: true,
|
|
99
|
+
isRequired: false,
|
|
100
|
+
transformFunction: null
|
|
101
|
+
},
|
|
102
|
+
siblingCount: {
|
|
103
|
+
classPropertyName: "siblingCount",
|
|
104
|
+
publicName: "siblingCount",
|
|
105
|
+
isSignal: true,
|
|
106
|
+
isRequired: false,
|
|
107
|
+
transformFunction: null
|
|
108
|
+
},
|
|
109
|
+
showPageNumbers: {
|
|
110
|
+
classPropertyName: "showPageNumbers",
|
|
111
|
+
publicName: "showPageNumbers",
|
|
112
|
+
isSignal: true,
|
|
113
|
+
isRequired: false,
|
|
114
|
+
transformFunction: null
|
|
115
|
+
},
|
|
116
|
+
previousText: {
|
|
117
|
+
classPropertyName: "previousText",
|
|
118
|
+
publicName: "previousText",
|
|
119
|
+
isSignal: true,
|
|
120
|
+
isRequired: false,
|
|
121
|
+
transformFunction: null
|
|
122
|
+
},
|
|
123
|
+
nextText: {
|
|
124
|
+
classPropertyName: "nextText",
|
|
125
|
+
publicName: "nextText",
|
|
126
|
+
isSignal: true,
|
|
127
|
+
isRequired: false,
|
|
128
|
+
transformFunction: null
|
|
129
|
+
},
|
|
130
|
+
previousAriaLabel: {
|
|
131
|
+
classPropertyName: "previousAriaLabel",
|
|
132
|
+
publicName: "previousAriaLabel",
|
|
133
|
+
isSignal: true,
|
|
134
|
+
isRequired: false,
|
|
135
|
+
transformFunction: null
|
|
136
|
+
},
|
|
137
|
+
nextAriaLabel: {
|
|
138
|
+
classPropertyName: "nextAriaLabel",
|
|
139
|
+
publicName: "nextAriaLabel",
|
|
140
|
+
isSignal: true,
|
|
141
|
+
isRequired: false,
|
|
142
|
+
transformFunction: null
|
|
143
|
+
},
|
|
144
|
+
formatPageLabel: {
|
|
145
|
+
classPropertyName: "formatPageLabel",
|
|
146
|
+
publicName: "formatPageLabel",
|
|
147
|
+
isSignal: true,
|
|
148
|
+
isRequired: false,
|
|
149
|
+
transformFunction: null
|
|
150
|
+
},
|
|
151
|
+
class: {
|
|
152
|
+
classPropertyName: "class",
|
|
153
|
+
publicName: "class",
|
|
154
|
+
isSignal: true,
|
|
155
|
+
isRequired: false,
|
|
156
|
+
transformFunction: null
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
outputs: { page: "pageChange" },
|
|
160
|
+
host: {
|
|
161
|
+
attributes: {
|
|
162
|
+
"role": "navigation",
|
|
163
|
+
"aria-label": "pagination"
|
|
164
|
+
},
|
|
165
|
+
properties: { "class": "classes()" }
|
|
166
|
+
},
|
|
167
|
+
ngImport: i0,
|
|
168
|
+
template: `
|
|
169
|
+
<ul class="flex flex-row items-center gap-1">
|
|
170
|
+
<li>
|
|
171
|
+
<button
|
|
172
|
+
type="button"
|
|
173
|
+
[disabled]="page() <= 1 || null"
|
|
174
|
+
[attr.aria-label]="previousAriaLabel()"
|
|
175
|
+
[class]="navClasses(previousText().length > 0)"
|
|
176
|
+
(click)="go(page() - 1)"
|
|
177
|
+
>
|
|
178
|
+
<svg
|
|
179
|
+
aria-hidden="true"
|
|
180
|
+
class="h-4 w-4"
|
|
181
|
+
viewBox="0 0 24 24"
|
|
182
|
+
fill="none"
|
|
183
|
+
stroke="currentColor"
|
|
184
|
+
stroke-width="2"
|
|
185
|
+
stroke-linecap="round"
|
|
186
|
+
stroke-linejoin="round"
|
|
187
|
+
>
|
|
188
|
+
<polyline points="15 18 9 12 15 6" />
|
|
189
|
+
</svg>
|
|
190
|
+
@if (previousText()) {
|
|
191
|
+
<span>{{ previousText() }}</span>
|
|
192
|
+
}
|
|
193
|
+
</button>
|
|
194
|
+
</li>
|
|
195
|
+
|
|
196
|
+
@for (p of pages(); track p.key) {
|
|
197
|
+
<li>
|
|
198
|
+
@if (p.kind === 'page') {
|
|
199
|
+
<button
|
|
200
|
+
type="button"
|
|
201
|
+
[attr.aria-current]="p.value === page() ? 'page' : null"
|
|
202
|
+
[class]="pageClasses(p.value === page())"
|
|
203
|
+
(click)="go(p.value)"
|
|
204
|
+
>
|
|
205
|
+
{{ formatPageLabel()(p.value) }}
|
|
206
|
+
</button>
|
|
207
|
+
} @else {
|
|
208
|
+
<span
|
|
209
|
+
class="flex h-control-md w-control-md items-center justify-center"
|
|
210
|
+
aria-hidden="true"
|
|
211
|
+
>…</span
|
|
212
|
+
>
|
|
213
|
+
}
|
|
214
|
+
</li>
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
<li>
|
|
218
|
+
<button
|
|
219
|
+
type="button"
|
|
220
|
+
[disabled]="page() >= total() || null"
|
|
221
|
+
[attr.aria-label]="nextAriaLabel()"
|
|
222
|
+
[class]="navClasses(nextText().length > 0)"
|
|
223
|
+
(click)="go(page() + 1)"
|
|
224
|
+
>
|
|
225
|
+
@if (nextText()) {
|
|
226
|
+
<span>{{ nextText() }}</span>
|
|
227
|
+
}
|
|
228
|
+
<svg
|
|
229
|
+
aria-hidden="true"
|
|
230
|
+
class="h-4 w-4"
|
|
231
|
+
viewBox="0 0 24 24"
|
|
232
|
+
fill="none"
|
|
233
|
+
stroke="currentColor"
|
|
234
|
+
stroke-width="2"
|
|
235
|
+
stroke-linecap="round"
|
|
236
|
+
stroke-linejoin="round"
|
|
237
|
+
>
|
|
238
|
+
<polyline points="9 18 15 12 9 6" />
|
|
239
|
+
</svg>
|
|
240
|
+
</button>
|
|
241
|
+
</li>
|
|
242
|
+
</ul>
|
|
243
|
+
`,
|
|
244
|
+
isInline: true
|
|
245
|
+
});
|
|
246
|
+
};
|
|
247
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
248
|
+
minVersion: "12.0.0",
|
|
249
|
+
version: "22.2.3",
|
|
250
|
+
ngImport: i0,
|
|
251
|
+
type: PaginationComponent,
|
|
252
|
+
decorators: [{
|
|
253
|
+
type: Component,
|
|
254
|
+
args: [{
|
|
255
|
+
selector: "Pagination, nav[Pagination]",
|
|
256
|
+
host: {
|
|
257
|
+
role: "navigation",
|
|
258
|
+
"aria-label": "pagination",
|
|
259
|
+
"[class]": "classes()"
|
|
260
|
+
},
|
|
261
|
+
template: `
|
|
262
|
+
<ul class="flex flex-row items-center gap-1">
|
|
263
|
+
<li>
|
|
264
|
+
<button
|
|
265
|
+
type="button"
|
|
266
|
+
[disabled]="page() <= 1 || null"
|
|
267
|
+
[attr.aria-label]="previousAriaLabel()"
|
|
268
|
+
[class]="navClasses(previousText().length > 0)"
|
|
269
|
+
(click)="go(page() - 1)"
|
|
270
|
+
>
|
|
271
|
+
<svg
|
|
272
|
+
aria-hidden="true"
|
|
273
|
+
class="h-4 w-4"
|
|
274
|
+
viewBox="0 0 24 24"
|
|
275
|
+
fill="none"
|
|
276
|
+
stroke="currentColor"
|
|
277
|
+
stroke-width="2"
|
|
278
|
+
stroke-linecap="round"
|
|
279
|
+
stroke-linejoin="round"
|
|
280
|
+
>
|
|
281
|
+
<polyline points="15 18 9 12 15 6" />
|
|
282
|
+
</svg>
|
|
283
|
+
@if (previousText()) {
|
|
284
|
+
<span>{{ previousText() }}</span>
|
|
285
|
+
}
|
|
286
|
+
</button>
|
|
287
|
+
</li>
|
|
288
|
+
|
|
289
|
+
@for (p of pages(); track p.key) {
|
|
290
|
+
<li>
|
|
291
|
+
@if (p.kind === 'page') {
|
|
292
|
+
<button
|
|
293
|
+
type="button"
|
|
294
|
+
[attr.aria-current]="p.value === page() ? 'page' : null"
|
|
295
|
+
[class]="pageClasses(p.value === page())"
|
|
296
|
+
(click)="go(p.value)"
|
|
297
|
+
>
|
|
298
|
+
{{ formatPageLabel()(p.value) }}
|
|
299
|
+
</button>
|
|
300
|
+
} @else {
|
|
301
|
+
<span
|
|
302
|
+
class="flex h-control-md w-control-md items-center justify-center"
|
|
303
|
+
aria-hidden="true"
|
|
304
|
+
>…</span
|
|
305
|
+
>
|
|
306
|
+
}
|
|
307
|
+
</li>
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
<li>
|
|
311
|
+
<button
|
|
312
|
+
type="button"
|
|
313
|
+
[disabled]="page() >= total() || null"
|
|
314
|
+
[attr.aria-label]="nextAriaLabel()"
|
|
315
|
+
[class]="navClasses(nextText().length > 0)"
|
|
316
|
+
(click)="go(page() + 1)"
|
|
317
|
+
>
|
|
318
|
+
@if (nextText()) {
|
|
319
|
+
<span>{{ nextText() }}</span>
|
|
320
|
+
}
|
|
321
|
+
<svg
|
|
322
|
+
aria-hidden="true"
|
|
323
|
+
class="h-4 w-4"
|
|
324
|
+
viewBox="0 0 24 24"
|
|
325
|
+
fill="none"
|
|
326
|
+
stroke="currentColor"
|
|
327
|
+
stroke-width="2"
|
|
328
|
+
stroke-linecap="round"
|
|
329
|
+
stroke-linejoin="round"
|
|
330
|
+
>
|
|
331
|
+
<polyline points="9 18 15 12 9 6" />
|
|
332
|
+
</svg>
|
|
333
|
+
</button>
|
|
334
|
+
</li>
|
|
335
|
+
</ul>
|
|
336
|
+
`
|
|
337
|
+
}]
|
|
338
|
+
}],
|
|
339
|
+
propDecorators: {
|
|
340
|
+
page: [{
|
|
341
|
+
type: i0.Input,
|
|
342
|
+
args: [{
|
|
343
|
+
isSignal: true,
|
|
344
|
+
alias: "page",
|
|
345
|
+
required: false
|
|
346
|
+
}]
|
|
347
|
+
}, {
|
|
348
|
+
type: i0.Output,
|
|
349
|
+
args: ["pageChange"]
|
|
350
|
+
}],
|
|
351
|
+
total: [{
|
|
352
|
+
type: i0.Input,
|
|
353
|
+
args: [{
|
|
354
|
+
isSignal: true,
|
|
355
|
+
alias: "total",
|
|
356
|
+
required: false
|
|
357
|
+
}]
|
|
358
|
+
}],
|
|
359
|
+
siblingCount: [{
|
|
360
|
+
type: i0.Input,
|
|
361
|
+
args: [{
|
|
362
|
+
isSignal: true,
|
|
363
|
+
alias: "siblingCount",
|
|
364
|
+
required: false
|
|
365
|
+
}]
|
|
366
|
+
}],
|
|
367
|
+
showPageNumbers: [{
|
|
368
|
+
type: i0.Input,
|
|
369
|
+
args: [{
|
|
370
|
+
isSignal: true,
|
|
371
|
+
alias: "showPageNumbers",
|
|
372
|
+
required: false
|
|
373
|
+
}]
|
|
374
|
+
}],
|
|
375
|
+
previousText: [{
|
|
376
|
+
type: i0.Input,
|
|
377
|
+
args: [{
|
|
378
|
+
isSignal: true,
|
|
379
|
+
alias: "previousText",
|
|
380
|
+
required: false
|
|
381
|
+
}]
|
|
382
|
+
}],
|
|
383
|
+
nextText: [{
|
|
384
|
+
type: i0.Input,
|
|
385
|
+
args: [{
|
|
386
|
+
isSignal: true,
|
|
387
|
+
alias: "nextText",
|
|
388
|
+
required: false
|
|
389
|
+
}]
|
|
390
|
+
}],
|
|
391
|
+
previousAriaLabel: [{
|
|
392
|
+
type: i0.Input,
|
|
393
|
+
args: [{
|
|
394
|
+
isSignal: true,
|
|
395
|
+
alias: "previousAriaLabel",
|
|
396
|
+
required: false
|
|
397
|
+
}]
|
|
398
|
+
}],
|
|
399
|
+
nextAriaLabel: [{
|
|
400
|
+
type: i0.Input,
|
|
401
|
+
args: [{
|
|
402
|
+
isSignal: true,
|
|
403
|
+
alias: "nextAriaLabel",
|
|
404
|
+
required: false
|
|
405
|
+
}]
|
|
406
|
+
}],
|
|
407
|
+
formatPageLabel: [{
|
|
408
|
+
type: i0.Input,
|
|
409
|
+
args: [{
|
|
410
|
+
isSignal: true,
|
|
411
|
+
alias: "formatPageLabel",
|
|
412
|
+
required: false
|
|
413
|
+
}]
|
|
414
|
+
}],
|
|
415
|
+
class: [{
|
|
416
|
+
type: i0.Input,
|
|
417
|
+
args: [{
|
|
418
|
+
isSignal: true,
|
|
419
|
+
alias: "class",
|
|
420
|
+
required: false
|
|
421
|
+
}]
|
|
422
|
+
}]
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
export { PaginationComponent };
|