wcs-core 4.2.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{accessibility-e99b032d.js → accessibility-c0c4e648.js} +8 -2
- package/dist/cjs/accessibility-c0c4e648.js.map +1 -0
- package/dist/cjs/button-interface-044a8a8a.js +12 -0
- package/dist/cjs/button-interface-044a8a8a.js.map +1 -0
- package/dist/cjs/grid-pagination-3511fdfa.js +111 -0
- package/dist/cjs/grid-pagination-3511fdfa.js.map +1 -0
- package/dist/cjs/{helpers-4a14051a.js → helpers-6280db6e.js} +75 -2
- package/dist/cjs/helpers-6280db6e.js.map +1 -0
- package/dist/cjs/{index-ca67a6dc.js → index-749d999e.js} +4 -1
- package/dist/cjs/index-749d999e.js.map +1 -0
- package/dist/cjs/{isEqual-9ea7ee49.js → keyboard-event-1cad4036.js} +77 -1
- package/dist/cjs/keyboard-event-1cad4036.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{select-arrow-c9583ea9.js → select-arrow-8169c0cb.js} +2 -2
- package/dist/cjs/{select-arrow-c9583ea9.js.map → select-arrow-8169c0cb.js.map} +1 -1
- package/dist/cjs/wcs-accordion-content.cjs.entry.js +1 -1
- package/dist/cjs/wcs-accordion-header.cjs.entry.js +1 -1
- package/dist/cjs/wcs-accordion-panel.cjs.entry.js +2 -2
- package/dist/cjs/wcs-accordion.cjs.entry.js +1 -1
- package/dist/cjs/wcs-action-bar.cjs.entry.js +1 -1
- package/dist/cjs/wcs-app.cjs.entry.js +1 -1
- package/dist/cjs/wcs-badge.cjs.entry.js +3 -2
- package/dist/cjs/wcs-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/{wcs-button.cjs.entry.js → wcs-button_2.cjs.entry.js} +21 -12
- package/dist/cjs/wcs-button_2.cjs.entry.js.map +1 -0
- package/dist/cjs/wcs-card-body.cjs.entry.js +1 -1
- package/dist/cjs/wcs-card.cjs.entry.js +1 -1
- package/dist/cjs/wcs-checkbox.cjs.entry.js +5 -2
- package/dist/cjs/wcs-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-com-nav-category.cjs.entry.js +2 -2
- package/dist/cjs/wcs-com-nav-submenu.cjs.entry.js +2 -2
- package/dist/cjs/wcs-com-nav.cjs.entry.js +2 -2
- package/dist/cjs/wcs-counter.cjs.entry.js +16 -6
- package/dist/cjs/wcs-counter.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-divider.cjs.entry.js +1 -1
- package/dist/cjs/wcs-dropdown-divider.cjs.entry.js +1 -1
- package/dist/cjs/wcs-dropdown-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-dropdown-header.cjs.entry.js +1 -1
- package/dist/cjs/wcs-dropdown-header.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-dropdown-item.cjs.entry.js +2 -2
- package/dist/cjs/wcs-dropdown-item.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-dropdown.cjs.entry.js +12 -6
- package/dist/cjs/wcs-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-editable-field.cjs.entry.js +18 -3
- package/dist/cjs/wcs-editable-field.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-error_2.cjs.entry.js +36 -2
- package/dist/cjs/wcs-error_2.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-field-content.cjs.entry.js +1 -1
- package/dist/cjs/wcs-field-label.cjs.entry.js +1 -1
- package/dist/cjs/wcs-field.cjs.entry.js +1 -1
- package/dist/cjs/wcs-footer.cjs.entry.js +1 -1
- package/dist/cjs/wcs-galactic-menu.cjs.entry.js +2 -2
- package/dist/cjs/wcs-galactic.cjs.entry.js +1 -1
- package/dist/cjs/wcs-grid-column.cjs.entry.js +25 -4
- package/dist/cjs/wcs-grid-column.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-grid-custom-cell.cjs.entry.js +1 -1
- package/dist/cjs/wcs-grid-pagination.cjs.entry.js +2 -2
- package/dist/cjs/wcs-grid.cjs.entry.js +320 -65
- package/dist/cjs/wcs-grid.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-header.cjs.entry.js +1 -1
- package/dist/cjs/wcs-hint.cjs.entry.js +1 -1
- package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js +1 -1
- package/dist/cjs/wcs-icon.cjs.entry.js +1 -1
- package/dist/cjs/wcs-input.cjs.entry.js +15 -15
- package/dist/cjs/wcs-input.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-label.cjs.entry.js +1 -1
- package/dist/cjs/wcs-label.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-list-item-properties.cjs.entry.js +1 -1
- package/dist/cjs/wcs-list-item-property.cjs.entry.js +1 -1
- package/dist/cjs/wcs-list-item.cjs.entry.js +1 -1
- package/dist/cjs/wcs-mat-icon.cjs.entry.js +2 -2
- package/dist/cjs/wcs-mat-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-modal.cjs.entry.js +35 -5
- package/dist/cjs/wcs-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-native-select.cjs.entry.js +6 -3
- package/dist/cjs/wcs-native-select.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-nav-item.cjs.entry.js +2 -2
- package/dist/cjs/wcs-nav.cjs.entry.js +1 -1
- package/dist/cjs/wcs-progress-bar.cjs.entry.js +4 -6
- package/dist/cjs/wcs-progress-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-progress-radial.cjs.entry.js +14 -6
- package/dist/cjs/wcs-progress-radial.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-radio-group.cjs.entry.js +22 -15
- package/dist/cjs/wcs-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-radio.cjs.entry.js +14 -7
- package/dist/cjs/wcs-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-select_2.cjs.entry.js +603 -111
- package/dist/cjs/wcs-select_2.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-skeleton-circle.cjs.entry.js +1 -1
- package/dist/cjs/wcs-skeleton-rectangle.cjs.entry.js +1 -1
- package/dist/cjs/wcs-skeleton-text.cjs.entry.js +1 -1
- package/dist/cjs/wcs-switch.cjs.entry.js +5 -2
- package/dist/cjs/wcs-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-tab.cjs.entry.js +4 -1
- package/dist/cjs/wcs-tab.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-tabs.cjs.entry.js +4 -4
- package/dist/cjs/wcs-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-textarea.cjs.entry.js +13 -11
- package/dist/cjs/wcs-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/wcs-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/wcs.cjs.js +2 -2
- package/dist/collection/components/badge/badge-interface.js.map +1 -1
- package/dist/collection/components/badge/badge.css +19 -1
- package/dist/collection/components/badge/badge.js +24 -0
- package/dist/collection/components/badge/badge.js.map +1 -1
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/checkbox/checkbox.js +34 -1
- package/dist/collection/components/checkbox/checkbox.js.map +1 -1
- package/dist/collection/components/counter/counter.css +6 -1
- package/dist/collection/components/counter/counter.js +61 -3
- package/dist/collection/components/counter/counter.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown.css +15 -4
- package/dist/collection/components/dropdown/dropdown.js +37 -1
- package/dist/collection/components/dropdown/dropdown.js.map +1 -1
- package/dist/collection/components/dropdown-divider/dropdown-divider.js +3 -0
- package/dist/collection/components/dropdown-divider/dropdown-divider.js.map +1 -1
- package/dist/collection/components/dropdown-header/dropdown-header.js +4 -0
- package/dist/collection/components/dropdown-header/dropdown-header.js.map +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.js +5 -1
- package/dist/collection/components/dropdown-item/dropdown-item.js.map +1 -1
- package/dist/collection/components/editable-field/editable-field.js +17 -2
- package/dist/collection/components/editable-field/editable-field.js.map +1 -1
- package/dist/collection/components/error/error.js +1 -1
- package/dist/collection/components/error/error.js.map +1 -1
- package/dist/collection/components/form-field/form-field.js +31 -0
- package/dist/collection/components/form-field/form-field.js.map +1 -1
- package/dist/collection/components/grid/grid-interface.js.map +1 -1
- package/dist/collection/components/grid/grid-keyboard-event.js +52 -0
- package/dist/collection/components/grid/grid-keyboard-event.js.map +1 -0
- package/dist/collection/components/grid/grid.css +5 -0
- package/dist/collection/components/grid/grid.js +265 -29
- package/dist/collection/components/grid/grid.js.map +1 -1
- package/dist/collection/components/grid-column/grid-column.css +5 -0
- package/dist/collection/components/grid-column/grid-column.js +60 -1
- package/dist/collection/components/grid-column/grid-column.js.map +1 -1
- package/dist/collection/components/grid-column/grid-sort-arrow.js +1 -1
- package/dist/collection/components/grid-column/grid-sort-arrow.js.map +1 -1
- package/dist/collection/components/grid-pagination/grid-pagination-arrow.js +32 -23
- package/dist/collection/components/grid-pagination/grid-pagination-arrow.js.map +1 -1
- package/dist/collection/components/grid-pagination/grid-pagination.css +17 -0
- package/dist/collection/components/grid-pagination/grid-pagination.js +1 -1
- package/dist/collection/components/grid-pagination/grid-pagination.js.map +1 -1
- package/dist/collection/components/input/input.js +64 -28
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/label/label.js.map +1 -1
- package/dist/collection/components/mat-icon/mat-icon.js +1 -1
- package/dist/collection/components/mat-icon/mat-icon.js.map +1 -1
- package/dist/collection/components/modal/modal.css +2 -2
- package/dist/collection/components/modal/modal.js +73 -2
- package/dist/collection/components/modal/modal.js.map +1 -1
- package/dist/collection/components/native-select/native-select.css +6 -5
- package/dist/collection/components/native-select/native-select.js +29 -0
- package/dist/collection/components/native-select/native-select.js.map +1 -1
- package/dist/collection/components/progress-bar/progress-bar.css +12 -11
- package/dist/collection/components/progress-bar/progress-bar.js +22 -13
- package/dist/collection/components/progress-bar/progress-bar.js.map +1 -1
- package/dist/collection/components/progress-radial/progress-radial.css +5 -0
- package/dist/collection/components/progress-radial/progress-radial.js +18 -7
- package/dist/collection/components/progress-radial/progress-radial.js.map +1 -1
- package/dist/collection/components/radio/radio.css +8 -16
- package/dist/collection/components/radio/radio.js +12 -5
- package/dist/collection/components/radio/radio.js.map +1 -1
- package/dist/collection/components/radio-group/radio-group.js +50 -13
- package/dist/collection/components/radio-group/radio-group.js.map +1 -1
- package/dist/collection/components/select/select-interface.js +10 -0
- package/dist/collection/components/select/select-interface.js.map +1 -1
- package/dist/collection/components/select/select-keyboard-event.js +306 -0
- package/dist/collection/components/select/select-keyboard-event.js.map +1 -0
- package/dist/collection/components/select/select.css +59 -6
- package/dist/collection/components/select/select.js +435 -111
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/select-option/select-option.css +15 -0
- package/dist/collection/components/select-option/select-option.js +30 -5
- package/dist/collection/components/select-option/select-option.js.map +1 -1
- package/dist/collection/components/switch/switch.js +34 -1
- package/dist/collection/components/switch/switch.js.map +1 -1
- package/dist/collection/components/tab/tab.css +7 -0
- package/dist/collection/components/tab/tab.js +11 -1
- package/dist/collection/components/tab/tab.js.map +1 -1
- package/dist/collection/components/tabs/tabs.js +7 -3
- package/dist/collection/components/tabs/tabs.js.map +1 -1
- package/dist/collection/components/textarea/textarea.css +8 -3
- package/dist/collection/components/textarea/textarea.js +41 -12
- package/dist/collection/components/textarea/textarea.js.map +1 -1
- package/dist/collection/utils/accessibility.js +7 -1
- package/dist/collection/utils/accessibility.js.map +1 -1
- package/dist/collection/utils/helpers.js +76 -1
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/keyboard-event.js +74 -0
- package/dist/collection/utils/keyboard-event.js.map +1 -0
- package/dist/collection/utils/mutable-aria-attribute.js +4 -0
- package/dist/collection/utils/mutable-aria-attribute.js.map +1 -0
- package/dist/esm/{accessibility-ffa12842.js → accessibility-64feea8a.js} +8 -2
- package/dist/esm/accessibility-64feea8a.js.map +1 -0
- package/dist/esm/button-interface-c21c265f.js +9 -0
- package/dist/esm/button-interface-c21c265f.js.map +1 -0
- package/dist/esm/grid-pagination-f7b01e2e.js +109 -0
- package/dist/esm/grid-pagination-f7b01e2e.js.map +1 -0
- package/dist/esm/{helpers-1d55b67f.js → helpers-a21ae7d0.js} +75 -3
- package/dist/esm/helpers-a21ae7d0.js.map +1 -0
- package/dist/esm/{index-dc4d96d4.js → index-4f282598.js} +4 -1
- package/dist/esm/index-4f282598.js.map +1 -0
- package/dist/esm/{isEqual-20881bca.js → keyboard-event-ba3d20e7.js} +77 -2
- package/dist/esm/keyboard-event-ba3d20e7.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{select-arrow-81d069f7.js → select-arrow-28e8687b.js} +2 -2
- package/dist/esm/{select-arrow-81d069f7.js.map → select-arrow-28e8687b.js.map} +1 -1
- package/dist/esm/wcs-accordion-content.entry.js +1 -1
- package/dist/esm/wcs-accordion-header.entry.js +1 -1
- package/dist/esm/wcs-accordion-panel.entry.js +2 -2
- package/dist/esm/wcs-accordion.entry.js +1 -1
- package/dist/esm/wcs-action-bar.entry.js +1 -1
- package/dist/esm/wcs-app.entry.js +1 -1
- package/dist/esm/wcs-badge.entry.js +3 -2
- package/dist/esm/wcs-badge.entry.js.map +1 -1
- package/dist/esm/{wcs-button.entry.js → wcs-button_2.entry.js} +19 -11
- package/dist/esm/wcs-button_2.entry.js.map +1 -0
- package/dist/esm/wcs-card-body.entry.js +1 -1
- package/dist/esm/wcs-card.entry.js +1 -1
- package/dist/esm/wcs-checkbox.entry.js +5 -2
- package/dist/esm/wcs-checkbox.entry.js.map +1 -1
- package/dist/esm/wcs-com-nav-category.entry.js +2 -2
- package/dist/esm/wcs-com-nav-submenu.entry.js +2 -2
- package/dist/esm/wcs-com-nav.entry.js +2 -2
- package/dist/esm/wcs-counter.entry.js +16 -6
- package/dist/esm/wcs-counter.entry.js.map +1 -1
- package/dist/esm/wcs-divider.entry.js +1 -1
- package/dist/esm/wcs-dropdown-divider.entry.js +1 -1
- package/dist/esm/wcs-dropdown-divider.entry.js.map +1 -1
- package/dist/esm/wcs-dropdown-header.entry.js +1 -1
- package/dist/esm/wcs-dropdown-header.entry.js.map +1 -1
- package/dist/esm/wcs-dropdown-item.entry.js +2 -2
- package/dist/esm/wcs-dropdown-item.entry.js.map +1 -1
- package/dist/esm/wcs-dropdown.entry.js +12 -6
- package/dist/esm/wcs-dropdown.entry.js.map +1 -1
- package/dist/esm/wcs-editable-field.entry.js +18 -3
- package/dist/esm/wcs-editable-field.entry.js.map +1 -1
- package/dist/esm/wcs-error_2.entry.js +36 -2
- package/dist/esm/wcs-error_2.entry.js.map +1 -1
- package/dist/esm/wcs-field-content.entry.js +1 -1
- package/dist/esm/wcs-field-label.entry.js +1 -1
- package/dist/esm/wcs-field.entry.js +1 -1
- package/dist/esm/wcs-footer.entry.js +1 -1
- package/dist/esm/wcs-galactic-menu.entry.js +2 -2
- package/dist/esm/wcs-galactic.entry.js +1 -1
- package/dist/esm/wcs-grid-column.entry.js +25 -4
- package/dist/esm/wcs-grid-column.entry.js.map +1 -1
- package/dist/esm/wcs-grid-custom-cell.entry.js +1 -1
- package/dist/esm/wcs-grid-pagination.entry.js +2 -2
- package/dist/esm/wcs-grid.entry.js +282 -27
- package/dist/esm/wcs-grid.entry.js.map +1 -1
- package/dist/esm/wcs-header.entry.js +1 -1
- package/dist/esm/wcs-hint.entry.js +1 -1
- package/dist/esm/wcs-horizontal-stepper.entry.js +1 -1
- package/dist/esm/wcs-icon.entry.js +1 -1
- package/dist/esm/wcs-input.entry.js +15 -15
- package/dist/esm/wcs-input.entry.js.map +1 -1
- package/dist/esm/wcs-label.entry.js +1 -1
- package/dist/esm/wcs-label.entry.js.map +1 -1
- package/dist/esm/wcs-list-item-properties.entry.js +1 -1
- package/dist/esm/wcs-list-item-property.entry.js +1 -1
- package/dist/esm/wcs-list-item.entry.js +1 -1
- package/dist/esm/wcs-mat-icon.entry.js +2 -2
- package/dist/esm/wcs-mat-icon.entry.js.map +1 -1
- package/dist/esm/wcs-modal.entry.js +35 -5
- package/dist/esm/wcs-modal.entry.js.map +1 -1
- package/dist/esm/wcs-native-select.entry.js +6 -3
- package/dist/esm/wcs-native-select.entry.js.map +1 -1
- package/dist/esm/wcs-nav-item.entry.js +2 -2
- package/dist/esm/wcs-nav.entry.js +1 -1
- package/dist/esm/wcs-progress-bar.entry.js +4 -6
- package/dist/esm/wcs-progress-bar.entry.js.map +1 -1
- package/dist/esm/wcs-progress-radial.entry.js +14 -6
- package/dist/esm/wcs-progress-radial.entry.js.map +1 -1
- package/dist/esm/wcs-radio-group.entry.js +22 -15
- package/dist/esm/wcs-radio-group.entry.js.map +1 -1
- package/dist/esm/wcs-radio.entry.js +14 -7
- package/dist/esm/wcs-radio.entry.js.map +1 -1
- package/dist/esm/wcs-select_2.entry.js +602 -110
- package/dist/esm/wcs-select_2.entry.js.map +1 -1
- package/dist/esm/wcs-skeleton-circle.entry.js +1 -1
- package/dist/esm/wcs-skeleton-rectangle.entry.js +1 -1
- package/dist/esm/wcs-skeleton-text.entry.js +1 -1
- package/dist/esm/wcs-switch.entry.js +5 -2
- package/dist/esm/wcs-switch.entry.js.map +1 -1
- package/dist/esm/wcs-tab.entry.js +4 -1
- package/dist/esm/wcs-tab.entry.js.map +1 -1
- package/dist/esm/wcs-tabs.entry.js +4 -4
- package/dist/esm/wcs-tabs.entry.js.map +1 -1
- package/dist/esm/wcs-textarea.entry.js +13 -11
- package/dist/esm/wcs-textarea.entry.js.map +1 -1
- package/dist/esm/wcs-tooltip.entry.js +1 -1
- package/dist/esm/wcs.js +3 -3
- package/dist/types/components/badge/badge-interface.d.ts +2 -0
- package/dist/types/components/badge/badge.d.ts +5 -1
- package/dist/types/components/checkbox/checkbox.d.ts +4 -1
- package/dist/types/components/counter/counter.d.ts +8 -1
- package/dist/types/components/dropdown/dropdown.d.ts +10 -1
- package/dist/types/components/dropdown-divider/dropdown-divider.d.ts +3 -0
- package/dist/types/components/dropdown-header/dropdown-header.d.ts +4 -0
- package/dist/types/components/dropdown-item/dropdown-item.d.ts +7 -0
- package/dist/types/components/editable-field/editable-field.d.ts +7 -0
- package/dist/types/components/form-field/form-field.d.ts +4 -0
- package/dist/types/components/grid/grid-interface.d.ts +14 -2
- package/dist/types/components/grid/grid-keyboard-event.d.ts +16 -0
- package/dist/types/components/grid/grid.d.ts +59 -4
- package/dist/types/components/grid-column/grid-column.d.ts +17 -0
- package/dist/types/components/input/input.d.ts +40 -17
- package/dist/types/components/modal/modal.d.ts +37 -1
- package/dist/types/components/native-select/native-select.d.ts +3 -1
- package/dist/types/components/progress-bar/progress-bar.d.ts +8 -3
- package/dist/types/components/progress-radial/progress-radial.d.ts +12 -0
- package/dist/types/components/radio/radio.d.ts +3 -0
- package/dist/types/components/radio-group/radio-group.d.ts +3 -1
- package/dist/types/components/select/select-interface.d.ts +12 -0
- package/dist/types/components/select/select-keyboard-event.d.ts +38 -0
- package/dist/types/components/select/select.d.ts +76 -15
- package/dist/types/components/select-option/select-option.d.ts +10 -4
- package/dist/types/components/switch/switch.d.ts +4 -1
- package/dist/types/components/tab/tab.d.ts +3 -0
- package/dist/types/components/tabs/tabs.d.ts +4 -0
- package/dist/types/components/textarea/textarea.d.ts +8 -4
- package/dist/types/components.d.ts +357 -55
- package/dist/types/utils/accessibility.d.ts +4 -0
- package/dist/types/utils/helpers.d.ts +12 -1
- package/dist/types/utils/keyboard-event.d.ts +13 -0
- package/dist/types/utils/mutable-aria-attribute.d.ts +5 -0
- package/dist/wcs/{p-7a3f70da.entry.js → p-00f6a79a.entry.js} +2 -2
- package/dist/wcs/{p-ee453b6e.entry.js → p-016e4dd9.entry.js} +2 -2
- package/dist/wcs/p-0ae177cf.js +2 -0
- package/dist/wcs/p-0ae177cf.js.map +1 -0
- package/dist/wcs/{p-f06f48f3.entry.js → p-0d02d9e4.entry.js} +2 -2
- package/dist/wcs/p-0d02d9e4.entry.js.map +1 -0
- package/dist/wcs/{p-30d8f9c3.entry.js → p-11ab4ffc.entry.js} +2 -2
- package/dist/wcs/p-13548191.entry.js +2 -0
- package/dist/wcs/p-13548191.entry.js.map +1 -0
- package/dist/wcs/p-13ffe5f3.entry.js +2 -0
- package/dist/wcs/p-13ffe5f3.entry.js.map +1 -0
- package/dist/wcs/{p-dfddec76.entry.js → p-17442a2f.entry.js} +2 -2
- package/dist/wcs/p-1d49a02e.entry.js +2 -0
- package/dist/wcs/p-1d49a02e.entry.js.map +1 -0
- package/dist/wcs/{p-d6c3e615.js → p-24611014.js} +2 -2
- package/dist/wcs/p-250b3794.entry.js +2 -0
- package/dist/wcs/{p-91b3e4b5.entry.js.map → p-250b3794.entry.js.map} +1 -1
- package/dist/wcs/{p-292ca644.entry.js → p-2d62b3dd.entry.js} +2 -2
- package/dist/wcs/{p-d6b3f742.entry.js → p-33a5594d.entry.js} +2 -2
- package/dist/wcs/p-33a570ee.js +2 -0
- package/dist/wcs/p-33a570ee.js.map +1 -0
- package/dist/wcs/{p-e86c6cbb.entry.js → p-34079054.entry.js} +2 -2
- package/dist/wcs/{p-e86c6cbb.entry.js.map → p-34079054.entry.js.map} +1 -1
- package/dist/wcs/{p-257b15b9.entry.js → p-36e83879.entry.js} +2 -2
- package/dist/wcs/p-44410e32.entry.js +2 -0
- package/dist/wcs/p-44410e32.entry.js.map +1 -0
- package/dist/wcs/{p-7269272f.entry.js → p-46184d47.entry.js} +2 -2
- package/dist/wcs/p-46975b1e.entry.js +2 -0
- package/dist/wcs/p-46975b1e.entry.js.map +1 -0
- package/dist/wcs/{p-4a9f8e94.entry.js → p-46d56c4e.entry.js} +3 -3
- package/dist/wcs/{p-fc3f5b53.entry.js → p-4820154c.entry.js} +2 -2
- package/dist/wcs/p-49b0de03.entry.js +2 -0
- package/dist/wcs/p-49b0de03.entry.js.map +1 -0
- package/dist/wcs/{p-ff9967eb.entry.js → p-4af68f13.entry.js} +2 -2
- package/dist/wcs/{p-1f8c73eb.entry.js → p-5f0ab1dc.entry.js} +2 -2
- package/dist/wcs/p-5f0ab1dc.entry.js.map +1 -0
- package/dist/wcs/p-5f3e6b0c.entry.js +2 -0
- package/dist/wcs/p-5f3e6b0c.entry.js.map +1 -0
- package/dist/wcs/{p-50dce764.entry.js → p-61b934a7.entry.js} +2 -2
- package/dist/wcs/p-64855188.js +2 -0
- package/dist/wcs/p-64855188.js.map +1 -0
- package/dist/wcs/p-680b107c.entry.js +2 -0
- package/dist/wcs/p-68d654da.js +2 -0
- package/dist/wcs/p-68d654da.js.map +1 -0
- package/dist/wcs/p-69d1223c.js +3 -0
- package/dist/wcs/p-69d1223c.js.map +1 -0
- package/dist/wcs/p-6f538b67.entry.js +2 -0
- package/dist/wcs/p-6f538b67.entry.js.map +1 -0
- package/dist/wcs/p-7c145ed0.entry.js +2 -0
- package/dist/wcs/p-7c145ed0.entry.js.map +1 -0
- package/dist/wcs/p-8724a296.entry.js +2 -0
- package/dist/wcs/p-8724a296.entry.js.map +1 -0
- package/dist/wcs/{p-d084dd61.entry.js → p-88b1cdfe.entry.js} +2 -2
- package/dist/wcs/{p-c7494651.entry.js → p-8ff7e463.entry.js} +2 -2
- package/dist/wcs/p-90a7fd68.entry.js +2 -0
- package/dist/wcs/p-90a7fd68.entry.js.map +1 -0
- package/dist/wcs/{p-cfcacc44.entry.js → p-914aa964.entry.js} +2 -2
- package/dist/wcs/p-93fcef08.entry.js +2 -0
- package/dist/wcs/p-93fcef08.entry.js.map +1 -0
- package/dist/wcs/{p-429bd9fb.entry.js → p-9b1c73b3.entry.js} +2 -2
- package/dist/wcs/p-9cc48d75.js +2 -0
- package/dist/wcs/p-9cc48d75.js.map +1 -0
- package/dist/wcs/p-a3518f66.entry.js +2 -0
- package/dist/wcs/p-a361d9f1.entry.js +2 -0
- package/dist/wcs/{p-31a8d23f.entry.js → p-a85208ca.entry.js} +2 -2
- package/dist/wcs/{p-d3f1cafe.entry.js → p-b91323fc.entry.js} +2 -2
- package/dist/wcs/{p-47d8ece5.entry.js → p-bd4029f8.entry.js} +2 -2
- package/dist/wcs/{p-e348058b.entry.js → p-bed4e3ce.entry.js} +2 -2
- package/dist/wcs/{p-f489793d.entry.js → p-c261353f.entry.js} +2 -2
- package/dist/wcs/p-c261353f.entry.js.map +1 -0
- package/dist/wcs/p-c3227f01.entry.js +2 -0
- package/dist/wcs/p-c3227f01.entry.js.map +1 -0
- package/dist/wcs/{p-810aff71.entry.js → p-c38adf4b.entry.js} +2 -2
- package/dist/wcs/{p-2185bf8b.entry.js → p-c6a8c6f9.entry.js} +2 -2
- package/dist/wcs/p-c9478849.entry.js +2 -0
- package/dist/wcs/p-c9478849.entry.js.map +1 -0
- package/dist/wcs/p-ce3ef5d0.entry.js +2 -0
- package/dist/wcs/p-ce3ef5d0.entry.js.map +1 -0
- package/dist/wcs/{p-54e29233.entry.js → p-ce40b012.entry.js} +2 -2
- package/dist/wcs/{p-54e29233.entry.js.map → p-ce40b012.entry.js.map} +1 -1
- package/dist/wcs/p-d6c482fc.entry.js +2 -0
- package/dist/wcs/p-d6c482fc.entry.js.map +1 -0
- package/dist/wcs/{p-1e43122f.entry.js → p-d84cee70.entry.js} +2 -2
- package/dist/wcs/p-d895b92c.entry.js +16 -0
- package/dist/wcs/p-d895b92c.entry.js.map +1 -0
- package/dist/wcs/p-dca2f42c.entry.js +2 -0
- package/dist/wcs/{p-7519a270.entry.js → p-e0d5908a.entry.js} +2 -2
- package/dist/wcs/{p-a5cd4c07.entry.js → p-e487ff2c.entry.js} +2 -2
- package/dist/wcs/p-e487ff2c.entry.js.map +1 -0
- package/dist/wcs/{p-3b1fc676.entry.js → p-e52c11e4.entry.js} +2 -2
- package/dist/wcs/{p-0ede0c37.entry.js → p-e7661047.entry.js} +2 -2
- package/dist/wcs/p-ea6e33ee.entry.js +2 -0
- package/dist/wcs/{p-cc03627c.entry.js → p-f7ce4e0d.entry.js} +2 -2
- package/dist/wcs/{p-b6160b7c.entry.js → p-faf04401.entry.js} +2 -2
- package/dist/wcs/p-fc1767ae.entry.js +2 -0
- package/dist/wcs/p-fc1767ae.entry.js.map +1 -0
- package/dist/wcs/p-feebc469.entry.js +2 -0
- package/dist/wcs/p-feebc469.entry.js.map +1 -0
- package/dist/wcs/wcs.css +1 -1
- package/dist/wcs/wcs.esm.js +1 -1
- package/dist/wcs/wcs.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/accessibility-e99b032d.js.map +0 -1
- package/dist/cjs/grid-pagination-4b55c908.js +0 -101
- package/dist/cjs/grid-pagination-4b55c908.js.map +0 -1
- package/dist/cjs/helpers-4a14051a.js.map +0 -1
- package/dist/cjs/index-ca67a6dc.js.map +0 -1
- package/dist/cjs/isEqual-9ea7ee49.js.map +0 -1
- package/dist/cjs/wcs-button.cjs.entry.js.map +0 -1
- package/dist/cjs/wcs-spinner.cjs.entry.js +0 -22
- package/dist/cjs/wcs-spinner.cjs.entry.js.map +0 -1
- package/dist/esm/accessibility-ffa12842.js.map +0 -1
- package/dist/esm/grid-pagination-41354861.js +0 -99
- package/dist/esm/grid-pagination-41354861.js.map +0 -1
- package/dist/esm/helpers-1d55b67f.js.map +0 -1
- package/dist/esm/index-dc4d96d4.js.map +0 -1
- package/dist/esm/isEqual-20881bca.js.map +0 -1
- package/dist/esm/wcs-button.entry.js.map +0 -1
- package/dist/esm/wcs-spinner.entry.js +0 -18
- package/dist/esm/wcs-spinner.entry.js.map +0 -1
- package/dist/wcs/p-02b95dbf.entry.js +0 -2
- package/dist/wcs/p-02b95dbf.entry.js.map +0 -1
- package/dist/wcs/p-0f8db386.js +0 -2
- package/dist/wcs/p-0f8db386.js.map +0 -1
- package/dist/wcs/p-17630eea.entry.js +0 -2
- package/dist/wcs/p-1f8c73eb.entry.js.map +0 -1
- package/dist/wcs/p-269d244c.entry.js +0 -2
- package/dist/wcs/p-269d244c.entry.js.map +0 -1
- package/dist/wcs/p-2f63d6c5.entry.js +0 -2
- package/dist/wcs/p-2f63d6c5.entry.js.map +0 -1
- package/dist/wcs/p-39821dd2.entry.js +0 -2
- package/dist/wcs/p-39821dd2.entry.js.map +0 -1
- package/dist/wcs/p-3dc6b507.js +0 -2
- package/dist/wcs/p-3dc6b507.js.map +0 -1
- package/dist/wcs/p-463667c9.entry.js +0 -2
- package/dist/wcs/p-475ac7c5.js +0 -2
- package/dist/wcs/p-475ac7c5.js.map +0 -1
- package/dist/wcs/p-4ffe4539.entry.js +0 -2
- package/dist/wcs/p-4ffe4539.entry.js.map +0 -1
- package/dist/wcs/p-57560d7d.entry.js +0 -2
- package/dist/wcs/p-57560d7d.entry.js.map +0 -1
- package/dist/wcs/p-61cab06f.entry.js +0 -2
- package/dist/wcs/p-61cab06f.entry.js.map +0 -1
- package/dist/wcs/p-627bbb6a.entry.js +0 -2
- package/dist/wcs/p-627bbb6a.entry.js.map +0 -1
- package/dist/wcs/p-6de70331.entry.js +0 -2
- package/dist/wcs/p-6de70331.entry.js.map +0 -1
- package/dist/wcs/p-747a5962.entry.js +0 -2
- package/dist/wcs/p-8181f8cd.js +0 -2
- package/dist/wcs/p-8181f8cd.js.map +0 -1
- package/dist/wcs/p-8c4ed883.entry.js +0 -2
- package/dist/wcs/p-8c4ed883.entry.js.map +0 -1
- package/dist/wcs/p-8d57835f.entry.js +0 -2
- package/dist/wcs/p-8fed8b1c.entry.js +0 -2
- package/dist/wcs/p-8fed8b1c.entry.js.map +0 -1
- package/dist/wcs/p-91b3e4b5.entry.js +0 -2
- package/dist/wcs/p-9910fedd.entry.js +0 -2
- package/dist/wcs/p-9910fedd.entry.js.map +0 -1
- package/dist/wcs/p-9d798de4.entry.js +0 -2
- package/dist/wcs/p-9d798de4.entry.js.map +0 -1
- package/dist/wcs/p-9ecdeaf9.entry.js +0 -2
- package/dist/wcs/p-9ecdeaf9.entry.js.map +0 -1
- package/dist/wcs/p-a2df3a49.js +0 -3
- package/dist/wcs/p-a2df3a49.js.map +0 -1
- package/dist/wcs/p-a5cd4c07.entry.js.map +0 -1
- package/dist/wcs/p-ac106663.entry.js +0 -2
- package/dist/wcs/p-ac106663.entry.js.map +0 -1
- package/dist/wcs/p-cb90bc3a.entry.js +0 -2
- package/dist/wcs/p-cb90bc3a.entry.js.map +0 -1
- package/dist/wcs/p-cdd172b4.entry.js +0 -2
- package/dist/wcs/p-d5a0e271.entry.js +0 -2
- package/dist/wcs/p-d5a0e271.entry.js.map +0 -1
- package/dist/wcs/p-ec84d6fd.entry.js +0 -16
- package/dist/wcs/p-ec84d6fd.entry.js.map +0 -1
- package/dist/wcs/p-ed3132be.entry.js +0 -2
- package/dist/wcs/p-ed3132be.entry.js.map +0 -1
- package/dist/wcs/p-f06f48f3.entry.js.map +0 -1
- package/dist/wcs/p-f20b9024.entry.js +0 -2
- package/dist/wcs/p-f20b9024.entry.js.map +0 -1
- package/dist/wcs/p-f489793d.entry.js.map +0 -1
- /package/dist/wcs/{p-7a3f70da.entry.js.map → p-00f6a79a.entry.js.map} +0 -0
- /package/dist/wcs/{p-ee453b6e.entry.js.map → p-016e4dd9.entry.js.map} +0 -0
- /package/dist/wcs/{p-30d8f9c3.entry.js.map → p-11ab4ffc.entry.js.map} +0 -0
- /package/dist/wcs/{p-dfddec76.entry.js.map → p-17442a2f.entry.js.map} +0 -0
- /package/dist/wcs/{p-d6c3e615.js.map → p-24611014.js.map} +0 -0
- /package/dist/wcs/{p-292ca644.entry.js.map → p-2d62b3dd.entry.js.map} +0 -0
- /package/dist/wcs/{p-d6b3f742.entry.js.map → p-33a5594d.entry.js.map} +0 -0
- /package/dist/wcs/{p-257b15b9.entry.js.map → p-36e83879.entry.js.map} +0 -0
- /package/dist/wcs/{p-7269272f.entry.js.map → p-46184d47.entry.js.map} +0 -0
- /package/dist/wcs/{p-4a9f8e94.entry.js.map → p-46d56c4e.entry.js.map} +0 -0
- /package/dist/wcs/{p-fc3f5b53.entry.js.map → p-4820154c.entry.js.map} +0 -0
- /package/dist/wcs/{p-ff9967eb.entry.js.map → p-4af68f13.entry.js.map} +0 -0
- /package/dist/wcs/{p-50dce764.entry.js.map → p-61b934a7.entry.js.map} +0 -0
- /package/dist/wcs/{p-17630eea.entry.js.map → p-680b107c.entry.js.map} +0 -0
- /package/dist/wcs/{p-d084dd61.entry.js.map → p-88b1cdfe.entry.js.map} +0 -0
- /package/dist/wcs/{p-c7494651.entry.js.map → p-8ff7e463.entry.js.map} +0 -0
- /package/dist/wcs/{p-cfcacc44.entry.js.map → p-914aa964.entry.js.map} +0 -0
- /package/dist/wcs/{p-429bd9fb.entry.js.map → p-9b1c73b3.entry.js.map} +0 -0
- /package/dist/wcs/{p-8d57835f.entry.js.map → p-a3518f66.entry.js.map} +0 -0
- /package/dist/wcs/{p-463667c9.entry.js.map → p-a361d9f1.entry.js.map} +0 -0
- /package/dist/wcs/{p-31a8d23f.entry.js.map → p-a85208ca.entry.js.map} +0 -0
- /package/dist/wcs/{p-d3f1cafe.entry.js.map → p-b91323fc.entry.js.map} +0 -0
- /package/dist/wcs/{p-47d8ece5.entry.js.map → p-bd4029f8.entry.js.map} +0 -0
- /package/dist/wcs/{p-e348058b.entry.js.map → p-bed4e3ce.entry.js.map} +0 -0
- /package/dist/wcs/{p-810aff71.entry.js.map → p-c38adf4b.entry.js.map} +0 -0
- /package/dist/wcs/{p-2185bf8b.entry.js.map → p-c6a8c6f9.entry.js.map} +0 -0
- /package/dist/wcs/{p-1e43122f.entry.js.map → p-d84cee70.entry.js.map} +0 -0
- /package/dist/wcs/{p-747a5962.entry.js.map → p-dca2f42c.entry.js.map} +0 -0
- /package/dist/wcs/{p-7519a270.entry.js.map → p-e0d5908a.entry.js.map} +0 -0
- /package/dist/wcs/{p-3b1fc676.entry.js.map → p-e52c11e4.entry.js.map} +0 -0
- /package/dist/wcs/{p-0ede0c37.entry.js.map → p-e7661047.entry.js.map} +0 -0
- /package/dist/wcs/{p-cdd172b4.entry.js.map → p-ea6e33ee.entry.js.map} +0 -0
- /package/dist/wcs/{p-cc03627c.entry.js.map → p-f7ce4e0d.entry.js.map} +0 -0
- /package/dist/wcs/{p-b6160b7c.entry.js.map → p-faf04401.entry.js.map} +0 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { h, r as registerInstance, c as createEvent, H as Host } from './index-4f282598.js';
|
|
2
|
+
|
|
3
|
+
const getAccessibleName = (order, double) => {
|
|
4
|
+
switch (order) {
|
|
5
|
+
case 'next':
|
|
6
|
+
return double ? 'Last page' : 'Next page';
|
|
7
|
+
case 'previous':
|
|
8
|
+
default:
|
|
9
|
+
return double ? 'First page' : 'Previous page';
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
const GridPaginationArrow = ({ active, order, double = false }) => (h("wcs-button", { mode: "clear", shape: "square", size: "s", disabled: !active, title: getAccessibleName(order, double) },
|
|
13
|
+
h("svg", { style: { cursor: 'pointer' }, "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", width: "24", height: "20", viewBox: "0 0 24 20" },
|
|
14
|
+
h("style", { type: "text/css" }, `
|
|
15
|
+
.arrow-group {
|
|
16
|
+
transform-origin: 50% 51%;
|
|
17
|
+
transition: transform 175ms ease-in-out;
|
|
18
|
+
}
|
|
19
|
+
.arrow {
|
|
20
|
+
transition: fill 175ms ease-in-out;
|
|
21
|
+
fill: var(--wcs-text-light);
|
|
22
|
+
}
|
|
23
|
+
.second-arrow {
|
|
24
|
+
transform: translateY(-8px);
|
|
25
|
+
}
|
|
26
|
+
.next {
|
|
27
|
+
transform: rotate(90deg);
|
|
28
|
+
}
|
|
29
|
+
.previous {
|
|
30
|
+
transform: rotate(-90deg);
|
|
31
|
+
}
|
|
32
|
+
.active {
|
|
33
|
+
fill: var(--wcs-primary);
|
|
34
|
+
}
|
|
35
|
+
`),
|
|
36
|
+
h("g", { fill: "none", class: order + ' arrow-group' },
|
|
37
|
+
h("path", { class: (active ? 'active' : '') + ' arrow', d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" }),
|
|
38
|
+
h("path", { d: "M0 0h24v24H0z", fill: "none" })),
|
|
39
|
+
double ?
|
|
40
|
+
h("g", { fill: "none", class: order + ' arrow-group' },
|
|
41
|
+
h("path", { class: (active ? 'active' : '') + ' arrow second-arrow', d: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" }),
|
|
42
|
+
h("path", { d: "M0 0h24v24H0z", fill: "none" }))
|
|
43
|
+
: '')));
|
|
44
|
+
|
|
45
|
+
const gridPaginationCss = ":host{display:block;border-style:solid none none;border-width:1px;border-color:var(--wcs-text-light)}.container{display:grid;grid-template-columns:auto auto auto;justify-content:space-between;color:var(--wcs-text-medium);align-items:center}.available-page-sizes{width:auto}.page-management,.page-size,.items-count{display:flex;align-items:center}.page-management{margin:0;padding:0;list-style-type:none}.pagination-arrow{display:flex}.pagination-counter{padding:0 var(--wcs-padding-s)}.items-count span:focus{outline:2px dashed var(--wcs-primary);outline-offset:4px;border-radius:0.1rem}";
|
|
46
|
+
|
|
47
|
+
const GridPagination = class {
|
|
48
|
+
constructor(hostRef) {
|
|
49
|
+
registerInstance(this, hostRef);
|
|
50
|
+
this.wcsGridPaginationChange = createEvent(this, "wcsGridPaginationChange", 7);
|
|
51
|
+
this.availablePageSizes = [10, 20, 50];
|
|
52
|
+
this.currentPage = GridPagination.INDEX_FIRST_PAGE;
|
|
53
|
+
this.pageSize = this.availablePageSizes[0];
|
|
54
|
+
this.itemsCount = 0;
|
|
55
|
+
this.pageCount = 1;
|
|
56
|
+
}
|
|
57
|
+
lastPage() {
|
|
58
|
+
this.currentPage = this.pageCount - 1;
|
|
59
|
+
this.emitPaginationChange();
|
|
60
|
+
}
|
|
61
|
+
nextPage() {
|
|
62
|
+
if (this.canGoToNextPage()) {
|
|
63
|
+
this.currentPage++;
|
|
64
|
+
this.emitPaginationChange();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
canGoToNextPage() {
|
|
68
|
+
return this.currentPage + 1 < this.pageCount;
|
|
69
|
+
}
|
|
70
|
+
previousPage() {
|
|
71
|
+
if (this.canGoToPreviousPage()) {
|
|
72
|
+
this.currentPage--;
|
|
73
|
+
this.emitPaginationChange();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
canGoToPreviousPage() {
|
|
77
|
+
return this.currentPage > 0;
|
|
78
|
+
}
|
|
79
|
+
firstPage() {
|
|
80
|
+
this.currentPage = 0;
|
|
81
|
+
this.emitPaginationChange();
|
|
82
|
+
}
|
|
83
|
+
onChangePagesize(event) {
|
|
84
|
+
this.pageSize = event.detail.value;
|
|
85
|
+
if (this.currentPage + 1 > this.pageSize) {
|
|
86
|
+
this.currentPage = 0;
|
|
87
|
+
}
|
|
88
|
+
this.emitPaginationChange();
|
|
89
|
+
}
|
|
90
|
+
emitPaginationChange() {
|
|
91
|
+
this.wcsGridPaginationChange.emit({
|
|
92
|
+
pagination: {
|
|
93
|
+
currentPage: this.currentPage,
|
|
94
|
+
pageSize: this.pageSize,
|
|
95
|
+
itemsCount: this.itemsCount,
|
|
96
|
+
pageCount: this.pageCount
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
render() {
|
|
101
|
+
return (h(Host, { slot: "grid-pagination" }, h("div", { class: "container" }, h("div", { class: "page-size" }, h("wcs-select", { placeholder: "El\u00E9ments par page", class: "available-page-sizes", "aria-labelledby": "elements-per-page-number elements-per-page-text", value: this.pageSize, onWcsChange: this.onChangePagesize.bind(this) }, this.availablePageSizes.map((pageSize) => h("wcs-select-option", { value: pageSize }, pageSize))), h("span", { id: "elements-per-page-number", hidden: true }, this.pageSize), h("span", { id: "elements-per-page-text" }, "\u00A0\u00E9l\u00E9ments par page")), h("div", { class: "items-count" }, h("span", null, this.itemsCount, " \u00E9l\u00E9ments")), h("nav", { "aria-label": "pagination" }, h("ul", { class: "page-management" }, h("li", { class: "pagination-arrow", onClick: this.firstPage.bind(this) }, h(GridPaginationArrow, { active: this.canGoToPreviousPage(), order: "previous", double: true })), h("li", { class: "pagination-arrow", onClick: this.previousPage.bind(this) }, h(GridPaginationArrow, { active: this.canGoToPreviousPage(), order: "previous" })), h("li", { class: "pagination-counter" }, h("span", { "aria-label": `Page ${this.currentPage + 1} sur ${this.pageCount}`, "aria-current": "page" }, this.currentPage + 1, " / ", this.pageCount)), h("li", { class: "pagination-arrow", onClick: this.nextPage.bind(this) }, h(GridPaginationArrow, { active: this.canGoToNextPage(), order: "next" })), h("li", { class: "pagination-arrow", onClick: this.lastPage.bind(this) }, h(GridPaginationArrow, { active: this.canGoToNextPage(), order: "next", double: true })))))));
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
GridPagination.INDEX_FIRST_PAGE = 0;
|
|
105
|
+
GridPagination.style = gridPaginationCss;
|
|
106
|
+
|
|
107
|
+
export { GridPagination as G };
|
|
108
|
+
|
|
109
|
+
//# sourceMappingURL=grid-pagination-f7b01e2e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"grid-pagination-f7b01e2e.js","mappings":";;AAQA,MAAM,iBAAiB,GAAG,CAAC,KAAwC,EAAE,MAA0C;EAC7G,QAAQ,KAAK;IACX,KAAK,MAAM;MACT,OAAO,MAAM,GAAG,WAAW,GAAG,WAAW,CAAC;IAC5C,KAAK,UAAU,CAAC;IAChB;MACE,OAAO,MAAM,GAAG,YAAY,GAAG,eAAe,CAAC;GAClD;AACH,CAAC,CAAA;AAEM,MAAM,mBAAmB,GAAkD,CAAC,EAAC,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,EAAC,MAChH,kBAAY,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,QAAQ,EACd,IAAI,EAAC,GAAG,EACR,QAAQ,EAAE,CAAC,MAAM,EACjB,KAAK,EAAE,iBAAiB,CAAC,KAAK,EAAE,MAAM,CAAC;EACjD,WAAK,KAAK,EAAE,EAAC,MAAM,EAAE,SAAS,EAAC,iBACd,MAAM,EAClB,KAAK,EAAC,4BAA4B,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW;IAChF,aAAO,IAAI,EAAC,UAAU,IAAE;;;;;;;;;;;;;;;;;;;;;WAqBnB,CAAS;IACd,SAAG,IAAI,EAAC,MAAM,EA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components/grid-pagination/grid-pagination-arrow.tsx","./src/components/grid-pagination/grid-pagination.scss?tag=wcs-grid-pagination&encapsulation=shadow","./src/components/grid-pagination/grid-pagination.tsx"],"sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\n\ninterface GridPaginationArrowProps {\n active: boolean;\n order: 'next' | 'previous';\n double?: boolean;\n}\n\nconst getAccessibleName = (order: GridPaginationArrowProps['order'], double: GridPaginationArrowProps['double']): string => {\n switch (order) {\n case 'next':\n return double ? 'Last page' : 'Next page';\n case 'previous':\n default:\n return double ? 'First page' : 'Previous page';\n }\n}\n\nexport const GridPaginationArrow: FunctionalComponent<GridPaginationArrowProps> = ({active, order, double = false}) => (\n <wcs-button mode=\"clear\"\n shape=\"square\"\n size=\"s\"\n disabled={!active}\n title={getAccessibleName(order, double)}>\n <svg style={{cursor: 'pointer'}}\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"20\" viewBox=\"0 0 24 20\">\n <style type=\"text/css\">{`\n .arrow-group {\n transform-origin: 50% 51%;\n transition: transform 175ms ease-in-out;\n }\n .arrow {\n transition: fill 175ms ease-in-out;\n fill: var(--wcs-text-light);\n }\n .second-arrow {\n transform: translateY(-8px);\n }\n .next {\n transform: rotate(90deg);\n }\n .previous {\n transform: rotate(-90deg);\n }\n .active {\n fill: var(--wcs-primary);\n }\n `}</style>\n <g fill=\"none\" class={order + ' arrow-group'}>\n <path class={(active ? 'active' : '') + ' arrow'} d=\"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z\"/>\n <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\n </g>\n {\n double ?\n <g fill=\"none\" class={order + ' arrow-group'}>\n <path class={(active ? 'active' : '') + ' arrow second-arrow'}\n d=\"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z\"/>\n <path d=\"M0 0h24v24H0z\" fill=\"none\"/>\n </g>\n : ''\n }\n </svg>\n </wcs-button>\n);\n","@import '../../style/focus-outline.scss';\n\n:host {\n display: block;\n border-style: solid none none;\n border-width: 1px;\n border-color: var(--wcs-text-light);\n}\n\n.container {\n display: grid;\n grid-template-columns: auto auto auto;\n justify-content: space-between;\n color: var(--wcs-text-medium);\n align-items: center;\n}\n\n.available-page-sizes {\n width: auto;\n}\n\n.page-management, .page-size, .items-count {\n display: flex;\n align-items: center;\n}\n\n.page-management {\n margin: 0;\n padding: 0;\n list-style-type: none;\n}\n\n.pagination-arrow {\n display: flex;\n}\n\n.pagination-counter {\n padding: 0 var(--wcs-padding-s);\n}\n\n.items-count span:focus {\n @include focus-outline();\n}\n","import {\n Component,\n ComponentInterface,\n Event, EventEmitter,\n h,\n Host,\n Prop\n} from '@stencil/core';\nimport {\n WcsGridPaginationChangeEventDetails\n} from '../grid/grid-interface';\nimport { SelectChangeEventDetail } from '../select/select-interface';\nimport { GridPaginationArrow } from './grid-pagination-arrow';\n\n/**\n * The grid pagination is a subcomponent of `wcs-grid`, slotted in `grid-pagination` under the `<table>` element.\n */\n@Component({\n tag: 'wcs-grid-pagination',\n styleUrl: 'grid-pagination.scss',\n shadow: true\n})\nexport class GridPagination implements ComponentInterface {\n static readonly INDEX_FIRST_PAGE: number = 0;\n /**\n * Set the available page sizes in the pagination dropdown on the left.\n */\n @Prop() availablePageSizes: number[] = [10, 20, 50];\n /**\n * The current page of the pagination. First page starts at index 0.\n */\n @Prop() currentPage: number = GridPagination.INDEX_FIRST_PAGE;\n /**\n * Maximum number of elements shown per page. \n * Default is the first value of `availablePageSizes`.\n */\n @Prop() pageSize: number = this.availablePageSizes[0];\n /**\n * Total elements in the grid. \n * - **Grid in `Server mode`** : You have to set `itemsCount` = your total data length. \n * - **Grid not in Server mode** : Do not set it manually : itemsCount is set and updated every pagination refresh.\n */\n @Prop() itemsCount: number = 0;\n /**\n * Max number of pages. \n * - **Grid in `Server mode`** : You have to set `pageCount` = `itemsCount` divided by `pageSize`. \n * - **Grid not in Server mode** : Do not set it manually : pageCount is set and updated every pagination refresh.\n */\n @Prop() pageCount: number = 1;\n /**\n * Event emitted when the pagination changes.\n */\n @Event() wcsGridPaginationChange!: EventEmitter<WcsGridPaginationChangeEventDetails>;\n\n private lastPage(): void {\n this.currentPage = this.pageCount - 1;\n this.emitPaginationChange();\n }\n\n private nextPage(): void {\n if (this.canGoToNextPage()) {\n this.currentPage++;\n this.emitPaginationChange();\n }\n }\n\n private canGoToNextPage(): boolean {\n return this.currentPage + 1 < this.pageCount;\n }\n\n private previousPage(): void {\n if (this.canGoToPreviousPage()) {\n this.currentPage--;\n this.emitPaginationChange();\n }\n }\n\n private canGoToPreviousPage(): boolean {\n return this.currentPage > 0;\n }\n\n private firstPage(): void {\n this.currentPage = 0;\n this.emitPaginationChange();\n }\n\n private onChangePagesize(event: CustomEvent<SelectChangeEventDetail>): void {\n this.pageSize = event.detail.value;\n if (this.currentPage + 1 > this.pageSize) {\n this.currentPage = 0;\n }\n this.emitPaginationChange();\n }\n\n private emitPaginationChange(): void {\n this.wcsGridPaginationChange.emit({\n pagination: {\n currentPage: this.currentPage,\n pageSize: this.pageSize,\n itemsCount: this.itemsCount,\n pageCount: this.pageCount\n }\n });\n }\n\n render(): any {\n return (<Host slot=\"grid-pagination\">\n <div class=\"container\">\n <div class=\"page-size\">\n <wcs-select placeholder=\"Eléments par page\"\n class=\"available-page-sizes\"\n aria-labelledby=\"elements-per-page-number elements-per-page-text\"\n value={this.pageSize}\n onWcsChange={this.onChangePagesize.bind(this)}>\n {\n this.availablePageSizes.map((pageSize) =>\n <wcs-select-option value={pageSize}>{pageSize}</wcs-select-option>\n )\n }\n </wcs-select>\n <span id=\"elements-per-page-number\" hidden>{this.pageSize}</span>\n <span id=\"elements-per-page-text\"> éléments par page</span>\n </div>\n\n <div class=\"items-count\">\n <span>{this.itemsCount} éléments</span>\n </div>\n\n <nav aria-label=\"pagination\">\n <ul class=\"page-management\">\n <li class=\"pagination-arrow\" onClick={this.firstPage.bind(this)}>\n <GridPaginationArrow active={this.canGoToPreviousPage()} order=\"previous\" double></GridPaginationArrow>\n </li>\n <li class=\"pagination-arrow\" onClick={this.previousPage.bind(this)}>\n <GridPaginationArrow active={this.canGoToPreviousPage()} order=\"previous\"></GridPaginationArrow>\n </li>\n \n <li class=\"pagination-counter\">\n <span aria-label={`Page ${this.currentPage + 1} sur ${this.pageCount}`} aria-current=\"page\">\n {this.currentPage + 1} / {this.pageCount}\n </span>\n </li>\n \n <li class=\"pagination-arrow\" onClick={this.nextPage.bind(this)}>\n <GridPaginationArrow active={this.canGoToNextPage()} order=\"next\"></GridPaginationArrow>\n </li>\n <li class=\"pagination-arrow\" onClick={this.lastPage.bind(this)}>\n <GridPaginationArrow active={this.canGoToNextPage()} order=\"next\" double></GridPaginationArrow>\n </li>\n </ul>\n </nav>\n </div>\n </Host>)\n }\n}\n"],"version":3}
|
|
@@ -22,7 +22,7 @@ const debounce = (func, wait = 0) => {
|
|
|
22
22
|
/**
|
|
23
23
|
* Elements inside of web components sometimes need to inherit global attributes
|
|
24
24
|
* set on the host. For example, the inner input in `wcs-input` should inherit
|
|
25
|
-
* the `title` attribute that developers set directly on `
|
|
25
|
+
* the `title` attribute that developers set directly on `wcs-input`. This
|
|
26
26
|
* helper function should be called in componentWillLoad and assigned to a variable
|
|
27
27
|
* that is later used in the render function.
|
|
28
28
|
*
|
|
@@ -42,6 +42,78 @@ const inheritAttributes = (el, attributes = []) => {
|
|
|
42
42
|
});
|
|
43
43
|
return attributeObject;
|
|
44
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* List of available ARIA attributes + `role`.
|
|
47
|
+
* Removed deprecated attributes.
|
|
48
|
+
* https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes
|
|
49
|
+
*/
|
|
50
|
+
const ariaAttributes = [
|
|
51
|
+
'role',
|
|
52
|
+
'aria-activedescendant',
|
|
53
|
+
'aria-atomic',
|
|
54
|
+
'aria-autocomplete',
|
|
55
|
+
'aria-braillelabel',
|
|
56
|
+
'aria-brailleroledescription',
|
|
57
|
+
'aria-busy',
|
|
58
|
+
'aria-checked',
|
|
59
|
+
'aria-colcount',
|
|
60
|
+
'aria-colindex',
|
|
61
|
+
'aria-colindextext',
|
|
62
|
+
'aria-colspan',
|
|
63
|
+
'aria-controls',
|
|
64
|
+
'aria-current',
|
|
65
|
+
'aria-describedby',
|
|
66
|
+
'aria-description',
|
|
67
|
+
'aria-details',
|
|
68
|
+
'aria-disabled',
|
|
69
|
+
'aria-errormessage',
|
|
70
|
+
'aria-expanded',
|
|
71
|
+
'aria-flowto',
|
|
72
|
+
'aria-haspopup',
|
|
73
|
+
'aria-hidden',
|
|
74
|
+
'aria-invalid',
|
|
75
|
+
'aria-keyshortcuts',
|
|
76
|
+
'aria-label',
|
|
77
|
+
'aria-labelledby',
|
|
78
|
+
'aria-level',
|
|
79
|
+
'aria-live',
|
|
80
|
+
'aria-multiline',
|
|
81
|
+
'aria-multiselectable',
|
|
82
|
+
'aria-orientation',
|
|
83
|
+
'aria-owns',
|
|
84
|
+
'aria-placeholder',
|
|
85
|
+
'aria-posinset',
|
|
86
|
+
'aria-pressed',
|
|
87
|
+
'aria-readonly',
|
|
88
|
+
'aria-relevant',
|
|
89
|
+
'aria-required',
|
|
90
|
+
'aria-roledescription',
|
|
91
|
+
'aria-rowcount',
|
|
92
|
+
'aria-rowindex',
|
|
93
|
+
'aria-rowindextext',
|
|
94
|
+
'aria-rowspan',
|
|
95
|
+
'aria-selected',
|
|
96
|
+
'aria-setsize',
|
|
97
|
+
'aria-sort',
|
|
98
|
+
'aria-valuemax',
|
|
99
|
+
'aria-valuemin',
|
|
100
|
+
'aria-valuenow',
|
|
101
|
+
'aria-valuetext',
|
|
102
|
+
];
|
|
103
|
+
/**
|
|
104
|
+
* Returns an array of aria attributes that should be copied from
|
|
105
|
+
* the shadow host element to a target within the light DOM.
|
|
106
|
+
* @param el The element that the attributes should be copied from.
|
|
107
|
+
* @param ignoreList The list of aria-attributes to ignore reflecting and removing from the host.
|
|
108
|
+
* Use this in instances where we manually specify aria attributes on the `<Host>` element.
|
|
109
|
+
*/
|
|
110
|
+
const inheritAriaAttributes = (el, ignoreList) => {
|
|
111
|
+
let attributesToInherit = ariaAttributes;
|
|
112
|
+
if (ignoreList && ignoreList.length > 0) {
|
|
113
|
+
attributesToInherit = attributesToInherit.filter((attr) => !ignoreList.includes(attr));
|
|
114
|
+
}
|
|
115
|
+
return inheritAttributes(el, attributesToInherit);
|
|
116
|
+
};
|
|
45
117
|
const findItemLabel = (componentEl) => {
|
|
46
118
|
const itemEl = componentEl.closest('wcs-form-field');
|
|
47
119
|
if (itemEl) {
|
|
@@ -119,6 +191,6 @@ function isTabKey(evt) {
|
|
|
119
191
|
return evt.key === 'Tab';
|
|
120
192
|
}
|
|
121
193
|
|
|
122
|
-
export { isEnterKey as a, isEscapeKey as b, isKeyup as c, isKeydown as d, isHomeKey as e, isEndKey as f, clickTargetIsElementOrChildren as g, clickInsideElement as h, isSpaceKey as i,
|
|
194
|
+
export { isEnterKey as a, isEscapeKey as b, isKeyup as c, isKeydown as d, isHomeKey as e, isEndKey as f, clickTargetIsElementOrChildren as g, clickInsideElement as h, isSpaceKey as i, isPageUpKey as j, isPageDownKey as k, isTabKey as l, debounceEvent as m, inheritAriaAttributes as n, inheritAttributes as o, findItemLabel as p, isDownArrowKey as q, isUpArrowKey as r, isLeftArrowKey as s, isRightArrowKey as t, raf as u, generateUniqueId as v, isElement as w, hasShadowDom as x };
|
|
123
195
|
|
|
124
|
-
//# sourceMappingURL=helpers-
|
|
196
|
+
//# sourceMappingURL=helpers-a21ae7d0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"helpers-a21ae7d0.js","mappings":"SAEgB,SAAS,CAAC,OAAY;EAClC,OAAO,aAAa,IAAI,OAAO;OACxB,cAAc,IAAI,OAAO,CAAC;AACrC,CAAC;SAEe,YAAY,CAAC,EAAe;EACxC,OAAO,CAAC,CAAC,EAAE,CAAC,UAAU,IAAI,CAAC,CAAE,EAAU,CAAC,YAA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AC,GAAG,KAAK,OAAO,CAAC;AAC/B,CAAC;SAEe,SAAS,CAAC,GAAkB;EACxC,OAAO,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC;AAC/B,CAAC;SAEe,QAAQ,CAAC,GAAkB;EACvC,OAAO,GAAG,CAAC,IAAI,KAAK,KAAK,CAAC;AAC9B,CAAC;SAEe,YAAY,CAAC,GAAkB;EAC3C,OAAO,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC;AACjC,CAAC;SAEe,cAAc,CAAC,GAAkB;EAC7C,OAAO,GAAG,CAAC,GAAG,KAAK,WAAW,CAAC;AACnC,CAAC;SAEe,cAAc,CAAC,GAAkB;EAC7C,OAAO,GAAG,CAAC,GAAG,KAAK,WAAW,CAAC;AACnC,CAAC;SAEe,eAAe,CAAC,GAAkB;EAC9C,OAAO,GAAG,CAAC,GAAG,KAAK,YAAY,CAAC;AACpC,CAAC;SAEe,aAAa,CAAC,GAAkB;EAC5C,OAAO,GAAG,CAAC,GAAG,KAAK,UAAU,CAAC;AAClC,CAAC;SAEe,WAAW,CAAC,GAAkB;EAC1C,OAAO,GAAG,CAAC,GAAG,KAAK,QAAQ,CAAC;AAChC,CAAC;SAEe,QAAQ,CAAC,GAAkB;EACvC,OAAO,GAAG,CAAC,GAAG,KAAK,KAAK,CAAC;AAC7B;;;;","names":[],"sources":["./src/utils/helpers.ts"],"sourcesContent":["import { EventEmitter } from '@stencil/core';\n\nexport function isElement(element: any): element is Element {\n return 'clientWidth' in element\n && 'clientHeight' in element;\n}\n\nexport function hasShadowDom(el: HTMLElement) {\n return !!el.shadowRoot && !!(el as any).attachShadow;\n}\n\nexport const debounceEvent = (event: EventEmitter, wait: number): EventEmitter => {\n const original = (event as any)._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait)\n } as EventEmitter;\n};\n\nexport const debounce = (func: (...args: any[]) => void, wait = 0) => {\n let timer: any;\n return (...args: any[]): any => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n\n/**\n * Elements inside of web components sometimes need to inherit global attributes\n * set on the host. For example, the inner input in `wcs-input` should inherit\n * the `title` attribute that developers set directly on `wcs-input`. This\n * helper function should be called in componentWillLoad and assigned to a variable\n * that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (el: HTMLElement, attributes: string[] = []) => {\n const attributeObject: { [k: string]: any } = {};\n\n attributes.forEach(attr => {\n if (el.hasAttribute(attr)) {\n const value = el.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = el.getAttribute(attr);\n }\n el.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n}\n\n/**\n * List of available ARIA attributes + `role`.\n * Removed deprecated attributes.\n * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes\n */\nconst ariaAttributes = [\n 'role',\n 'aria-activedescendant',\n 'aria-atomic',\n 'aria-autocomplete',\n 'aria-braillelabel',\n 'aria-brailleroledescription',\n 'aria-busy',\n 'aria-checked',\n 'aria-colcount',\n 'aria-colindex',\n 'aria-colindextext',\n 'aria-colspan',\n 'aria-controls',\n 'aria-current',\n 'aria-describedby',\n 'aria-description',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-flowto',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-level',\n 'aria-live',\n 'aria-multiline',\n 'aria-multiselectable',\n 'aria-orientation',\n 'aria-owns',\n 'aria-placeholder',\n 'aria-posinset',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-relevant',\n 'aria-required',\n 'aria-roledescription',\n 'aria-rowcount',\n 'aria-rowindex',\n 'aria-rowindextext',\n 'aria-rowspan',\n 'aria-selected',\n 'aria-setsize',\n 'aria-sort',\n 'aria-valuemax',\n 'aria-valuemin',\n 'aria-valuenow',\n 'aria-valuetext',\n];\n\n/**\n * Returns an array of aria attributes that should be copied from\n * the shadow host element to a target within the light DOM.\n * @param el The element that the attributes should be copied from.\n * @param ignoreList The list of aria-attributes to ignore reflecting and removing from the host.\n * Use this in instances where we manually specify aria attributes on the `<Host>` element.\n */\nexport const inheritAriaAttributes = (el: HTMLElement, ignoreList?: string[]) => {\n let attributesToInherit = ariaAttributes;\n if (ignoreList && ignoreList.length > 0) {\n attributesToInherit = attributesToInherit.filter((attr) => !ignoreList.includes(attr));\n }\n return inheritAttributes(el, attributesToInherit);\n};\n\nexport const findItemLabel = (componentEl: HTMLElement): HTMLWcsLabelElement | null => {\n const itemEl = componentEl.closest('wcs-form-field');\n if (itemEl) {\n return itemEl.querySelector('wcs-label');\n }\n return null;\n};\n\ndeclare const __zone_symbol__requestAnimationFrame: any;\n\n/**\n * Patched version of requestAnimationFrame that avoids ngzone\n * Use only when you know ngzone should not run\n */\nexport const raf = (h: any) => {\n if (typeof __zone_symbol__requestAnimationFrame === 'function') {\n return __zone_symbol__requestAnimationFrame(h);\n }\n if (typeof requestAnimationFrame === 'function') {\n return requestAnimationFrame(h);\n }\n return setTimeout(h);\n};\n\n/**\n * Return true if the mouseEvent click is inside the given HTML element\n */\nexport const clickInsideElement = (event: MouseEvent, element: HTMLElement): boolean => {\n return event.x >= element.getBoundingClientRect().x && event.x <= element.getBoundingClientRect().x + element.getBoundingClientRect().width\n && event.y >= element.getBoundingClientRect().y && event.y <= element.getBoundingClientRect().y + element.getBoundingClientRect().height;\n}\n\n\nexport const clickTargetIsElementOrChildren = (mouseEvent: MouseEvent, element: HTMLElement) => {\n return mouseEvent.target instanceof Node\n && element.contains(mouseEvent.target);\n}\n\nexport function generateUniqueId(componentName: string): string {\n return componentName + \"-\" + Math.random().toString(36);\n}\n\nexport function isKeyup(evt: KeyboardEvent) {\n return evt.code === 'ArrowUp';\n}\n\nexport function isKeydown(evt: KeyboardEvent) {\n return evt.code === 'ArrowDown';\n}\n\nexport function isEscapeKey(evt: KeyboardEvent) {\n return evt.code === 'Escape';\n}\n\nexport function isSpaceKey(evt: KeyboardEvent) {\n return evt.code === 'Space';\n}\n\nexport function isEnterKey(evt: KeyboardEvent) {\n return evt.key === 'Enter';\n}\n\nexport function isHomeKey(evt: KeyboardEvent) {\n return evt.code === 'Home';\n}\n\nexport function isEndKey(evt: KeyboardEvent) {\n return evt.code === 'End';\n}\n\nexport function isUpArrowKey(evt: KeyboardEvent) {\n return evt.key === 'ArrowUp';\n}\n\nexport function isDownArrowKey(evt: KeyboardEvent) {\n return evt.key === 'ArrowDown';\n}\n\nexport function isLeftArrowKey(evt: KeyboardEvent) {\n return evt.key === 'ArrowLeft';\n}\n\nexport function isRightArrowKey(evt: KeyboardEvent) {\n return evt.key === 'ArrowRight';\n}\n\nexport function isPageDownKey(evt: KeyboardEvent) {\n return evt.key === 'PageDown';\n}\n\nexport function isPageUpKey(evt: KeyboardEvent) {\n return evt.key === 'PageUp';\n}\n\nexport function isTabKey(evt: KeyboardEvent) {\n return evt.key === 'Tab';\n}\n\nexport function isCtrlA(evt: KeyboardEvent) {\n return evt.key === 'a' && evt.ctrlKey;\n}"],"version":3}
|
|
@@ -1385,6 +1385,9 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1385
1385
|
promise = safeCall(instance, 'componentWillUpdate');
|
|
1386
1386
|
}
|
|
1387
1387
|
}
|
|
1388
|
+
{
|
|
1389
|
+
promise = then(promise, () => safeCall(instance, 'componentWillRender'));
|
|
1390
|
+
}
|
|
1388
1391
|
endSchedule();
|
|
1389
1392
|
return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1390
1393
|
};
|
|
@@ -2122,4 +2125,4 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
|
2122
2125
|
|
|
2123
2126
|
export { Host as H, readTask as a, bootstrapLazy as b, createEvent as c, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2124
2127
|
|
|
2125
|
-
//# sourceMappingURL=index-
|
|
2128
|
+
//# sourceMappingURL=index-4f282598.js.map
|