q2-tecton-elements 1.50.1 → 1.51.1
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/dist/cjs/click-elsewhere_2.cjs.entry.js +21 -12
- package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
- package/dist/cjs/index-9aa4a776.js +235 -0
- package/dist/cjs/index-9aa4a776.js.map +1 -0
- package/dist/cjs/{index-43010ce4.js → index-f69742cf.js} +1 -1
- package/dist/cjs/{index-43010ce4.js.map → index-f69742cf.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-group.cjs.entry.js +50 -0
- package/dist/cjs/q2-action-group.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-action-sheet.cjs.entry.js +1364 -3
- package/dist/cjs/q2-action-sheet.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-badge_7.cjs.entry.js +23 -13
- package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +2 -2
- package/dist/cjs/q2-card.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
- package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-area.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-chart-donut.cjs.entry.js +16 -16
- package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +62 -62
- package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-detail.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +79 -7
- package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
- package/dist/cjs/q2-formatted-text.cjs.entry.js +72 -0
- package/dist/cjs/q2-formatted-text.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-item.cjs.entry.js +2 -2
- package/dist/cjs/q2-legend.cjs.entry.js +2 -2
- package/dist/cjs/q2-legend.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-link.cjs.entry.js +64 -0
- package/dist/cjs/q2-link.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-list.cjs.entry.js +2 -2
- package/dist/cjs/q2-loc.cjs.entry.js +2 -2
- package/dist/cjs/q2-message.cjs.entry.js +2 -2
- package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
- package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
- package/dist/cjs/q2-option-list.cjs.entry.js +9 -4
- package/dist/cjs/q2-option-list.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-option.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +90 -9
- package/dist/cjs/q2-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js +26 -5
- package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +1 -1
- package/dist/cjs/q2-relative-time.cjs.entry.js +3 -3
- package/dist/cjs/q2-resize-observer.cjs.entry.js +96 -0
- package/dist/cjs/q2-resize-observer.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-section.cjs.entry.js +27 -3
- package/dist/cjs/q2-section.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-select.cjs.entry.js +7 -6
- package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper.cjs.entry.js +39 -3
- package/dist/cjs/q2-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +3 -2
- package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +46 -11
- package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/q2-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/q2-action-group/q2-action-group.css +99 -0
- package/dist/collection/components/q2-action-group/q2-action-group.js +120 -0
- package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -0
- package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js +30 -0
- package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +1 -0
- package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js +156 -0
- package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +1 -0
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +3 -2
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
- package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
- package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js +14 -9
- package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js +14 -9
- package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js +14 -9
- package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +227 -223
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-card/test/q2-card-test.e2e.js +12 -7
- package/dist/collection/components/q2-card/test/q2-card-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js +49 -45
- package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
- package/dist/collection/components/q2-chart-area/q2-chart-area.js +2 -2
- package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
- package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js +12 -7
- package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +2 -2
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js.map +1 -1
- package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js +16 -11
- package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +15 -15
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js +32 -26
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js +12 -7
- package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +2 -2
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
- package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js +22 -17
- package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-currency/q2-currency.js +1 -1
- package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js +12 -7
- package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.js +104 -104
- package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js +42 -24
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-detail/q2-detail.js +1 -1
- package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js +12 -7
- package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +207 -7
- package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +297 -135
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +1 -1
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
- package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js +18 -13
- package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js +14 -18
- package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.css +94 -0
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +230 -0
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js.map +1 -0
- package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js +430 -0
- package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js.map +1 -0
- package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js +14 -9
- package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-input/q2-input.css +9 -0
- package/dist/collection/components/q2-input/q2-input.js +7 -8
- package/dist/collection/components/q2-input/q2-input.js.map +1 -1
- package/dist/collection/components/q2-input/test/q2-input-test.e2e.js +50 -33
- package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-item/q2-item.js +1 -1
- package/dist/collection/components/q2-item/test/q2-item-test.e2e.js +32 -7
- package/dist/collection/components/q2-item/test/q2-item-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-legend/q2-legend.css +1 -1
- package/dist/collection/components/q2-legend/q2-legend.js +1 -1
- package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js +13 -8
- package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-link/q2-link.css +146 -0
- package/dist/collection/components/q2-link/q2-link.js +242 -0
- package/dist/collection/components/q2-link/q2-link.js.map +1 -0
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js +145 -0
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -0
- package/dist/collection/components/q2-list/q2-list.js +1 -1
- package/dist/collection/components/q2-list/test/q2-list-test.e2e.js +12 -7
- package/dist/collection/components/q2-list/test/q2-list-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js +14 -9
- package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js +14 -9
- package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loc/q2-loc.js +1 -1
- package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js +16 -11
- package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-message/q2-message.js +1 -1
- package/dist/collection/components/q2-message/test/q2-message-test.e2e.js +14 -9
- package/dist/collection/components/q2-message/test/q2-message-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
- package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js +20 -13
- package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-option/q2-option.js +1 -1
- package/dist/collection/components/q2-option/test/q2-option-test.e2e.js +28 -12
- package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-option-list/q2-option-list.js +7 -5
- package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
- package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js +415 -405
- package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-pagination/q2-pagination.js +230 -14
- package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +138 -15
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-pill/q2-pill.css +12 -0
- package/dist/collection/components/q2-pill/q2-pill.js +43 -3
- package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +412 -212
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js +37 -11
- package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
- package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js +296 -236
- package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js +3 -3
- package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
- package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js +21 -7
- package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-radio-group/q2-radio-group.js +2 -2
- package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
- package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js +32 -26
- package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
- package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js +12 -7
- package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.css +71 -0
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +166 -0
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js.map +1 -0
- package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js +83 -0
- package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js.map +1 -0
- package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js +66 -0
- package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js.map +1 -0
- package/dist/collection/components/q2-section/q2-section.js +78 -2
- package/dist/collection/components/q2-section/q2-section.js.map +1 -1
- package/dist/collection/components/q2-section/test/q2-section-test.e2e.js +39 -9
- package/dist/collection/components/q2-section/test/q2-section-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-select/q2-select.js +23 -5
- package/dist/collection/components/q2-select/q2-select.js.map +1 -1
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +695 -676
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-stepper/q2-stepper.js +76 -2
- package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
- package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js +183 -87
- package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +2 -2
- package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js +20 -9
- package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
- package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js +71 -67
- package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tab-container/q2-tab-container.js +50 -7
- package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
- package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js +89 -65
- package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js +14 -9
- package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tag/q2-tag.js +19 -1
- package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +47 -28
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-textarea/q2-textarea.js +51 -13
- package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
- package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js +31 -10
- package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tooltip/q2-tooltip.css +5 -2
- package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js +51 -13
- package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js.map +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js +18 -13
- package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js.map +1 -1
- package/dist/collection/utils/helpers.js +65 -0
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/index.js +11 -11
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/collection/utils/sanitize-html-string.js +10 -0
- package/dist/collection/utils/sanitize-html-string.js.map +1 -0
- package/dist/collection/utils/sanitize-regex-string.js +4 -0
- package/dist/collection/utils/sanitize-regex-string.js.map +1 -0
- package/dist/components/index.js +8 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +11 -1356
- package/dist/components/index2.js.map +1 -1
- package/dist/components/q2-action-group.d.ts +11 -0
- package/dist/components/q2-action-group.js +75 -0
- package/dist/components/q2-action-group.js.map +1 -0
- package/dist/components/q2-action-sheet.js +1363 -2
- package/dist/components/q2-action-sheet.js.map +1 -1
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-btn2.js +1 -1
- package/dist/components/q2-carousel-pane.js +2 -2
- package/dist/components/q2-chart-area.js +1 -1
- package/dist/components/q2-chart-area.js.map +1 -1
- package/dist/components/q2-chart-bar.js +1 -1
- package/dist/components/q2-chart-bar.js.map +1 -1
- package/dist/components/q2-chart-donut.js +15 -15
- package/dist/components/q2-chart-donut.js.map +1 -1
- package/dist/components/q2-checkbox-group.js +2 -2
- package/dist/components/q2-checkbox-group.js.map +1 -1
- package/dist/components/q2-currency.js +1 -1
- package/dist/components/q2-data-table.js +64 -64
- package/dist/components/q2-data-table.js.map +1 -1
- package/dist/components/q2-detail.js +1 -1
- package/dist/components/q2-dropdown-item2.js +1 -1
- package/dist/components/q2-dropdown-item2.js.map +1 -1
- package/dist/components/q2-dropdown.js +84 -7
- package/dist/components/q2-dropdown.js.map +1 -1
- package/dist/components/q2-formatted-text.d.ts +11 -0
- package/dist/components/q2-formatted-text.js +101 -0
- package/dist/components/q2-formatted-text.js.map +1 -0
- package/dist/components/q2-input2.js +4 -5
- package/dist/components/q2-input2.js.map +1 -1
- package/dist/components/q2-item.js +1 -1
- package/dist/components/q2-legend2.js +2 -2
- package/dist/components/q2-legend2.js.map +1 -1
- package/dist/components/q2-link.d.ts +11 -0
- package/dist/components/q2-link.js +93 -0
- package/dist/components/q2-link.js.map +1 -0
- package/dist/components/q2-list.js +1 -1
- package/dist/components/q2-loc.js +1 -1
- package/dist/components/q2-message2.js +1 -1
- package/dist/components/q2-month-picker.js +2 -2
- package/dist/components/q2-optgroup2.js +1 -1
- package/dist/components/q2-option-list2.js +8 -3
- package/dist/components/q2-option-list2.js.map +1 -1
- package/dist/components/q2-option2.js +1 -1
- package/dist/components/q2-pagination.js +97 -10
- package/dist/components/q2-pagination.js.map +1 -1
- package/dist/components/q2-pill.js +29 -5
- package/dist/components/q2-pill.js.map +1 -1
- package/dist/components/q2-popover2.js +22 -12
- package/dist/components/q2-popover2.js.map +1 -1
- package/dist/components/q2-radio-group.js +2 -2
- package/dist/components/q2-radio-group.js.map +1 -1
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-resize-observer.d.ts +11 -0
- package/dist/components/q2-resize-observer.js +8 -0
- package/dist/components/q2-resize-observer.js.map +1 -0
- package/dist/components/q2-resize-observer2.js +112 -0
- package/dist/components/q2-resize-observer2.js.map +1 -0
- package/dist/components/q2-section.js +30 -4
- package/dist/components/q2-section.js.map +1 -1
- package/dist/components/q2-select2.js +7 -5
- package/dist/components/q2-select2.js.map +1 -1
- package/dist/components/q2-stepper-vertical.js +1 -1
- package/dist/components/q2-stepper.js +40 -3
- package/dist/components/q2-stepper.js.map +1 -1
- package/dist/components/q2-tab-container.js +20 -8
- package/dist/components/q2-tab-container.js.map +1 -1
- package/dist/components/q2-tab-pane.js +1 -1
- package/dist/components/q2-tag.js +3 -1
- package/dist/components/q2-tag.js.map +1 -1
- package/dist/components/q2-textarea.js +49 -12
- package/dist/components/q2-textarea.js.map +1 -1
- package/dist/components/q2-tooltip.js +1 -1
- package/dist/components/q2-tooltip.js.map +1 -1
- package/dist/components/tecton-tab-pane.js +2 -2
- package/dist/esm/click-elsewhere_2.entry.js +21 -12
- package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
- package/dist/esm/{index-c6d74f10.js → index-3184c760.js} +1 -1
- package/dist/esm/{index-c6d74f10.js.map → index-3184c760.js.map} +1 -1
- package/dist/esm/index-844fc010.js +211 -0
- package/dist/esm/index-844fc010.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-group.entry.js +46 -0
- package/dist/esm/q2-action-group.entry.js.map +1 -0
- package/dist/esm/q2-action-sheet.entry.js +1363 -2
- package/dist/esm/q2-action-sheet.entry.js.map +1 -1
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-badge_7.entry.js +23 -13
- package/dist/esm/q2-badge_7.entry.js.map +1 -1
- package/dist/esm/q2-calendar.entry.js +2 -2
- package/dist/esm/q2-card.entry.js +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +3 -3
- package/dist/esm/q2-carousel.entry.js +1 -1
- package/dist/esm/q2-chart-area.entry.js +2 -2
- package/dist/esm/q2-chart-area.entry.js.map +1 -1
- package/dist/esm/q2-chart-bar.entry.js +2 -2
- package/dist/esm/q2-chart-bar.entry.js.map +1 -1
- package/dist/esm/q2-chart-donut.entry.js +16 -16
- package/dist/esm/q2-chart-donut.entry.js.map +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +2 -2
- package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
- package/dist/esm/q2-checkbox.entry.js +1 -1
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +62 -62
- package/dist/esm/q2-data-table.entry.js.map +1 -1
- package/dist/esm/q2-detail.entry.js +2 -2
- package/dist/esm/q2-dropdown-item.entry.js +2 -2
- package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
- package/dist/esm/q2-dropdown.entry.js +79 -7
- package/dist/esm/q2-dropdown.entry.js.map +1 -1
- package/dist/esm/q2-editable-field.entry.js +1 -1
- package/dist/esm/q2-formatted-text.entry.js +68 -0
- package/dist/esm/q2-formatted-text.entry.js.map +1 -0
- package/dist/esm/q2-item.entry.js +2 -2
- package/dist/esm/q2-legend.entry.js +2 -2
- package/dist/esm/q2-legend.entry.js.map +1 -1
- package/dist/esm/q2-link.entry.js +60 -0
- package/dist/esm/q2-link.entry.js.map +1 -0
- package/dist/esm/q2-list.entry.js +2 -2
- package/dist/esm/q2-loc.entry.js +2 -2
- package/dist/esm/q2-message.entry.js +2 -2
- package/dist/esm/q2-month-picker.entry.js +3 -3
- package/dist/esm/q2-optgroup.entry.js +2 -2
- package/dist/esm/q2-option-list.entry.js +9 -4
- package/dist/esm/q2-option-list.entry.js.map +1 -1
- package/dist/esm/q2-option.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +90 -9
- package/dist/esm/q2-pagination.entry.js.map +1 -1
- package/dist/esm/q2-pill.entry.js +26 -5
- package/dist/esm/q2-pill.entry.js.map +1 -1
- package/dist/esm/q2-radio-group.entry.js +2 -2
- package/dist/esm/q2-radio-group.entry.js.map +1 -1
- package/dist/esm/q2-radio.entry.js +1 -1
- package/dist/esm/q2-relative-time.entry.js +3 -3
- package/dist/esm/q2-resize-observer.entry.js +92 -0
- package/dist/esm/q2-resize-observer.entry.js.map +1 -0
- package/dist/esm/q2-section.entry.js +27 -3
- package/dist/esm/q2-section.entry.js.map +1 -1
- package/dist/esm/q2-select.entry.js +7 -6
- package/dist/esm/q2-select.entry.js.map +1 -1
- package/dist/esm/q2-stepper-pane.entry.js +1 -1
- package/dist/esm/q2-stepper-vertical.entry.js +2 -2
- package/dist/esm/q2-stepper.entry.js +39 -3
- package/dist/esm/q2-stepper.entry.js.map +1 -1
- package/dist/esm/q2-tag.entry.js +3 -2
- package/dist/esm/q2-tag.entry.js.map +1 -1
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +47 -12
- package/dist/esm/q2-textarea.entry.js.map +1 -1
- package/dist/esm/q2-tooltip.entry.js +2 -2
- package/dist/esm/q2-tooltip.entry.js.map +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +2 -2
- package/dist/q2-tecton-elements/{p-0a3a804a.entry.js → p-06701928.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-0a3a804a.entry.js.map → p-06701928.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/{p-5d936af5.entry.js → p-07d1c3ae.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-1305f7ca.entry.js +2 -0
- package/dist/q2-tecton-elements/p-1305f7ca.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-15ac45d6.js +2 -0
- package/dist/q2-tecton-elements/p-15ac45d6.js.map +1 -0
- package/dist/q2-tecton-elements/{p-ce4e6b41.entry.js → p-16910682.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-16910682.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-188eb162.entry.js +3 -0
- package/dist/q2-tecton-elements/p-188eb162.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-58cafc0d.entry.js → p-1c760a89.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-074ae80c.entry.js → p-1c88d057.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-3b0d3cd4.entry.js → p-20a3d6ed.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-20a3d6ed.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-77a0cc0c.entry.js → p-2733583e.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-4116579f.entry.js → p-3e428290.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-3e428290.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-072c5877.entry.js → p-4774e5b3.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-77272c4c.entry.js → p-490ef8e5.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-0a1dff75.entry.js → p-4e10550d.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-4e10550d.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-2ca6d44f.entry.js → p-50f7328f.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-5637c486.entry.js +2 -0
- package/dist/q2-tecton-elements/p-5637c486.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-56df21b0.entry.js +2 -0
- package/dist/q2-tecton-elements/p-56df21b0.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-34856c71.entry.js → p-5a834214.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-34856c71.entry.js.map → p-5a834214.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/p-5f99a4a8.entry.js +2 -0
- package/dist/q2-tecton-elements/p-5f99a4a8.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-72d948b4.entry.js +2 -0
- package/dist/q2-tecton-elements/p-72d948b4.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-3c7be0bb.entry.js → p-7903cd15.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-7903cd15.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-d2e1631a.entry.js → p-7906f49e.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d2e1631a.entry.js.map → p-7906f49e.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/{p-2fcaf2d6.entry.js → p-7aef0c08.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-8a4b106d.entry.js → p-7c9a0122.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-7c9f8b62.entry.js +2 -0
- package/dist/q2-tecton-elements/p-7c9f8b62.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-cf32b5db.entry.js → p-81fbe718.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-81fbe718.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-6237c775.entry.js → p-896c7008.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-395904b4.entry.js → p-8d07cf91.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-fffb54e9.entry.js → p-8d2b02e1.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-6e6d9793.entry.js → p-95a7c042.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-45407ecc.entry.js → p-96b1406c.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-cb3f48de.entry.js → p-a47597dd.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-a47597dd.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-a5d0e252.entry.js +2 -0
- package/dist/q2-tecton-elements/p-a5d0e252.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-2c26295e.entry.js → p-ac6aa392.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-376a0589.entry.js → p-ad057d10.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-ad998f71.entry.js → p-b0e5e9dc.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-34696e3f.entry.js → p-b1784be3.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-259b728a.entry.js → p-b7de110e.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-8111547c.entry.js → p-c235ab3f.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-c5667d5d.entry.js +2 -0
- package/dist/q2-tecton-elements/p-c5667d5d.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-c81d299a.entry.js → p-e216ef3f.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-e2c800ef.entry.js +2 -0
- package/dist/q2-tecton-elements/p-e2c800ef.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-f135b265.entry.js +2 -0
- package/dist/q2-tecton-elements/p-f135b265.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-721365be.js → p-f1e887f5.js} +1 -1
- package/dist/q2-tecton-elements/{p-6b7c53a8.entry.js → p-f5f23659.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-f7867f21.entry.js +2 -0
- package/dist/q2-tecton-elements/p-f7867f21.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-ff8f1a32.entry.js +2 -0
- package/dist/q2-tecton-elements/p-ff8f1a32.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-fff01dc1.entry.js +2 -0
- package/dist/q2-tecton-elements/p-fff01dc1.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
- package/dist/types/components/q2-action-group/q2-action-group.d.ts +30 -0
- package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +1 -1
- package/dist/types/components/q2-chart-bar/q2-chart-bar.d.ts +1 -1
- package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +2 -0
- package/dist/types/components/q2-data-table/q2-data-table.d.ts +15 -13
- package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +41 -2
- package/dist/types/components/q2-formatted-text/q2-formatted-text.d.ts +34 -0
- package/dist/types/components/q2-input/q2-input.d.ts +10 -9
- package/dist/types/components/q2-legend/q2-legend.d.ts +1 -0
- package/dist/types/components/q2-link/q2-link.d.ts +36 -0
- package/dist/types/components/q2-pagination/q2-pagination.d.ts +60 -3
- package/dist/types/components/q2-pill/q2-pill.d.ts +11 -0
- package/dist/types/components/q2-popover/q2-popover.d.ts +7 -1
- package/dist/types/components/q2-resize-observer/q2-resize-observer.d.ts +28 -0
- package/dist/types/components/q2-section/q2-section.d.ts +12 -0
- package/dist/types/components/q2-select/q2-select.d.ts +5 -0
- package/dist/types/components/q2-stepper/q2-stepper.d.ts +10 -1
- package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +8 -2
- package/dist/types/components/q2-tag/q2-tag.d.ts +5 -0
- package/dist/types/components/q2-textarea/q2-textarea.d.ts +8 -3
- package/dist/types/components.d.ts +396 -18
- package/dist/types/utils/helpers.d.ts +28 -0
- package/dist/types/utils/index.d.ts +3 -3
- package/dist/types/utils/sanitize-html-string.d.ts +1 -0
- package/dist/types/utils/sanitize-regex-string.d.ts +1 -0
- package/package.json +4 -4
- package/dist/cjs/index-64d8b839.js +0 -1580
- package/dist/cjs/index-64d8b839.js.map +0 -1
- package/dist/esm/index-4a80972c.js +0 -1556
- package/dist/esm/index-4a80972c.js.map +0 -1
- package/dist/q2-tecton-elements/p-0a1dff75.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-3b0d3cd4.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-3c7be0bb.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-403bf3d4.entry.js +0 -2
- package/dist/q2-tecton-elements/p-403bf3d4.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-4116579f.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-661ed976.entry.js +0 -2
- package/dist/q2-tecton-elements/p-661ed976.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-9a1a4bc0.js +0 -3
- package/dist/q2-tecton-elements/p-9a1a4bc0.js.map +0 -1
- package/dist/q2-tecton-elements/p-a7a0b8aa.entry.js +0 -2
- package/dist/q2-tecton-elements/p-a7a0b8aa.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-aa57b657.entry.js +0 -2
- package/dist/q2-tecton-elements/p-aa57b657.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ad998f71.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-adec9275.entry.js +0 -2
- package/dist/q2-tecton-elements/p-adec9275.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-adf0a7c9.entry.js +0 -2
- package/dist/q2-tecton-elements/p-adf0a7c9.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-b72fd065.entry.js +0 -2
- package/dist/q2-tecton-elements/p-b72fd065.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-c0c658d1.entry.js +0 -2
- package/dist/q2-tecton-elements/p-c0c658d1.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-cb3f48de.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ce4e6b41.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-cf32b5db.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-cf966a0f.entry.js +0 -2
- package/dist/q2-tecton-elements/p-cf966a0f.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-dc77bf66.entry.js +0 -2
- package/dist/q2-tecton-elements/p-dc77bf66.entry.js.map +0 -1
- /package/dist/q2-tecton-elements/{p-5d936af5.entry.js.map → p-07d1c3ae.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-58cafc0d.entry.js.map → p-1c760a89.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-074ae80c.entry.js.map → p-1c88d057.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-77a0cc0c.entry.js.map → p-2733583e.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-072c5877.entry.js.map → p-4774e5b3.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-77272c4c.entry.js.map → p-490ef8e5.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-2ca6d44f.entry.js.map → p-50f7328f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-2fcaf2d6.entry.js.map → p-7aef0c08.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-8a4b106d.entry.js.map → p-7c9a0122.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-6237c775.entry.js.map → p-896c7008.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-395904b4.entry.js.map → p-8d07cf91.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-fffb54e9.entry.js.map → p-8d2b02e1.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-6e6d9793.entry.js.map → p-95a7c042.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-45407ecc.entry.js.map → p-96b1406c.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-2c26295e.entry.js.map → p-ac6aa392.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-376a0589.entry.js.map → p-ad057d10.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-34696e3f.entry.js.map → p-b1784be3.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-259b728a.entry.js.map → p-b7de110e.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-8111547c.entry.js.map → p-c235ab3f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-c81d299a.entry.js.map → p-e216ef3f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-721365be.js.map → p-f1e887f5.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-6b7c53a8.entry.js.map → p-f5f23659.entry.js.map} +0 -0
|
@@ -73,6 +73,87 @@ export class Q2Pagination {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
// #endregion
|
|
76
|
+
// #region Public Methods API
|
|
77
|
+
/**
|
|
78
|
+
* Emulates clicking the button that controls moving to the first page, and emitting a change event with the updated page number.
|
|
79
|
+
*
|
|
80
|
+
* If the `<button>` is disabled, this method does nothing.
|
|
81
|
+
* @testOnly
|
|
82
|
+
*/
|
|
83
|
+
async clickFirstPage() {
|
|
84
|
+
const button = this.firstPageBtn;
|
|
85
|
+
if (button === null || button === void 0 ? void 0 : button.disabled)
|
|
86
|
+
return;
|
|
87
|
+
button.click();
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Emulates clicking the button that controls moving to the last page, and emitting a change event with the updated page number.
|
|
91
|
+
*
|
|
92
|
+
* If the `<button>` is disabled, this method does nothing.
|
|
93
|
+
* @testOnly
|
|
94
|
+
*/
|
|
95
|
+
async clickLastPage() {
|
|
96
|
+
const button = this.lastPageBtn;
|
|
97
|
+
if (button === null || button === void 0 ? void 0 : button.disabled)
|
|
98
|
+
return;
|
|
99
|
+
button.click();
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Emulates clicking the button that controls moving to the next page, and emitting a change event with the updated page number.
|
|
103
|
+
*
|
|
104
|
+
* If the `<button>` is disabled, this method does nothing.
|
|
105
|
+
* @testOnly
|
|
106
|
+
*/
|
|
107
|
+
async clickNextPage() {
|
|
108
|
+
const button = this.nextPageBtn;
|
|
109
|
+
if (button === null || button === void 0 ? void 0 : button.disabled)
|
|
110
|
+
return;
|
|
111
|
+
button.click();
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Emulates clicking the button that controls moving to the previous page, and emitting a change event with the updated page number.
|
|
115
|
+
*
|
|
116
|
+
* If the `<button>` is disabled, this method does nothing.
|
|
117
|
+
* @testOnly
|
|
118
|
+
*/
|
|
119
|
+
async clickPreviousPage() {
|
|
120
|
+
const button = this.prevPageBtn;
|
|
121
|
+
if (button === null || button === void 0 ? void 0 : button.disabled)
|
|
122
|
+
return;
|
|
123
|
+
button.click();
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Emulates selecting a `perPage` value from the `perPageIncrements` dropdown,
|
|
127
|
+
* and updates the value of the `perPage` property.
|
|
128
|
+
*
|
|
129
|
+
* If `value` is not in the `perPageIncrements` array, this method does nothing.
|
|
130
|
+
* @testOnly
|
|
131
|
+
*/
|
|
132
|
+
async selectPerPageIncrementValue(value) {
|
|
133
|
+
var _a;
|
|
134
|
+
if (isNaN(value) || !this.showPerPageSelect || !this.perPageIncrements.includes(value))
|
|
135
|
+
return;
|
|
136
|
+
this.perPageSelect.focus();
|
|
137
|
+
this.perPageSelect.click();
|
|
138
|
+
const options = Array.from(this.perPageSelect.querySelectorAll('q2-option'));
|
|
139
|
+
(_a = options.find(option => option.value === `${value}`)) === null || _a === void 0 ? void 0 : _a.click();
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Emulates setting the page value in the `<input>` field,
|
|
143
|
+
* and emitting a change event with the updated page number.
|
|
144
|
+
*
|
|
145
|
+
* If `value` is invalid, this method does nothing.
|
|
146
|
+
* @testOnly
|
|
147
|
+
*/
|
|
148
|
+
async setPageValue(value) {
|
|
149
|
+
var _a, _b;
|
|
150
|
+
if (!this.inputField || isNaN(value) || value < 1 || value > this.totalPages)
|
|
151
|
+
return;
|
|
152
|
+
(_a = this.inputField) === null || _a === void 0 ? void 0 : _a.focus();
|
|
153
|
+
this.inputField.value = `${value}`;
|
|
154
|
+
(_b = this.inputField) === null || _b === void 0 ? void 0 : _b.blur();
|
|
155
|
+
}
|
|
156
|
+
// #endregion
|
|
76
157
|
// #region Watchers
|
|
77
158
|
manageResizeObserver() {
|
|
78
159
|
if (this.autoSize && !this.recordsOnly && !this.pagesOnly) {
|
|
@@ -119,6 +200,10 @@ export class Q2Pagination {
|
|
|
119
200
|
get recordTypeWithDefault() {
|
|
120
201
|
return this.recordType || loc('tecton.element.pagination.defaultRecordType');
|
|
121
202
|
}
|
|
203
|
+
get showPerPageSelect() {
|
|
204
|
+
var _a;
|
|
205
|
+
return ((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) > 1;
|
|
206
|
+
}
|
|
122
207
|
get totalPages() {
|
|
123
208
|
const { pagesOnly, totalWithDefault: total, perPageWithDefault: perPage, pages } = this;
|
|
124
209
|
if (pagesOnly && pages && !isNaN(parseInt(`${pages}`)))
|
|
@@ -139,21 +224,17 @@ export class Q2Pagination {
|
|
|
139
224
|
// #endregion
|
|
140
225
|
// #region Render Methods
|
|
141
226
|
renderPerPage() {
|
|
142
|
-
var _a;
|
|
143
|
-
if (!((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
144
|
-
return '';
|
|
145
|
-
}
|
|
146
227
|
this.perPageIncrements = this.perPageIncrements
|
|
147
228
|
.filter(perPage => !isNaN(perPage))
|
|
148
229
|
.map(perPage => perPage * 1)
|
|
149
230
|
.sort((a, b) => a - b);
|
|
150
231
|
if (this.perPage === undefined)
|
|
151
232
|
this.perPage = this.perPageIncrements[0];
|
|
152
|
-
return (h("q2-select", { onChange: this.handlePerPageChange, value: this.perPageIncrements.includes(this.perPage) ? `${this.perPage}` : undefined }, this.perPageIncrements.map(perPage => (h("q2-option", { value: `${perPage}`, display: `${loc('tecton.element.pagination.view')} ${perPage}` }, `${loc('tecton.element.pagination.view')} ${perPage}`)))));
|
|
233
|
+
return (h("q2-select", { ref: el => (this.perPageSelect = el), onChange: this.handlePerPageChange, value: this.perPageIncrements.includes(this.perPage) ? `${this.perPage}` : undefined }, this.perPageIncrements.map(perPage => (h("q2-option", { value: `${perPage}`, display: `${loc('tecton.element.pagination.view')} ${perPage}` }, `${loc('tecton.element.pagination.view')} ${perPage}`)))));
|
|
153
234
|
}
|
|
154
235
|
render() {
|
|
155
236
|
var _a;
|
|
156
|
-
const { pagesOnly, recordsOnly, isFullViewHidden, recordTypeWithDefault: recordType, totalPages, totalWithDefault: total, pageWithDefault: page, currentRange, nextRange, prevRange, } = this;
|
|
237
|
+
const { pagesOnly, recordsOnly, isFullViewHidden, recordTypeWithDefault: recordType, totalPages, totalWithDefault: total, pageWithDefault: page, currentRange, nextRange, prevRange, showPerPageSelect, } = this;
|
|
157
238
|
const onFirstPage = page === 1;
|
|
158
239
|
const onLastPage = page === totalPages;
|
|
159
240
|
let nextButtonLabel = loc('tecton.element.pagination.goToNext');
|
|
@@ -174,7 +255,7 @@ export class Q2Pagination {
|
|
|
174
255
|
total,
|
|
175
256
|
});
|
|
176
257
|
}
|
|
177
|
-
return (h("nav", { key: '
|
|
258
|
+
return (h("nav", { key: '417a7242c4873c1f2d4c12382f63f5e7534bda04', class: "container", ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: '5234d2c6d9f2249788d52970f69be1a0d38ad52e', class: "description", "test-id": "description" }, pagesOnly
|
|
178
259
|
? loc('tecton.element.pagination.pages', {
|
|
179
260
|
current: page,
|
|
180
261
|
total: totalPages,
|
|
@@ -183,7 +264,7 @@ export class Q2Pagination {
|
|
|
183
264
|
range: currentRange,
|
|
184
265
|
recordType: recordType.toLowerCase(),
|
|
185
266
|
total: total.toLocaleString(),
|
|
186
|
-
})), h("div", { key: '
|
|
267
|
+
})), h("div", { key: 'f1809000bd2d37a8eedad140329ef72ad326bb6b', class: "btn-group" }, h("q2-btn", { key: '62612892b86508d1a834f18e9c242812ac339a21', ref: el => (this.firstPageBtn = el), label: loc('tecton.element.pagination.goToFirstPage'), disabled: onFirstPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(1), "test-id": "firstPageBtn", "hide-label": true }, h("q2-icon", { key: '2ff44c03d569a60d28b411b233818e8a8ed09af6', type: "chevron-double-left" })), h("q2-btn", { key: 'e36a4f8c021fd18248f4fc864aff5f194f248095', ref: el => (this.prevPageBtn = el), label: prevButtonLabel, disabled: onFirstPage, onClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: 'd103f86c52b8ed6809552126de4d3b52cda6b724', type: "chevron-left" }))), h("div", { key: 'e6f515d392ddb8e4a97b6406e6c7ed09503c4f9f', class: "controls", hidden: isFullViewHidden, "test-id": "controls" }, h("span", { key: '1ad86adf8bd04f8c658b8035d6f4c878b7214e38', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: '3d701869101717b2c4f73478e33013a923fd8f44', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: '63cf49a1292cc983fba7214116b73d423cabc64c', ref: el => (this.inputField = el), type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${loc('tecton.element.pagination.page')} (${loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => this.handlePageChange(event.detail.value), "test-id": "pageInput", current: "page" })), h("span", { key: '526fd412a6dd8312d6bcf7a5c8baff1257642e4a', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: '069656ae8ee3523040eed22b8f2436fdde926358', class: "btn-group" }, h("q2-btn", { key: 'f215824b3c39eaf84cb6e974912ad2cd3e0ea71a', ref: el => (this.nextPageBtn = el), label: nextButtonLabel, disabled: onLastPage, onClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: 'd6d32de9af991e629b00632514ed2a96be42b825', type: "chevron-right" })), h("q2-btn", { key: '74ad02e29e5fadb2bff39cee2d7c6d2f62139bb7', ref: el => (this.lastPageBtn = el), label: "tecton.element.pagination.goToLastPage", disabled: onLastPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(totalPages), "test-id": "lastPageBtn", "hide-label": true }, h("q2-icon", { key: '970487bac61e8ad48acc77ce34f67a16f2d57dda', type: "chevron-double-right" }))), h("div", { key: 'dbd712331f2f14a3db1c8a247d36d7457fedeb8e', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, showPerPageSelect && this.renderPerPage())));
|
|
187
268
|
}
|
|
188
269
|
static get is() { return "q2-pagination"; }
|
|
189
270
|
static get encapsulation() { return "shadow"; }
|
|
@@ -283,14 +364,14 @@ export class Q2Pagination {
|
|
|
283
364
|
"optional": false,
|
|
284
365
|
"docs": {
|
|
285
366
|
"tags": [],
|
|
286
|
-
"text": "Indicates to only
|
|
367
|
+
"text": "Indicates to display only the current and total pages."
|
|
287
368
|
},
|
|
288
369
|
"attribute": "pages-only",
|
|
289
370
|
"reflect": true
|
|
290
371
|
},
|
|
291
372
|
"perPage": {
|
|
292
373
|
"type": "number",
|
|
293
|
-
"mutable":
|
|
374
|
+
"mutable": true,
|
|
294
375
|
"complexType": {
|
|
295
376
|
"original": "number",
|
|
296
377
|
"resolved": "number",
|
|
@@ -303,7 +384,7 @@ export class Q2Pagination {
|
|
|
303
384
|
"text": "The total number of records displayed on each page."
|
|
304
385
|
},
|
|
305
386
|
"attribute": "per-page",
|
|
306
|
-
"reflect":
|
|
387
|
+
"reflect": true
|
|
307
388
|
},
|
|
308
389
|
"perPageIncrements": {
|
|
309
390
|
"type": "unknown",
|
|
@@ -316,8 +397,11 @@ export class Q2Pagination {
|
|
|
316
397
|
"required": false,
|
|
317
398
|
"optional": false,
|
|
318
399
|
"docs": {
|
|
319
|
-
"tags": [
|
|
320
|
-
|
|
400
|
+
"tags": [{
|
|
401
|
+
"name": "snippet",
|
|
402
|
+
"text": "this.perPageIncrements = [10, 25, 50];"
|
|
403
|
+
}],
|
|
404
|
+
"text": "A list of perPage values.\nThis generates a [Select](https://tecton.q2developer.com/design-system/q2-select/) element that allows the user to modify the `perPage` value.\n\n**Example:**"
|
|
321
405
|
}
|
|
322
406
|
},
|
|
323
407
|
"recordsOnly": {
|
|
@@ -332,7 +416,7 @@ export class Q2Pagination {
|
|
|
332
416
|
"optional": false,
|
|
333
417
|
"docs": {
|
|
334
418
|
"tags": [],
|
|
335
|
-
"text": "Indicates to only
|
|
419
|
+
"text": "Indicates to display only the current and total records."
|
|
336
420
|
},
|
|
337
421
|
"attribute": "records-only",
|
|
338
422
|
"reflect": true
|
|
@@ -399,6 +483,138 @@ export class Q2Pagination {
|
|
|
399
483
|
}
|
|
400
484
|
}];
|
|
401
485
|
}
|
|
486
|
+
static get methods() {
|
|
487
|
+
return {
|
|
488
|
+
"clickFirstPage": {
|
|
489
|
+
"complexType": {
|
|
490
|
+
"signature": "() => Promise<void>",
|
|
491
|
+
"parameters": [],
|
|
492
|
+
"references": {
|
|
493
|
+
"Promise": {
|
|
494
|
+
"location": "global",
|
|
495
|
+
"id": "global::Promise"
|
|
496
|
+
}
|
|
497
|
+
},
|
|
498
|
+
"return": "Promise<void>"
|
|
499
|
+
},
|
|
500
|
+
"docs": {
|
|
501
|
+
"text": "Emulates clicking the button that controls moving to the first page, and emitting a change event with the updated page number.\n\nIf the `<button>` is disabled, this method does nothing.",
|
|
502
|
+
"tags": [{
|
|
503
|
+
"name": "testOnly",
|
|
504
|
+
"text": undefined
|
|
505
|
+
}]
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
"clickLastPage": {
|
|
509
|
+
"complexType": {
|
|
510
|
+
"signature": "() => Promise<void>",
|
|
511
|
+
"parameters": [],
|
|
512
|
+
"references": {
|
|
513
|
+
"Promise": {
|
|
514
|
+
"location": "global",
|
|
515
|
+
"id": "global::Promise"
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
"return": "Promise<void>"
|
|
519
|
+
},
|
|
520
|
+
"docs": {
|
|
521
|
+
"text": "Emulates clicking the button that controls moving to the last page, and emitting a change event with the updated page number.\n\nIf the `<button>` is disabled, this method does nothing.",
|
|
522
|
+
"tags": [{
|
|
523
|
+
"name": "testOnly",
|
|
524
|
+
"text": undefined
|
|
525
|
+
}]
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
"clickNextPage": {
|
|
529
|
+
"complexType": {
|
|
530
|
+
"signature": "() => Promise<void>",
|
|
531
|
+
"parameters": [],
|
|
532
|
+
"references": {
|
|
533
|
+
"Promise": {
|
|
534
|
+
"location": "global",
|
|
535
|
+
"id": "global::Promise"
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
"return": "Promise<void>"
|
|
539
|
+
},
|
|
540
|
+
"docs": {
|
|
541
|
+
"text": "Emulates clicking the button that controls moving to the next page, and emitting a change event with the updated page number.\n\nIf the `<button>` is disabled, this method does nothing.",
|
|
542
|
+
"tags": [{
|
|
543
|
+
"name": "testOnly",
|
|
544
|
+
"text": undefined
|
|
545
|
+
}]
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
"clickPreviousPage": {
|
|
549
|
+
"complexType": {
|
|
550
|
+
"signature": "() => Promise<void>",
|
|
551
|
+
"parameters": [],
|
|
552
|
+
"references": {
|
|
553
|
+
"Promise": {
|
|
554
|
+
"location": "global",
|
|
555
|
+
"id": "global::Promise"
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
"return": "Promise<void>"
|
|
559
|
+
},
|
|
560
|
+
"docs": {
|
|
561
|
+
"text": "Emulates clicking the button that controls moving to the previous page, and emitting a change event with the updated page number.\n\nIf the `<button>` is disabled, this method does nothing.",
|
|
562
|
+
"tags": [{
|
|
563
|
+
"name": "testOnly",
|
|
564
|
+
"text": undefined
|
|
565
|
+
}]
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
"selectPerPageIncrementValue": {
|
|
569
|
+
"complexType": {
|
|
570
|
+
"signature": "(value: number) => Promise<void>",
|
|
571
|
+
"parameters": [{
|
|
572
|
+
"name": "value",
|
|
573
|
+
"type": "number",
|
|
574
|
+
"docs": ""
|
|
575
|
+
}],
|
|
576
|
+
"references": {
|
|
577
|
+
"Promise": {
|
|
578
|
+
"location": "global",
|
|
579
|
+
"id": "global::Promise"
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
"return": "Promise<void>"
|
|
583
|
+
},
|
|
584
|
+
"docs": {
|
|
585
|
+
"text": "Emulates selecting a `perPage` value from the `perPageIncrements` dropdown,\nand updates the value of the `perPage` property.\n\nIf `value` is not in the `perPageIncrements` array, this method does nothing.",
|
|
586
|
+
"tags": [{
|
|
587
|
+
"name": "testOnly",
|
|
588
|
+
"text": undefined
|
|
589
|
+
}]
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
"setPageValue": {
|
|
593
|
+
"complexType": {
|
|
594
|
+
"signature": "(value: number) => Promise<void>",
|
|
595
|
+
"parameters": [{
|
|
596
|
+
"name": "value",
|
|
597
|
+
"type": "number",
|
|
598
|
+
"docs": ""
|
|
599
|
+
}],
|
|
600
|
+
"references": {
|
|
601
|
+
"Promise": {
|
|
602
|
+
"location": "global",
|
|
603
|
+
"id": "global::Promise"
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
"return": "Promise<void>"
|
|
607
|
+
},
|
|
608
|
+
"docs": {
|
|
609
|
+
"text": "Emulates setting the page value in the `<input>` field,\nand emitting a change event with the updated page number.\n\nIf `value` is invalid, this method does nothing.",
|
|
610
|
+
"tags": [{
|
|
611
|
+
"name": "testOnly",
|
|
612
|
+
"text": undefined
|
|
613
|
+
}]
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
};
|
|
617
|
+
}
|
|
402
618
|
static get elementRef() { return "hostElement"; }
|
|
403
619
|
static get watchers() {
|
|
404
620
|
return [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"q2-pagination.js","sourceRoot":"","sources":["../../../src/components/q2-pagination/q2-pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,KAAK,EACL,IAAI,EACJ,CAAC,EAED,KAAK,EACL,MAAM,EACN,OAAO,EACP,KAAK,GAER,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG9E,MAAM,OAAO,YAAY;;QAkLrB,cAAS,GAAG,GAAG,EAAE;YACb,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC;YAC/C,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,WAAW,CAAC;YACpE,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC;YAC7B,IAAI,aAAa;gBAAE,OAAO;YAE1B,SAAS,CAAC,GAAG,EAAE;gBACX,MAAM,2BAA2B,GAAG,IAAI,CAAC,cAAc,KAAK,gBAAgB,CAAC,WAAW,CAAC;gBACzF,IAAI,2BAA2B;oBAAE,OAAO;gBACxC,IAAI,CAAC,cAAc,GAAG,gBAAgB,CAAC,WAAW,CAAC;gBACnD,IAAI,CAAC,SAAS,EAAE,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC;QAEF,qBAAgB,GAAG,CAAC,IAAY,EAAE,EAAE;YAChC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;YACxC,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;gBACX,IAAI,GAAG,CAAC,CAA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N,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import {\n Component,\n State,\n Prop,\n h,\n ComponentInterface,\n Watch,\n Listen,\n Element,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { isEventFromElement, loc, nextPaint, overrideFocus } from 'src/utils';\n\n@Component({ tag: 'q2-pagination', shadow: true, styleUrl: 'q2-pagination.scss' })\nexport class Q2Pagination implements ComponentInterface {\n // #region Own Properties\n\n containerElement: HTMLElement;\n containerWidth: number;\n inputField: HTMLQ2InputElement;\n resizeObserver: ResizeObserver;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n isSmall: boolean;\n\n // #endregion\n // #region Public Property API\n\n /** Indicates the horizontal alignment of children elements */\n @Prop()\n alignment: string;\n\n /** Determines whether the component uses the dynamic resizing behavior. */\n @Prop({ reflect: true, mutable: true })\n autoSize: boolean = true;\n\n /** The current page that is being displayed. */\n @Prop({ reflect: true, mutable: true })\n page: number;\n\n /**\n * The number of pages that can be displayed.\n * @info\n * Only referenced when `pagesOnly` is true.\n */\n @Prop({ reflect: true, mutable: true })\n pages: number;\n\n /** Indicates to only display the current and total pages. */\n @Prop({ reflect: true, mutable: true })\n pagesOnly: boolean;\n\n /** The total number of records displayed on each page. */\n @Prop()\n perPage: number;\n\n /** The list of perPage to operate pagination. e.g.) [10, 25, 50] */\n @Prop()\n perPageIncrements: number[];\n\n /** Indicates to only display the current and total records. */\n @Prop({ reflect: true, mutable: true })\n recordsOnly: boolean;\n\n /** Description of the record type to be displayed alongside the record count. */\n @Prop()\n recordType: string;\n\n /** The total number of records to paginate. */\n @Prop({ reflect: true })\n total: number;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the page is changed.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ page: number }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeResizeObserver();\n }\n\n componentWillLoad(): void {\n this.manageResizeObserver();\n }\n\n componentDidLoad(): void {\n this.containerWidth = this.containerElement.clientWidth;\n\n overrideFocus(this.hostElement);\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('focus')\n onHostElementFocus(event) {\n if (!isEventFromElement(event, this.hostElement)) return;\n const { isFullViewHidden, containerElement, inputField } = this;\n if (isFullViewHidden) {\n containerElement.querySelector<HTMLElement>('q2-btn:not([disabled])')?.focus();\n } else {\n inputField.focus();\n }\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('recordsOnly')\n @Watch('pagesOnly')\n @Watch('autoSize')\n manageResizeObserver() {\n if (this.autoSize && !this.recordsOnly && !this.pagesOnly) {\n if (this.resizeObserver) return;\n this.resizeObserver = new ResizeObserver(() => this.checkSize());\n this.resizeObserver.observe(this.hostElement);\n window.addEventListener('resize', this.checkSize);\n } else {\n this.isSmall = false;\n this.removeResizeObserver();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get currentRange() {\n const { perPageWithDefault: perPage, totalWithDefault: total, pageWithDefault: page } = this;\n const start = (page - 1) * perPage + 1;\n const end = Math.min(page * perPage, total);\n return `${start} - ${end}`;\n }\n\n get isFullViewHidden() {\n return this.isSmall || this.recordsOnly || this.pagesOnly;\n }\n\n get nextRange() {\n const { perPageWithDefault: perPage, totalWithDefault: total, pageWithDefault: page } = this;\n const start = page * perPage + 1;\n const end = Math.min((page + 1) * perPage, total);\n return `${start} - ${end}`;\n }\n\n get pageWithDefault() {\n return this.page || 1;\n }\n\n get perPageWithDefault() {\n return this.perPage || 10;\n }\n\n get prevRange() {\n const { perPageWithDefault: perPage, pageWithDefault: page } = this;\n const start = Math.max(1, (page - 2) * perPage + 1);\n const end = (page - 1) * perPage;\n return `${start} - ${end}`;\n }\n\n get recordTypeWithDefault() {\n return this.recordType || loc('tecton.element.pagination.defaultRecordType');\n }\n\n get totalPages() {\n const { pagesOnly, totalWithDefault: total, perPageWithDefault: perPage, pages } = this;\n\n if (pagesOnly && pages && !isNaN(parseInt(`${pages}`))) return pages;\n\n return Math.ceil(total / perPage);\n }\n\n get totalWithDefault() {\n return this.total || 0;\n }\n\n checkSize = () => {\n const { hostElement, containerElement } = this;\n const isOverflowing = this.containerWidth > hostElement.clientWidth;\n this.isSmall = isOverflowing;\n if (isOverflowing) return;\n\n nextPaint(() => {\n const containerWidthHasNotChanged = this.containerWidth === containerElement.clientWidth;\n if (containerWidthHasNotChanged) return;\n this.containerWidth = containerElement.clientWidth;\n this.checkSize();\n });\n };\n\n handlePageChange = (page: number) => {\n const { totalPages, inputField } = this;\n if (page < 1) {\n page = 1;\n } else if (page > totalPages) {\n page = totalPages;\n }\n\n if (inputField.value !== `${page}`) inputField.value = `${page}`;\n\n if (!this.hostElement.onchange) {\n this.page = page;\n }\n\n this.change.emit({ page });\n };\n\n handlePerPageChange = (event: CustomEvent) => {\n this.perPage = event.detail.value * 1;\n };\n\n removeResizeObserver() {\n if (this.resizeObserver) {\n this.resizeObserver?.unobserve(this.hostElement);\n this.resizeObserver = null;\n window.removeEventListener('resize', this.checkSize);\n }\n }\n\n // #endregion\n // #region Render Methods\n\n renderPerPage() {\n if (!this.perPageIncrements?.length) {\n return '';\n }\n this.perPageIncrements = this.perPageIncrements\n .filter(perPage => !isNaN(perPage))\n .map(perPage => perPage * 1)\n .sort((a, b) => a - b);\n if (this.perPage === undefined) this.perPage = this.perPageIncrements[0];\n return (\n <q2-select\n onChange={this.handlePerPageChange}\n value={this.perPageIncrements.includes(this.perPage) ? `${this.perPage}` : undefined}\n >\n {this.perPageIncrements.map(perPage => (\n <q2-option\n value={`${perPage}`}\n display={`${loc('tecton.element.pagination.view')} ${perPage}`}\n >{`${loc('tecton.element.pagination.view')} ${perPage}`}</q2-option>\n ))}\n </q2-select>\n );\n }\n\n render() {\n const {\n pagesOnly,\n recordsOnly,\n isFullViewHidden,\n recordTypeWithDefault: recordType,\n totalPages,\n totalWithDefault: total,\n pageWithDefault: page,\n currentRange,\n nextRange,\n prevRange,\n } = this;\n const onFirstPage = page === 1;\n const onLastPage = page === totalPages;\n\n let nextButtonLabel: string = loc('tecton.element.pagination.goToNext');\n let prevButtonLabel: string = loc('tecton.element.pagination.goToPrevious');\n if (pagesOnly) {\n prevButtonLabel = loc('tecton.element.pagination.goToPages', { next: page - 1, total: totalPages });\n nextButtonLabel = loc('tecton.element.pagination.goToPages', { next: page + 1, total: totalPages });\n } else if (recordsOnly) {\n prevButtonLabel = loc('tecton.element.pagination.goToRecords', {\n range: prevRange,\n recordType: recordType.toLowerCase(),\n total,\n });\n nextButtonLabel = loc('tecton.element.pagination.goToRecords', {\n range: nextRange,\n recordType: recordType.toLowerCase(),\n total,\n });\n }\n\n return (\n <nav\n class=\"container\"\n ref={el => (this.containerElement = el)}\n aria-label={loc('tecton.element.pagination.title')}\n >\n <div\n class=\"description\"\n test-id=\"description\"\n >\n {pagesOnly\n ? loc('tecton.element.pagination.pages', {\n current: page,\n total: totalPages,\n })\n : loc('tecton.element.pagination.description', {\n range: currentRange,\n recordType: recordType.toLowerCase(),\n total: total.toLocaleString(),\n })}\n </div>\n <div class=\"btn-group\">\n <q2-btn\n label={loc('tecton.element.pagination.goToFirstPage')}\n disabled={onFirstPage}\n hidden={isFullViewHidden}\n onClick={() => this.handlePageChange(1)}\n test-id=\"firstPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-double-left\" />\n </q2-btn>\n <q2-btn\n label={prevButtonLabel}\n disabled={onFirstPage}\n onClick={() => this.handlePageChange(page - 1)}\n test-id=\"prevPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-left\" />\n </q2-btn>\n </div>\n <div\n class=\"controls\"\n hidden={isFullViewHidden}\n test-id=\"controls\"\n >\n <span aria-hidden=\"true\">{loc('tecton.element.pagination.page')}</span>\n <div\n class=\"input-wrapper\"\n onClick={() => this.inputField.dispatchEvent(new FocusEvent('focus'))}\n >\n <q2-input\n type=\"number\"\n value={`${page}`}\n min={1}\n max={this.totalPages}\n hideLabel\n optional\n label={`${loc('tecton.element.pagination.page')} (${loc(\n 'tecton.element.pagination.ofPages',\n [totalPages.toLocaleString()]\n )})`}\n onChange={event => this.handlePageChange(event.detail.value)}\n test-id=\"pageInput\"\n current=\"page\"\n ref={el => (this.inputField = el)}\n ></q2-input>\n </div>\n <span aria-hidden=\"true\">\n {loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])}\n </span>\n </div>\n <div class=\"btn-group\">\n <q2-btn\n label={nextButtonLabel}\n disabled={onLastPage}\n onClick={() => this.handlePageChange(page + 1)}\n test-id=\"nextPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-right\" />\n </q2-btn>\n <q2-btn\n label=\"tecton.element.pagination.goToLastPage\"\n disabled={onLastPage}\n hidden={isFullViewHidden}\n onClick={() => this.handlePageChange(totalPages)}\n test-id=\"lastPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-double-right\" />\n </q2-btn>\n </div>\n <div\n class=\"per-page\"\n hidden={isFullViewHidden || !this.perPageIncrements?.length}\n >\n {this.renderPerPage()}\n </div>\n </nav>\n );\n }\n\n // #endregion\n}\n"]}
|
|
1
|
+
{"version":3,"file":"q2-pagination.js","sourceRoot":"","sources":["../../../src/components/q2-pagination/q2-pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,KAAK,EACL,IAAI,EACJ,CAAC,EAED,KAAK,EACL,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,GAER,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG9E,MAA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EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,EAClC,KAAK,EAAC,wCAAwC,EAC9C,QAAQ,EAAE,UAAU,EACpB,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,aACxC,aAAa;oBAGrB,gEAAS,IAAI,EAAC,sBAAsB,GAAG,CAClC,CACP;YACN,4DACI,KAAK,EAAC,UAAU,EAChB,MAAM,EAAE,gBAAgB,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,iBAAiB,0CAAE,MAAM,CAAA,IAE1D,iBAAiB,IAAI,IAAI,CAAC,aAAa,EAAE,CACxC,CACJ,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import {\n Component,\n State,\n Prop,\n h,\n ComponentInterface,\n Watch,\n Listen,\n Element,\n Method,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { isEventFromElement, loc, nextPaint, overrideFocus } from 'src/utils';\n\n@Component({ tag: 'q2-pagination', shadow: true, styleUrl: 'q2-pagination.scss' })\nexport class Q2Pagination implements ComponentInterface {\n // #region Own Properties\n\n containerElement: HTMLElement;\n containerWidth: number;\n firstPageBtn: HTMLQ2BtnElement;\n inputField: HTMLQ2InputElement;\n lastPageBtn: HTMLQ2BtnElement;\n nextPageBtn: HTMLQ2BtnElement;\n perPageSelect: HTMLQ2SelectElement;\n prevPageBtn: HTMLQ2BtnElement;\n resizeObserver: ResizeObserver;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n isSmall: boolean;\n\n // #endregion\n // #region Public Property API\n\n /** Indicates the horizontal alignment of children elements */\n @Prop()\n alignment: string;\n\n /** Determines whether the component uses the dynamic resizing behavior. */\n @Prop({ reflect: true, mutable: true })\n autoSize: boolean = true;\n\n /** The current page that is being displayed. */\n @Prop({ reflect: true, mutable: true })\n page: number;\n\n /**\n * The number of pages that can be displayed.\n * @info\n * Only referenced when `pagesOnly` is true.\n */\n @Prop({ reflect: true, mutable: true })\n pages: number;\n\n /** Indicates to display only the current and total pages. */\n @Prop({ reflect: true, mutable: true })\n pagesOnly: boolean;\n\n /** The total number of records displayed on each page. */\n @Prop({ reflect: true, mutable: true })\n perPage: number;\n\n /**\n * A list of perPage values.\n * This generates a [Select](https://tecton.q2developer.com/design-system/q2-select/) element that allows the user to modify the `perPage` value.\n *\n * **Example:**\n * @snippet\n * this.perPageIncrements = [10, 25, 50];\n */\n @Prop()\n perPageIncrements: number[];\n\n /** Indicates to display only the current and total records. */\n @Prop({ reflect: true, mutable: true })\n recordsOnly: boolean;\n\n /** Description of the record type to be displayed alongside the record count. */\n @Prop()\n recordType: string;\n\n /** The total number of records to paginate. */\n @Prop({ reflect: true })\n total: number;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the page is changed.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ page: number }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeResizeObserver();\n }\n\n componentWillLoad(): void {\n this.manageResizeObserver();\n }\n\n componentDidLoad(): void {\n this.containerWidth = this.containerElement.clientWidth;\n\n overrideFocus(this.hostElement);\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('focus')\n onHostElementFocus(event) {\n if (!isEventFromElement(event, this.hostElement)) return;\n const { isFullViewHidden, containerElement, inputField } = this;\n if (isFullViewHidden) {\n containerElement.querySelector<HTMLElement>('q2-btn:not([disabled])')?.focus();\n } else {\n inputField.focus();\n }\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates clicking the button that controls moving to the first page, and emitting a change event with the updated page number.\n *\n * If the `<button>` is disabled, this method does nothing.\n * @testOnly\n */\n @Method()\n async clickFirstPage() {\n const button = this.firstPageBtn;\n if (button?.disabled) return;\n button.click();\n }\n\n /**\n * Emulates clicking the button that controls moving to the last page, and emitting a change event with the updated page number.\n *\n * If the `<button>` is disabled, this method does nothing.\n * @testOnly\n */\n @Method()\n async clickLastPage() {\n const button = this.lastPageBtn;\n if (button?.disabled) return;\n button.click();\n }\n\n /**\n * Emulates clicking the button that controls moving to the next page, and emitting a change event with the updated page number.\n *\n * If the `<button>` is disabled, this method does nothing.\n * @testOnly\n */\n @Method()\n async clickNextPage() {\n const button = this.nextPageBtn;\n if (button?.disabled) return;\n button.click();\n }\n\n /**\n * Emulates clicking the button that controls moving to the previous page, and emitting a change event with the updated page number.\n *\n * If the `<button>` is disabled, this method does nothing.\n * @testOnly\n */\n @Method()\n async clickPreviousPage() {\n const button = this.prevPageBtn;\n if (button?.disabled) return;\n button.click();\n }\n\n /**\n * Emulates selecting a `perPage` value from the `perPageIncrements` dropdown,\n * and updates the value of the `perPage` property.\n *\n * If `value` is not in the `perPageIncrements` array, this method does nothing.\n * @testOnly\n */\n @Method()\n async selectPerPageIncrementValue(value: number) {\n if (isNaN(value) || !this.showPerPageSelect || !this.perPageIncrements.includes(value)) return;\n this.perPageSelect.focus();\n this.perPageSelect.click();\n const options = Array.from(this.perPageSelect.querySelectorAll('q2-option'));\n options.find(option => option.value === `${value}`)?.click();\n }\n\n /**\n * Emulates setting the page value in the `<input>` field,\n * and emitting a change event with the updated page number.\n *\n * If `value` is invalid, this method does nothing.\n * @testOnly\n */\n @Method()\n async setPageValue(value: number) {\n if (!this.inputField || isNaN(value) || value < 1 || value > this.totalPages) return;\n this.inputField?.focus();\n this.inputField.value = `${value}`;\n this.inputField?.blur();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('recordsOnly')\n @Watch('pagesOnly')\n @Watch('autoSize')\n manageResizeObserver() {\n if (this.autoSize && !this.recordsOnly && !this.pagesOnly) {\n if (this.resizeObserver) return;\n this.resizeObserver = new ResizeObserver(() => this.checkSize());\n this.resizeObserver.observe(this.hostElement);\n window.addEventListener('resize', this.checkSize);\n } else {\n this.isSmall = false;\n this.removeResizeObserver();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get currentRange() {\n const { perPageWithDefault: perPage, totalWithDefault: total, pageWithDefault: page } = this;\n const start = (page - 1) * perPage + 1;\n const end = Math.min(page * perPage, total);\n return `${start} - ${end}`;\n }\n\n get isFullViewHidden() {\n return this.isSmall || this.recordsOnly || this.pagesOnly;\n }\n\n get nextRange() {\n const { perPageWithDefault: perPage, totalWithDefault: total, pageWithDefault: page } = this;\n const start = page * perPage + 1;\n const end = Math.min((page + 1) * perPage, total);\n return `${start} - ${end}`;\n }\n\n get pageWithDefault() {\n return this.page || 1;\n }\n\n get perPageWithDefault() {\n return this.perPage || 10;\n }\n\n get prevRange() {\n const { perPageWithDefault: perPage, pageWithDefault: page } = this;\n const start = Math.max(1, (page - 2) * perPage + 1);\n const end = (page - 1) * perPage;\n return `${start} - ${end}`;\n }\n\n get recordTypeWithDefault() {\n return this.recordType || loc('tecton.element.pagination.defaultRecordType');\n }\n\n get showPerPageSelect() {\n return this.perPageIncrements?.length > 1;\n }\n\n get totalPages() {\n const { pagesOnly, totalWithDefault: total, perPageWithDefault: perPage, pages } = this;\n\n if (pagesOnly && pages && !isNaN(parseInt(`${pages}`))) return pages;\n\n return Math.ceil(total / perPage);\n }\n\n get totalWithDefault() {\n return this.total || 0;\n }\n\n checkSize = () => {\n const { hostElement, containerElement } = this;\n const isOverflowing = this.containerWidth > hostElement.clientWidth;\n this.isSmall = isOverflowing;\n if (isOverflowing) return;\n\n nextPaint(() => {\n const containerWidthHasNotChanged = this.containerWidth === containerElement.clientWidth;\n if (containerWidthHasNotChanged) return;\n this.containerWidth = containerElement.clientWidth;\n this.checkSize();\n });\n };\n\n handlePageChange = (page: number) => {\n const { totalPages, inputField } = this;\n if (page < 1) {\n page = 1;\n } else if (page > totalPages) {\n page = totalPages;\n }\n\n if (inputField.value !== `${page}`) inputField.value = `${page}`;\n\n if (!this.hostElement.onchange) {\n this.page = page;\n }\n\n this.change.emit({ page });\n };\n\n handlePerPageChange = (event: CustomEvent) => {\n this.perPage = event.detail.value * 1;\n };\n\n removeResizeObserver() {\n if (this.resizeObserver) {\n this.resizeObserver?.unobserve(this.hostElement);\n this.resizeObserver = null;\n window.removeEventListener('resize', this.checkSize);\n }\n }\n\n // #endregion\n // #region Render Methods\n\n renderPerPage() {\n this.perPageIncrements = this.perPageIncrements\n .filter(perPage => !isNaN(perPage))\n .map(perPage => perPage * 1)\n .sort((a, b) => a - b);\n if (this.perPage === undefined) this.perPage = this.perPageIncrements[0];\n return (\n <q2-select\n ref={el => (this.perPageSelect = el)}\n onChange={this.handlePerPageChange}\n value={this.perPageIncrements.includes(this.perPage) ? `${this.perPage}` : undefined}\n >\n {this.perPageIncrements.map(perPage => (\n <q2-option\n value={`${perPage}`}\n display={`${loc('tecton.element.pagination.view')} ${perPage}`}\n >{`${loc('tecton.element.pagination.view')} ${perPage}`}</q2-option>\n ))}\n </q2-select>\n );\n }\n\n render() {\n const {\n pagesOnly,\n recordsOnly,\n isFullViewHidden,\n recordTypeWithDefault: recordType,\n totalPages,\n totalWithDefault: total,\n pageWithDefault: page,\n currentRange,\n nextRange,\n prevRange,\n showPerPageSelect,\n } = this;\n const onFirstPage = page === 1;\n const onLastPage = page === totalPages;\n\n let nextButtonLabel: string = loc('tecton.element.pagination.goToNext');\n let prevButtonLabel: string = loc('tecton.element.pagination.goToPrevious');\n if (pagesOnly) {\n prevButtonLabel = loc('tecton.element.pagination.goToPages', { next: page - 1, total: totalPages });\n nextButtonLabel = loc('tecton.element.pagination.goToPages', { next: page + 1, total: totalPages });\n } else if (recordsOnly) {\n prevButtonLabel = loc('tecton.element.pagination.goToRecords', {\n range: prevRange,\n recordType: recordType.toLowerCase(),\n total,\n });\n nextButtonLabel = loc('tecton.element.pagination.goToRecords', {\n range: nextRange,\n recordType: recordType.toLowerCase(),\n total,\n });\n }\n\n return (\n <nav\n class=\"container\"\n ref={el => (this.containerElement = el)}\n aria-label={loc('tecton.element.pagination.title')}\n >\n <div\n class=\"description\"\n test-id=\"description\"\n >\n {pagesOnly\n ? loc('tecton.element.pagination.pages', {\n current: page,\n total: totalPages,\n })\n : loc('tecton.element.pagination.description', {\n range: currentRange,\n recordType: recordType.toLowerCase(),\n total: total.toLocaleString(),\n })}\n </div>\n <div class=\"btn-group\">\n <q2-btn\n ref={el => (this.firstPageBtn = el)}\n label={loc('tecton.element.pagination.goToFirstPage')}\n disabled={onFirstPage}\n hidden={isFullViewHidden}\n onClick={() => this.handlePageChange(1)}\n test-id=\"firstPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-double-left\" />\n </q2-btn>\n <q2-btn\n ref={el => (this.prevPageBtn = el)}\n label={prevButtonLabel}\n disabled={onFirstPage}\n onClick={() => this.handlePageChange(page - 1)}\n test-id=\"prevPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-left\" />\n </q2-btn>\n </div>\n <div\n class=\"controls\"\n hidden={isFullViewHidden}\n test-id=\"controls\"\n >\n <span aria-hidden=\"true\">{loc('tecton.element.pagination.page')}</span>\n <div\n class=\"input-wrapper\"\n onClick={() => this.inputField.dispatchEvent(new FocusEvent('focus'))}\n >\n <q2-input\n ref={el => (this.inputField = el)}\n type=\"number\"\n value={`${page}`}\n min={1}\n max={this.totalPages}\n hideLabel\n optional\n label={`${loc('tecton.element.pagination.page')} (${loc(\n 'tecton.element.pagination.ofPages',\n [totalPages.toLocaleString()]\n )})`}\n onChange={event => this.handlePageChange(event.detail.value)}\n test-id=\"pageInput\"\n current=\"page\"\n ></q2-input>\n </div>\n <span aria-hidden=\"true\">\n {loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])}\n </span>\n </div>\n <div class=\"btn-group\">\n <q2-btn\n ref={el => (this.nextPageBtn = el)}\n label={nextButtonLabel}\n disabled={onLastPage}\n onClick={() => this.handlePageChange(page + 1)}\n test-id=\"nextPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-right\" />\n </q2-btn>\n <q2-btn\n ref={el => (this.lastPageBtn = el)}\n label=\"tecton.element.pagination.goToLastPage\"\n disabled={onLastPage}\n hidden={isFullViewHidden}\n onClick={() => this.handlePageChange(totalPages)}\n test-id=\"lastPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-double-right\" />\n </q2-btn>\n </div>\n <div\n class=\"per-page\"\n hidden={isFullViewHidden || !this.perPageIncrements?.length}\n >\n {showPerPageSelect && this.renderPerPage()}\n </div>\n </nav>\n );\n }\n\n // #endregion\n}\n"]}
|