valtech-components 2.0.404 → 2.0.407
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 +71 -0
- package/esm2022/lib/components/atoms/avatar/avatar.component.mjs +4 -4
- package/esm2022/lib/components/atoms/avatar/types.mjs +1 -1
- package/esm2022/lib/components/atoms/box/box.component.mjs +4 -4
- package/esm2022/lib/components/atoms/box/types.mjs +1 -1
- package/esm2022/lib/components/atoms/button/button.component.mjs +6 -6
- package/esm2022/lib/components/atoms/button/factory.mjs +1 -1
- package/esm2022/lib/components/atoms/countdown/countdown.component.mjs +343 -0
- package/esm2022/lib/components/atoms/countdown/types.mjs +27 -0
- package/esm2022/lib/components/atoms/display/display.component.mjs +4 -4
- package/esm2022/lib/components/atoms/display/types.mjs +1 -1
- package/esm2022/lib/components/atoms/divider/divider.component.mjs +4 -4
- package/esm2022/lib/components/atoms/divider/types.mjs +1 -1
- package/esm2022/lib/components/atoms/fab/fab.component.mjs +152 -0
- package/esm2022/lib/components/atoms/fab/types.mjs +2 -0
- package/esm2022/lib/components/atoms/href/href.component.mjs +4 -4
- package/esm2022/lib/components/atoms/href/types.mjs +1 -1
- package/esm2022/lib/components/atoms/icon/icon.component.mjs +4 -4
- package/esm2022/lib/components/atoms/icon/types.mjs +1 -1
- package/esm2022/lib/components/atoms/image/image.component.mjs +6 -6
- package/esm2022/lib/components/atoms/image/types.mjs +1 -1
- package/esm2022/lib/components/atoms/price-tag/price-tag.component.mjs +245 -0
- package/esm2022/lib/components/atoms/price-tag/types.mjs +15 -0
- package/esm2022/lib/components/atoms/progress-bar/progress-bar.component.mjs +4 -4
- package/esm2022/lib/components/atoms/progress-bar/types.mjs +1 -1
- package/esm2022/lib/components/atoms/progress-ring/progress-ring.component.mjs +149 -0
- package/esm2022/lib/components/atoms/progress-ring/types.mjs +2 -0
- package/esm2022/lib/components/atoms/qr-code/qr-code.component.mjs +417 -0
- package/esm2022/lib/components/atoms/qr-code/types.mjs +2 -0
- package/esm2022/lib/components/atoms/skeleton/skeleton.component.mjs +193 -0
- package/esm2022/lib/components/atoms/skeleton/types.mjs +13 -0
- package/esm2022/lib/components/atoms/text/text.component.mjs +4 -4
- package/esm2022/lib/components/atoms/text/types.mjs +1 -1
- package/esm2022/lib/components/atoms/title/title.component.mjs +4 -4
- package/esm2022/lib/components/atoms/title/types.mjs +1 -1
- package/esm2022/lib/components/molecules/accordion/accordion.component.mjs +139 -0
- package/esm2022/lib/components/molecules/accordion/types.mjs +2 -0
- package/esm2022/lib/components/molecules/action-header/action-header.component.mjs +4 -4
- package/esm2022/lib/components/molecules/action-header/types.mjs +1 -1
- package/esm2022/lib/components/molecules/alert-box/alert-box.component.mjs +4 -4
- package/esm2022/lib/components/molecules/alert-box/types.mjs +1 -1
- package/esm2022/lib/components/molecules/breadcrumb/breadcrumb.component.mjs +137 -0
- package/esm2022/lib/components/molecules/breadcrumb/types.mjs +2 -0
- package/esm2022/lib/components/molecules/button-group/button-group.component.mjs +4 -4
- package/esm2022/lib/components/molecules/button-group/types.mjs +1 -1
- package/esm2022/lib/components/molecules/card/card.component.mjs +5 -5
- package/esm2022/lib/components/molecules/card/types.mjs +1 -1
- package/esm2022/lib/components/molecules/check-input/check-input.component.mjs +4 -4
- package/esm2022/lib/components/molecules/chip-group/chip-group.component.mjs +174 -0
- package/esm2022/lib/components/molecules/chip-group/types.mjs +2 -0
- package/esm2022/lib/components/molecules/code-display/code-display.component.mjs +4 -4
- package/esm2022/lib/components/molecules/code-display/types.mjs +1 -1
- package/esm2022/lib/components/molecules/command-display/command-display.component.mjs +4 -4
- package/esm2022/lib/components/molecules/command-display/types.mjs +1 -1
- package/esm2022/lib/components/molecules/comment/comment.component.mjs +634 -0
- package/esm2022/lib/components/molecules/comment/types.mjs +2 -0
- package/esm2022/lib/components/molecules/comment-input/comment-input.component.mjs +4 -4
- package/esm2022/lib/components/molecules/content-loader/content-loader.component.mjs +4 -4
- package/esm2022/lib/components/molecules/content-loader/types.mjs +1 -1
- package/esm2022/lib/components/molecules/currency-input/currency-input.component.mjs +368 -0
- package/esm2022/lib/components/molecules/currency-input/types.mjs +18 -0
- package/esm2022/lib/components/molecules/date-input/date-input.component.mjs +5 -5
- package/esm2022/lib/components/molecules/date-range-input/date-range-input.component.mjs +418 -0
- package/esm2022/lib/components/molecules/date-range-input/types.mjs +2 -0
- package/esm2022/lib/components/molecules/email-input/email-input.component.mjs +4 -4
- package/esm2022/lib/components/molecules/expandable-text/expandable-text.component.mjs +4 -4
- package/esm2022/lib/components/molecules/expandable-text/types.mjs +1 -1
- package/esm2022/lib/components/molecules/file-input/file-input.component.mjs +4 -4
- package/esm2022/lib/components/molecules/glow-card/glow-card.component.mjs +279 -0
- package/esm2022/lib/components/molecules/glow-card/types.mjs +11 -0
- package/esm2022/lib/components/molecules/hint/hint.component.mjs +4 -4
- package/esm2022/lib/components/molecules/hour-input/hour-input.component.mjs +4 -4
- package/esm2022/lib/components/molecules/info/info.component.mjs +4 -4
- package/esm2022/lib/components/molecules/info/types.mjs +1 -1
- package/esm2022/lib/components/molecules/language-selector/language-selector.component.mjs +4 -4
- package/esm2022/lib/components/molecules/language-selector/types.mjs +1 -1
- package/esm2022/lib/components/molecules/layered-card/layered-card.component.mjs +4 -4
- package/esm2022/lib/components/molecules/layered-card/types.mjs +1 -1
- package/esm2022/lib/components/molecules/link/link.component.mjs +4 -4
- package/esm2022/lib/components/molecules/link/types.mjs +1 -1
- package/esm2022/lib/components/molecules/links-cake/links-cake.component.mjs +4 -4
- package/esm2022/lib/components/molecules/links-cake/types.mjs +1 -1
- package/esm2022/lib/components/molecules/multi-select-search/multi-select-search.component.mjs +5 -5
- package/esm2022/lib/components/molecules/notes-box/notes-box.component.mjs +4 -4
- package/esm2022/lib/components/molecules/notes-box/types.mjs +1 -1
- package/esm2022/lib/components/molecules/number-from-to/number-from-to.component.mjs +4 -4
- package/esm2022/lib/components/molecules/number-input/number-input.component.mjs +4 -4
- package/esm2022/lib/components/molecules/number-stepper/number-stepper.component.mjs +377 -0
- package/esm2022/lib/components/molecules/number-stepper/types.mjs +2 -0
- package/esm2022/lib/components/molecules/pagination/pagination.component.mjs +253 -0
- package/esm2022/lib/components/molecules/pagination/types.mjs +2 -0
- package/esm2022/lib/components/molecules/participant-card/participant-card.component.mjs +486 -0
- package/esm2022/lib/components/molecules/participant-card/types.mjs +21 -0
- package/esm2022/lib/components/molecules/password-input/password-input.component.mjs +4 -4
- package/esm2022/lib/components/molecules/phone-input/phone-input.component.mjs +336 -0
- package/esm2022/lib/components/molecules/phone-input/types.mjs +19 -0
- package/esm2022/lib/components/molecules/pill/pill.component.mjs +4 -4
- package/esm2022/lib/components/molecules/pill/types.mjs +1 -1
- package/esm2022/lib/components/molecules/pin-input/pin-input.component.mjs +4 -4
- package/esm2022/lib/components/molecules/plain-code-box/plain-code-box.component.mjs +4 -4
- package/esm2022/lib/components/molecules/plain-code-box/types.mjs +1 -1
- package/esm2022/lib/components/molecules/popover-selector/popover-selector.component.mjs +5 -5
- package/esm2022/lib/components/molecules/popover-selector/types.mjs +1 -1
- package/esm2022/lib/components/molecules/progress-status/progress-status.component.mjs +4 -4
- package/esm2022/lib/components/molecules/progress-status/types.mjs +1 -1
- package/esm2022/lib/components/molecules/prompter/prompter.component.mjs +4 -4
- package/esm2022/lib/components/molecules/prompter/types.mjs +1 -1
- package/esm2022/lib/components/molecules/quote-box/quote-box.component.mjs +155 -0
- package/esm2022/lib/components/molecules/radio-input/radio-input.component.mjs +5 -5
- package/esm2022/lib/components/molecules/raffle-status-card/raffle-status-card.component.mjs +484 -0
- package/esm2022/lib/components/molecules/raffle-status-card/types.mjs +23 -0
- package/esm2022/lib/components/molecules/range-input/range-input.component.mjs +148 -0
- package/esm2022/lib/components/molecules/range-input/types.mjs +2 -0
- package/esm2022/lib/components/molecules/rating/rating.component.mjs +149 -0
- package/esm2022/lib/components/molecules/rating/types.mjs +2 -0
- package/esm2022/lib/components/molecules/searchbar/searchbar.component.mjs +4 -4
- package/esm2022/lib/components/molecules/segment-control/segment-control.component.mjs +145 -0
- package/esm2022/lib/components/molecules/segment-control/types.mjs +2 -0
- package/esm2022/lib/components/molecules/select-input/select-input.component.mjs +5 -5
- package/esm2022/lib/components/molecules/select-search/select-search.component.mjs +5 -5
- package/esm2022/lib/components/molecules/share-buttons/share-buttons.component.mjs +277 -0
- package/esm2022/lib/components/molecules/share-buttons/types.mjs +88 -0
- package/esm2022/lib/components/molecules/stats-card/stats-card.component.mjs +165 -0
- package/esm2022/lib/components/molecules/stats-card/types.mjs +2 -0
- package/esm2022/lib/components/molecules/stepper/stepper.component.mjs +239 -0
- package/esm2022/lib/components/molecules/stepper/types.mjs +2 -0
- package/esm2022/lib/components/molecules/tabs/tabs.component.mjs +135 -0
- package/esm2022/lib/components/molecules/tabs/types.mjs +2 -0
- package/esm2022/lib/components/molecules/text-input/text-input.component.mjs +4 -4
- package/esm2022/lib/components/molecules/textarea-input/textarea-input.component.mjs +204 -0
- package/esm2022/lib/components/molecules/textarea-input/types.mjs +2 -0
- package/esm2022/lib/components/molecules/ticket-grid/ticket-grid.component.mjs +497 -0
- package/esm2022/lib/components/molecules/ticket-grid/types.mjs +11 -0
- package/esm2022/lib/components/molecules/timeline/timeline.component.mjs +140 -0
- package/esm2022/lib/components/molecules/timeline/types.mjs +2 -0
- package/esm2022/lib/components/molecules/title-block/title-block.component.mjs +4 -4
- package/esm2022/lib/components/molecules/title-block/types.mjs +1 -1
- package/esm2022/lib/components/molecules/toggle-input/toggle-input.component.mjs +89 -0
- package/esm2022/lib/components/molecules/toggle-input/types.mjs +2 -0
- package/esm2022/lib/components/molecules/winner-display/types.mjs +9 -0
- package/esm2022/lib/components/molecules/winner-display/winner-display.component.mjs +370 -0
- package/esm2022/lib/components/organisms/article/article.component.mjs +4 -4
- package/esm2022/lib/components/organisms/article/types.mjs +1 -1
- package/esm2022/lib/components/organisms/banner/banner.component.mjs +4 -4
- package/esm2022/lib/components/organisms/banner/types.mjs +1 -1
- package/esm2022/lib/components/organisms/comment-section/comment-section.component.mjs +578 -0
- package/esm2022/lib/components/organisms/comment-section/types.mjs +2 -0
- package/esm2022/lib/components/organisms/data-table/data-table.component.mjs +853 -0
- package/esm2022/lib/components/organisms/data-table/types.mjs +13 -0
- package/esm2022/lib/components/organisms/footer/footer.component.mjs +4 -4
- package/esm2022/lib/components/organisms/footer/types.mjs +1 -1
- package/esm2022/lib/components/organisms/form/factory.mjs +1 -1
- package/esm2022/lib/components/organisms/form/form-footer/form-footer.component.mjs +4 -4
- package/esm2022/lib/components/organisms/form/form.component.mjs +4 -4
- package/esm2022/lib/components/organisms/header/header.component.mjs +4 -4
- package/esm2022/lib/components/organisms/header/types.mjs +1 -1
- package/esm2022/lib/components/organisms/item-list/item-list.component.mjs +4 -4
- package/esm2022/lib/components/organisms/item-list/types.mjs +1 -1
- package/esm2022/lib/components/organisms/no-content/no-content.component.mjs +4 -4
- package/esm2022/lib/components/organisms/no-content/types.mjs +1 -1
- package/esm2022/lib/components/organisms/toolbar/toolbar.component.mjs +4 -4
- package/esm2022/lib/components/organisms/toolbar/types.mjs +1 -1
- package/esm2022/lib/components/organisms/wizard/types.mjs +1 -1
- package/esm2022/lib/components/organisms/wizard/wizard-footer/wizard-footer.component.mjs +4 -4
- package/esm2022/lib/components/organisms/wizard/wizard.component.mjs +4 -4
- package/esm2022/lib/components/templates/layout/layout.component.mjs +4 -4
- package/esm2022/lib/components/templates/simple/simple.component.mjs +5 -5
- package/esm2022/lib/components/templates/simple/types.mjs +1 -1
- package/esm2022/lib/components/types.mjs +22 -16
- package/esm2022/lib/services/confirmation-dialog/confirmation-dialog.service.mjs +180 -0
- package/esm2022/lib/services/confirmation-dialog/types.mjs +14 -0
- package/esm2022/lib/services/download.service.mjs +4 -4
- package/esm2022/lib/services/icons.service.mjs +4 -4
- package/esm2022/lib/services/in-app-browser.service.mjs +4 -4
- package/esm2022/lib/services/lang-provider/components/lang-settings.mjs +1 -1
- package/esm2022/lib/services/lang-provider/content.mjs +1 -1
- package/esm2022/lib/services/lang-provider/lang-provider.service.mjs +4 -4
- package/esm2022/lib/services/lang-provider/types.mjs +1 -1
- package/esm2022/lib/services/link-processor.service.mjs +4 -4
- package/esm2022/lib/services/local-storage.service.mjs +1 -1
- package/esm2022/lib/services/modal/modal.service.mjs +213 -0
- package/esm2022/lib/services/modal/simple-modal-content.component.mjs +133 -0
- package/esm2022/lib/services/modal/types.mjs +26 -0
- package/esm2022/lib/services/navigation.service.mjs +4 -4
- package/esm2022/lib/services/qr-generator/qr-generator.service.mjs +341 -0
- package/esm2022/lib/services/qr-generator/types.mjs +46 -0
- package/esm2022/lib/services/theme.service.mjs +4 -4
- package/esm2022/lib/services/toast.service.mjs +4 -4
- package/esm2022/lib/services/types.mjs +1 -1
- package/esm2022/lib/shared/constants/storage.mjs +1 -1
- package/esm2022/lib/shared/pipes/process-links.pipe.mjs +4 -4
- package/esm2022/lib/shared/utils/content.mjs +1 -1
- package/esm2022/lib/shared/utils/dom.mjs +1 -1
- package/esm2022/lib/shared/utils/form-defaults.mjs +1 -1
- package/esm2022/lib/shared/utils/simple-content.mjs +1 -1
- package/esm2022/lib/shared/utils/styles.mjs +1 -1
- package/esm2022/lib/shared/utils/text.mjs +1 -1
- package/esm2022/public-api.mjs +73 -3
- package/esm2022/valtech-components.mjs +1 -1
- package/fesm2022/valtech-components-simple-modal-content.component-DQhEgUmS.mjs +136 -0
- package/fesm2022/valtech-components-simple-modal-content.component-DQhEgUmS.mjs.map +1 -0
- package/fesm2022/valtech-components.mjs +14848 -4293
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/atoms/countdown/countdown.component.d.ts +38 -0
- package/lib/components/atoms/countdown/types.d.ts +108 -0
- package/lib/components/atoms/fab/fab.component.d.ts +16 -0
- package/lib/components/atoms/fab/types.d.ts +45 -0
- package/lib/components/atoms/price-tag/price-tag.component.d.ts +16 -0
- package/lib/components/atoms/price-tag/types.d.ts +59 -0
- package/lib/components/atoms/progress-ring/progress-ring.component.d.ts +20 -0
- package/lib/components/atoms/progress-ring/types.d.ts +24 -0
- package/lib/components/atoms/qr-code/qr-code.component.d.ts +36 -0
- package/lib/components/atoms/qr-code/types.d.ts +124 -0
- package/lib/components/atoms/skeleton/skeleton.component.d.ts +12 -0
- package/lib/components/atoms/skeleton/types.d.ts +29 -0
- package/lib/components/molecules/accordion/accordion.component.d.ts +19 -0
- package/lib/components/molecules/accordion/types.d.ts +47 -0
- package/lib/components/molecules/breadcrumb/breadcrumb.component.d.ts +22 -0
- package/lib/components/molecules/breadcrumb/types.d.ts +45 -0
- package/lib/components/molecules/chip-group/chip-group.component.d.ts +22 -0
- package/lib/components/molecules/chip-group/types.d.ts +65 -0
- package/lib/components/molecules/comment/comment.component.d.ts +42 -0
- package/lib/components/molecules/comment/types.d.ts +171 -0
- package/lib/components/molecules/currency-input/currency-input.component.d.ts +43 -0
- package/lib/components/molecules/currency-input/types.d.ts +96 -0
- package/lib/components/molecules/date-range-input/date-range-input.component.d.ts +42 -0
- package/lib/components/molecules/date-range-input/types.d.ts +109 -0
- package/lib/components/molecules/glow-card/glow-card.component.d.ts +51 -0
- package/lib/components/molecules/glow-card/types.d.ts +92 -0
- package/lib/components/molecules/number-stepper/number-stepper.component.d.ts +34 -0
- package/lib/components/molecules/number-stepper/types.d.ts +88 -0
- package/lib/components/molecules/pagination/pagination.component.d.ts +15 -0
- package/lib/components/molecules/pagination/types.d.ts +41 -0
- package/lib/components/molecules/participant-card/participant-card.component.d.ts +26 -0
- package/lib/components/molecules/participant-card/types.d.ts +132 -0
- package/lib/components/molecules/phone-input/phone-input.component.d.ts +38 -0
- package/lib/components/molecules/phone-input/types.d.ts +98 -0
- package/lib/components/molecules/quote-box/quote-box.component.d.ts +26 -0
- package/lib/components/molecules/raffle-status-card/raffle-status-card.component.d.ts +22 -0
- package/lib/components/molecules/raffle-status-card/types.d.ts +108 -0
- package/lib/components/molecules/range-input/range-input.component.d.ts +30 -0
- package/lib/components/molecules/range-input/types.d.ts +59 -0
- package/lib/components/molecules/rating/rating.component.d.ts +17 -0
- package/lib/components/molecules/rating/types.d.ts +41 -0
- package/lib/components/molecules/segment-control/segment-control.component.d.ts +30 -0
- package/lib/components/molecules/segment-control/types.d.ts +46 -0
- package/lib/components/molecules/share-buttons/share-buttons.component.d.ts +22 -0
- package/lib/components/molecules/share-buttons/types.d.ts +108 -0
- package/lib/components/molecules/stats-card/stats-card.component.d.ts +14 -0
- package/lib/components/molecules/stats-card/types.d.ts +41 -0
- package/lib/components/molecules/stepper/stepper.component.d.ts +21 -0
- package/lib/components/molecules/stepper/types.d.ts +66 -0
- package/lib/components/molecules/tabs/tabs.component.d.ts +17 -0
- package/lib/components/molecules/tabs/types.d.ts +45 -0
- package/lib/components/molecules/textarea-input/textarea-input.component.d.ts +27 -0
- package/lib/components/molecules/textarea-input/types.d.ts +74 -0
- package/lib/components/molecules/ticket-grid/ticket-grid.component.d.ts +41 -0
- package/lib/components/molecules/ticket-grid/types.d.ts +122 -0
- package/lib/components/molecules/timeline/timeline.component.d.ts +14 -0
- package/lib/components/molecules/timeline/types.d.ts +39 -0
- package/lib/components/molecules/toggle-input/toggle-input.component.d.ts +24 -0
- package/lib/components/molecules/toggle-input/types.d.ts +30 -0
- package/lib/components/molecules/winner-display/types.d.ts +103 -0
- package/lib/components/molecules/winner-display/winner-display.component.d.ts +37 -0
- package/lib/components/organisms/article/article.component.d.ts +1 -1
- package/lib/components/organisms/comment-section/comment-section.component.d.ts +52 -0
- package/lib/components/organisms/comment-section/types.d.ts +144 -0
- package/lib/components/organisms/data-table/data-table.component.d.ts +46 -0
- package/lib/components/organisms/data-table/types.d.ts +205 -0
- package/lib/components/types.d.ts +21 -15
- package/lib/services/confirmation-dialog/confirmation-dialog.service.d.ts +71 -0
- package/lib/services/confirmation-dialog/types.d.ts +61 -0
- package/lib/services/modal/modal.service.d.ts +98 -0
- package/lib/services/modal/simple-modal-content.component.d.ts +19 -0
- package/lib/services/modal/types.d.ts +155 -0
- package/lib/services/qr-generator/qr-generator.service.d.ts +115 -0
- package/lib/services/qr-generator/types.d.ts +141 -0
- package/package.json +11 -4
- package/public-api.d.ts +72 -2
- package/LICENSE +0 -21
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
+
import { IonButton, IonIcon } from '@ionic/angular/standalone';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { addIcons } from 'ionicons';
|
|
5
|
+
import { chevronBack, chevronForward, playBack, playForward } from 'ionicons/icons';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
addIcons({ chevronBack, chevronForward, playBack, playForward });
|
|
8
|
+
/**
|
|
9
|
+
* val-pagination
|
|
10
|
+
*
|
|
11
|
+
* A pagination component for navigating through paged content.
|
|
12
|
+
*
|
|
13
|
+
* @example Basic usage
|
|
14
|
+
* <val-pagination [props]="{
|
|
15
|
+
* currentPage: 1,
|
|
16
|
+
* totalPages: 10,
|
|
17
|
+
* showPageInfo: true
|
|
18
|
+
* }" (pageChange)="onPageChange($event)"></val-pagination>
|
|
19
|
+
*
|
|
20
|
+
* @example With total items
|
|
21
|
+
* <val-pagination [props]="{
|
|
22
|
+
* currentPage: 1,
|
|
23
|
+
* totalItems: 100,
|
|
24
|
+
* pageSize: 10,
|
|
25
|
+
* maxVisiblePages: 5
|
|
26
|
+
* }"></val-pagination>
|
|
27
|
+
*
|
|
28
|
+
* @input props: PaginationMetadata - Configuration for pagination
|
|
29
|
+
* @output pageChange: PageChangeEvent - Emits when page changes
|
|
30
|
+
*/
|
|
31
|
+
export class PaginationComponent {
|
|
32
|
+
constructor() {
|
|
33
|
+
this.pageChange = new EventEmitter();
|
|
34
|
+
this.visiblePages = [];
|
|
35
|
+
this.totalPages = 1;
|
|
36
|
+
}
|
|
37
|
+
ngOnChanges(changes) {
|
|
38
|
+
if (changes['props']) {
|
|
39
|
+
this.calculateTotalPages();
|
|
40
|
+
this.calculateVisiblePages();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
goToPage(page) {
|
|
44
|
+
if (page < 1 || page > this.totalPages || page === this.props.currentPage) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const event = {
|
|
48
|
+
page,
|
|
49
|
+
previousPage: this.props.currentPage,
|
|
50
|
+
pageSize: this.props.pageSize || 10,
|
|
51
|
+
};
|
|
52
|
+
this.pageChange.emit(event);
|
|
53
|
+
}
|
|
54
|
+
calculateTotalPages() {
|
|
55
|
+
if (this.props.totalPages) {
|
|
56
|
+
this.totalPages = this.props.totalPages;
|
|
57
|
+
}
|
|
58
|
+
else if (this.props.totalItems && this.props.pageSize) {
|
|
59
|
+
this.totalPages = Math.ceil(this.props.totalItems / this.props.pageSize);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
this.totalPages = 1;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
calculateVisiblePages() {
|
|
66
|
+
const maxVisible = this.props.maxVisiblePages || 5;
|
|
67
|
+
const current = this.props.currentPage;
|
|
68
|
+
const total = this.totalPages;
|
|
69
|
+
if (total <= maxVisible) {
|
|
70
|
+
this.visiblePages = Array.from({ length: total }, (_, i) => i + 1);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const pages = [];
|
|
74
|
+
const half = Math.floor(maxVisible / 2);
|
|
75
|
+
let start = Math.max(1, current - half);
|
|
76
|
+
let end = Math.min(total, start + maxVisible - 1);
|
|
77
|
+
if (end - start < maxVisible - 1) {
|
|
78
|
+
start = Math.max(1, end - maxVisible + 1);
|
|
79
|
+
}
|
|
80
|
+
// Always show first page
|
|
81
|
+
if (start > 1) {
|
|
82
|
+
pages.push(1);
|
|
83
|
+
if (start > 2) {
|
|
84
|
+
pages.push(-1); // Ellipsis
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// Middle pages
|
|
88
|
+
for (let i = start; i <= end; i++) {
|
|
89
|
+
if (!pages.includes(i)) {
|
|
90
|
+
pages.push(i);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// Always show last page
|
|
94
|
+
if (end < total) {
|
|
95
|
+
if (end < total - 1) {
|
|
96
|
+
pages.push(-1); // Ellipsis
|
|
97
|
+
}
|
|
98
|
+
pages.push(total);
|
|
99
|
+
}
|
|
100
|
+
this.visiblePages = pages;
|
|
101
|
+
}
|
|
102
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
103
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: PaginationComponent, isStandalone: true, selector: "val-pagination", inputs: { props: "props" }, outputs: { pageChange: "pageChange" }, usesOnChanges: true, ngImport: i0, template: `
|
|
104
|
+
<div class="pagination-container" [class.disabled]="props.disabled">
|
|
105
|
+
@if (props.showFirstLast !== false) {
|
|
106
|
+
<ion-button
|
|
107
|
+
fill="clear"
|
|
108
|
+
[size]="props.size || 'default'"
|
|
109
|
+
[color]="props.color || 'primary'"
|
|
110
|
+
[disabled]="props.disabled || props.currentPage <= 1"
|
|
111
|
+
(click)="goToPage(1)"
|
|
112
|
+
>
|
|
113
|
+
<ion-icon slot="icon-only" name="play-back"></ion-icon>
|
|
114
|
+
</ion-button>
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@if (props.showPrevNext !== false) {
|
|
118
|
+
<ion-button
|
|
119
|
+
fill="clear"
|
|
120
|
+
[size]="props.size || 'default'"
|
|
121
|
+
[color]="props.color || 'primary'"
|
|
122
|
+
[disabled]="props.disabled || props.currentPage <= 1"
|
|
123
|
+
(click)="goToPage(props.currentPage - 1)"
|
|
124
|
+
>
|
|
125
|
+
<ion-icon slot="icon-only" name="chevron-back"></ion-icon>
|
|
126
|
+
</ion-button>
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@for (page of visiblePages; track page) {
|
|
130
|
+
@if (page === -1) {
|
|
131
|
+
<span class="ellipsis">...</span>
|
|
132
|
+
} @else {
|
|
133
|
+
<ion-button
|
|
134
|
+
[fill]="page === props.currentPage ? 'solid' : 'clear'"
|
|
135
|
+
[size]="props.size || 'default'"
|
|
136
|
+
[color]="props.color || 'primary'"
|
|
137
|
+
[disabled]="props.disabled"
|
|
138
|
+
(click)="goToPage(page)"
|
|
139
|
+
>
|
|
140
|
+
{{ page }}
|
|
141
|
+
</ion-button>
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@if (props.showPrevNext !== false) {
|
|
146
|
+
<ion-button
|
|
147
|
+
fill="clear"
|
|
148
|
+
[size]="props.size || 'default'"
|
|
149
|
+
[color]="props.color || 'primary'"
|
|
150
|
+
[disabled]="props.disabled || props.currentPage >= totalPages"
|
|
151
|
+
(click)="goToPage(props.currentPage + 1)"
|
|
152
|
+
>
|
|
153
|
+
<ion-icon slot="icon-only" name="chevron-forward"></ion-icon>
|
|
154
|
+
</ion-button>
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@if (props.showFirstLast !== false) {
|
|
158
|
+
<ion-button
|
|
159
|
+
fill="clear"
|
|
160
|
+
[size]="props.size || 'default'"
|
|
161
|
+
[color]="props.color || 'primary'"
|
|
162
|
+
[disabled]="props.disabled || props.currentPage >= totalPages"
|
|
163
|
+
(click)="goToPage(totalPages)"
|
|
164
|
+
>
|
|
165
|
+
<ion-icon slot="icon-only" name="play-forward"></ion-icon>
|
|
166
|
+
</ion-button>
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@if (props.showPageInfo) {
|
|
170
|
+
<span class="page-info">Page {{ props.currentPage }} of {{ totalPages }}</span>
|
|
171
|
+
}
|
|
172
|
+
</div>
|
|
173
|
+
`, isInline: true, styles: [":host{display:block}.pagination-container{display:flex;align-items:center;justify-content:center;gap:4px;flex-wrap:wrap}.pagination-container.disabled{opacity:.5;pointer-events:none}ion-button{--padding-start: 8px;--padding-end: 8px;min-width:36px;font-weight:500}ion-button[size=small]{--padding-start: 6px;--padding-end: 6px;min-width:28px;font-size:12px}ion-button[size=large]{--padding-start: 12px;--padding-end: 12px;min-width:44px;font-size:16px}.ellipsis{padding:0 8px;color:var(--ion-color-medium);font-size:14px}.page-info{margin-left:16px;color:var(--ion-color-medium);font-size:14px;white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }] }); }
|
|
174
|
+
}
|
|
175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
176
|
+
type: Component,
|
|
177
|
+
args: [{ selector: 'val-pagination', standalone: true, imports: [CommonModule, IonButton, IonIcon], template: `
|
|
178
|
+
<div class="pagination-container" [class.disabled]="props.disabled">
|
|
179
|
+
@if (props.showFirstLast !== false) {
|
|
180
|
+
<ion-button
|
|
181
|
+
fill="clear"
|
|
182
|
+
[size]="props.size || 'default'"
|
|
183
|
+
[color]="props.color || 'primary'"
|
|
184
|
+
[disabled]="props.disabled || props.currentPage <= 1"
|
|
185
|
+
(click)="goToPage(1)"
|
|
186
|
+
>
|
|
187
|
+
<ion-icon slot="icon-only" name="play-back"></ion-icon>
|
|
188
|
+
</ion-button>
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@if (props.showPrevNext !== false) {
|
|
192
|
+
<ion-button
|
|
193
|
+
fill="clear"
|
|
194
|
+
[size]="props.size || 'default'"
|
|
195
|
+
[color]="props.color || 'primary'"
|
|
196
|
+
[disabled]="props.disabled || props.currentPage <= 1"
|
|
197
|
+
(click)="goToPage(props.currentPage - 1)"
|
|
198
|
+
>
|
|
199
|
+
<ion-icon slot="icon-only" name="chevron-back"></ion-icon>
|
|
200
|
+
</ion-button>
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@for (page of visiblePages; track page) {
|
|
204
|
+
@if (page === -1) {
|
|
205
|
+
<span class="ellipsis">...</span>
|
|
206
|
+
} @else {
|
|
207
|
+
<ion-button
|
|
208
|
+
[fill]="page === props.currentPage ? 'solid' : 'clear'"
|
|
209
|
+
[size]="props.size || 'default'"
|
|
210
|
+
[color]="props.color || 'primary'"
|
|
211
|
+
[disabled]="props.disabled"
|
|
212
|
+
(click)="goToPage(page)"
|
|
213
|
+
>
|
|
214
|
+
{{ page }}
|
|
215
|
+
</ion-button>
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@if (props.showPrevNext !== false) {
|
|
220
|
+
<ion-button
|
|
221
|
+
fill="clear"
|
|
222
|
+
[size]="props.size || 'default'"
|
|
223
|
+
[color]="props.color || 'primary'"
|
|
224
|
+
[disabled]="props.disabled || props.currentPage >= totalPages"
|
|
225
|
+
(click)="goToPage(props.currentPage + 1)"
|
|
226
|
+
>
|
|
227
|
+
<ion-icon slot="icon-only" name="chevron-forward"></ion-icon>
|
|
228
|
+
</ion-button>
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@if (props.showFirstLast !== false) {
|
|
232
|
+
<ion-button
|
|
233
|
+
fill="clear"
|
|
234
|
+
[size]="props.size || 'default'"
|
|
235
|
+
[color]="props.color || 'primary'"
|
|
236
|
+
[disabled]="props.disabled || props.currentPage >= totalPages"
|
|
237
|
+
(click)="goToPage(totalPages)"
|
|
238
|
+
>
|
|
239
|
+
<ion-icon slot="icon-only" name="play-forward"></ion-icon>
|
|
240
|
+
</ion-button>
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
@if (props.showPageInfo) {
|
|
244
|
+
<span class="page-info">Page {{ props.currentPage }} of {{ totalPages }}</span>
|
|
245
|
+
}
|
|
246
|
+
</div>
|
|
247
|
+
`, styles: [":host{display:block}.pagination-container{display:flex;align-items:center;justify-content:center;gap:4px;flex-wrap:wrap}.pagination-container.disabled{opacity:.5;pointer-events:none}ion-button{--padding-start: 8px;--padding-end: 8px;min-width:36px;font-weight:500}ion-button[size=small]{--padding-start: 6px;--padding-end: 6px;min-width:28px;font-size:12px}ion-button[size=large]{--padding-start: 12px;--padding-end: 12px;min-width:44px;font-size:16px}.ellipsis{padding:0 8px;color:var(--ion-color-medium);font-size:14px}.page-info{margin-left:16px;color:var(--ion-color-medium);font-size:14px;white-space:nowrap}\n"] }]
|
|
248
|
+
}], propDecorators: { props: [{
|
|
249
|
+
type: Input
|
|
250
|
+
}], pageChange: [{
|
|
251
|
+
type: Output
|
|
252
|
+
}] } });
|
|
253
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFnaW5hdGlvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbGliL2NvbXBvbmVudHMvbW9sZWN1bGVzL3BhZ2luYXRpb24vcGFnaW5hdGlvbi5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQWEsTUFBTSxFQUFFLFlBQVksRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFDakcsT0FBTyxFQUFFLFNBQVMsRUFBRSxPQUFPLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUMvRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFL0MsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLFVBQVUsQ0FBQztBQUNwQyxPQUFPLEVBQUUsV0FBVyxFQUFFLGNBQWMsRUFBRSxRQUFRLEVBQUUsV0FBVyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7O0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YmxlIC8gMik7XG5cbiAgICBsZXQgc3RhcnQgPSBNYXRoLm1heCgxLCBjdXJyZW50IC0gaGFsZik7XG4gICAgbGV0IGVuZCA9IE1hdGgubWluKHRvdGFsLCBzdGFydCArIG1heFZpc2libGUgLSAxKTtcblxuICAgIGlmIChlbmQgLSBzdGFydCA8IG1heFZpc2libGUgLSAxKSB7XG4gICAgICBzdGFydCA9IE1hdGgubWF4KDEsIGVuZCAtIG1heFZpc2libGUgKyAxKTtcbiAgICB9XG5cbiAgICAvLyBBbHdheXMgc2hvdyBmaXJzdCBwYWdlXG4gICAgaWYgKHN0YXJ0ID4gMSkge1xuICAgICAgcGFnZXMucHVzaCgxKTtcbiAgICAgIGlmIChzdGFydCA+IDIpIHtcbiAgICAgICAgcGFnZXMucHVzaCgtMSk7IC8vIEVsbGlwc2lzXG4gICAgICB9XG4gICAgfVxuXG4gICAgLy8gTWlkZGxlIHBhZ2VzXG4gICAgZm9yIChsZXQgaSA9IHN0YXJ0OyBpIDw9IGVuZDsgaSsrKSB7XG4gICAgICBpZiAoIXBhZ2VzLmluY2x1ZGVzKGkpKSB7XG4gICAgICAgIHBhZ2VzLnB1c2goaSk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgLy8gQWx3YXlzIHNob3cgbGFzdCBwYWdlXG4gICAgaWYgKGVuZCA8IHRvdGFsKSB7XG4gICAgICBpZiAoZW5kIDwgdG90YWwgLSAxKSB7XG4gICAgICAgIHBhZ2VzLnB1c2goLTEpOyAvLyBFbGxpcHNpc1xuICAgICAgfVxuICAgICAgcGFnZXMucHVzaCh0b3RhbCk7XG4gICAgfVxuXG4gICAgdGhpcy52aXNpYmxlUGFnZXMgPSBwYWdlcztcbiAgfVxufVxuIl19
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6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