@paperless/core 1.17.5 → 1.18.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/CHANGELOG.md +14 -0
- package/dist/assets/i18n/page-size-select.i18n.en.json +2 -2
- package/dist/assets/i18n/page-size-select.i18n.nl.json +2 -2
- package/dist/assets/i18n/table-footer.i18n.en.json +1 -1
- package/dist/assets/i18n/table-footer.i18n.nl.json +1 -1
- package/dist/assets/i18n/table-header.i18n.en.json +4 -4
- package/dist/assets/i18n/table-header.i18n.nl.json +4 -4
- package/dist/assets/i18n/table.i18n.en.json +15 -15
- package/dist/assets/i18n/table.i18n.nl.json +15 -15
- package/dist/build/p-03090f03.entry.js.map +1 -1
- package/dist/build/p-085e6ff4.entry.js.map +1 -1
- package/dist/build/p-2becd73c.entry.js.map +1 -1
- package/dist/build/p-2cb55f24.entry.js.map +1 -1
- package/dist/build/p-2cd5062f.entry.js.map +1 -1
- package/dist/build/p-35c563a7.entry.js.map +1 -1
- package/dist/build/p-415c5040.entry.js.map +1 -1
- package/dist/build/p-424d5c8a.entry.js.map +1 -1
- package/dist/build/p-46a939e2.entry.js.map +1 -1
- package/dist/build/p-4c30c74b.entry.js.map +1 -1
- package/dist/build/p-4dc5647e.entry.js.map +1 -1
- package/dist/build/p-4e9e4ce2.entry.js.map +1 -1
- package/dist/build/p-606ad811.entry.js.map +1 -1
- package/dist/build/p-682db916.entry.js.map +1 -1
- package/dist/build/p-699e0b35.entry.js.map +1 -1
- package/dist/build/p-6a5aeb90.entry.js.map +1 -1
- package/dist/build/p-7793ba3a.entry.js.map +1 -1
- package/dist/build/p-7d15ff9a.entry.js.map +1 -1
- package/dist/build/p-8426ca20.entry.js.map +1 -1
- package/dist/build/p-93052b42.entry.js.map +1 -1
- package/dist/build/p-97bcf0b5.entry.js.map +1 -1
- package/dist/build/p-9c914665.entry.js.map +1 -1
- package/dist/build/p-9d3d72fa.entry.js.map +1 -1
- package/dist/build/p-a2b552f9.entry.js.map +1 -1
- package/dist/build/p-a7344d53.entry.js +2 -0
- package/dist/build/p-a7344d53.entry.js.map +1 -0
- package/dist/build/p-af6b813e.entry.js.map +1 -1
- package/dist/build/p-b6f43309.entry.js.map +1 -1
- package/dist/build/p-b7c0f157.entry.js.map +1 -1
- package/dist/build/p-c644d1e3.entry.js.map +1 -1
- package/dist/build/p-c9b840a7.entry.js.map +1 -1
- package/dist/build/p-cb2674b5.entry.js.map +1 -1
- package/dist/build/p-cf7bd354.entry.js.map +1 -1
- package/dist/build/p-d0796984.entry.js.map +1 -1
- package/dist/build/p-d23db949.entry.js.map +1 -1
- package/dist/build/p-dace47c5.entry.js.map +1 -1
- package/dist/build/p-dd20caf1.entry.js.map +1 -1
- package/dist/build/p-dfa8eae9.entry.js +2 -0
- package/dist/build/p-dfa8eae9.entry.js.map +1 -0
- package/dist/build/p-ec15ee73.entry.js.map +1 -1
- package/dist/build/p-ec29eed0.entry.js.map +1 -1
- package/dist/build/p-f0f1a46b.entry.js.map +1 -1
- package/dist/build/p-f34e08ec.entry.js.map +1 -1
- package/dist/build/p-f9e52ae3.entry.js.map +1 -1
- package/dist/build/p-fac13366.entry.js.map +1 -1
- package/dist/build/paperless.css +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/build/paperless.esm.js.map +1 -1
- package/dist/cjs/index-1fde8b14.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/p-attachment.cjs.entry.js.map +1 -1
- package/dist/cjs/p-avatar-group.cjs.entry.js.map +1 -1
- package/dist/cjs/p-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/p-backdrop.cjs.entry.js.map +1 -1
- package/dist/cjs/p-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/p-calendar.cjs.entry.js +2 -2
- package/dist/cjs/p-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/p-card-body.cjs.entry.js.map +1 -1
- package/dist/cjs/p-card-container.cjs.entry.js.map +1 -1
- package/dist/cjs/p-card-header.cjs.entry.js.map +1 -1
- package/dist/cjs/p-content-slider.cjs.entry.js.map +1 -1
- package/dist/cjs/p-counter.cjs.entry.js.map +1 -1
- package/dist/cjs/p-cropper.cjs.entry.js.map +1 -1
- package/dist/cjs/p-datepicker.cjs.entry.js.map +1 -1
- package/dist/cjs/p-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/p-drawer-body_3.cjs.entry.js.map +1 -1
- package/dist/cjs/p-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/p-dropdown-menu-container.cjs.entry.js.map +1 -1
- package/dist/cjs/p-dropdown_2.cjs.entry.js +7 -2
- package/dist/cjs/p-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/p-floating-menu-container_8.cjs.entry.js +40 -40
- package/dist/cjs/p-floating-menu-container_8.cjs.entry.js.map +1 -1
- package/dist/cjs/p-helper_3.cjs.entry.js +4 -4
- package/dist/cjs/p-helper_3.cjs.entry.js.map +1 -1
- package/dist/cjs/p-info-panel.cjs.entry.js.map +1 -1
- package/dist/cjs/p-label_3.cjs.entry.js +1 -1
- package/dist/cjs/p-label_3.cjs.entry.js.map +1 -1
- package/dist/cjs/p-layout.cjs.entry.js.map +1 -1
- package/dist/cjs/p-modal-body_4.cjs.entry.js.map +1 -1
- package/dist/cjs/p-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/p-navbar.cjs.entry.js.map +1 -1
- package/dist/cjs/p-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/p-page-size-select_3.cjs.entry.js.map +1 -1
- package/dist/cjs/p-profile.cjs.entry.js.map +1 -1
- package/dist/cjs/p-select.cjs.entry.js +136 -18
- package/dist/cjs/p-select.cjs.entry.js.map +1 -1
- package/dist/cjs/p-slider-indicator.cjs.entry.js.map +1 -1
- package/dist/cjs/p-status.cjs.entry.js.map +1 -1
- package/dist/cjs/p-stepper-item.cjs.entry.js.map +1 -1
- package/dist/cjs/p-stepper-line.cjs.entry.js.map +1 -1
- package/dist/cjs/p-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/p-tab-group.cjs.entry.js.map +1 -1
- package/dist/cjs/p-tab-item.cjs.entry.js.map +1 -1
- package/dist/cjs/p-table-column.cjs.entry.js.map +1 -1
- package/dist/cjs/p-table.cjs.entry.js.map +1 -1
- package/dist/cjs/p-toast-container.cjs.entry.js.map +1 -1
- package/dist/cjs/p-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/p-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/components/atoms/avatar/avatar.component.js +1 -1
- package/dist/collection/components/atoms/avatar/avatar.component.js.map +1 -1
- package/dist/collection/components/atoms/avatar/test/avatar.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/avatar/test/avatar.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/avatar-group/avatar-group.component.js.map +1 -1
- package/dist/collection/components/atoms/avatar-group/test/avatar-group.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/avatar-group/test/avatar-group.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/backdrop/backdrop.component.js +1 -1
- package/dist/collection/components/atoms/backdrop/backdrop.component.js.map +1 -1
- package/dist/collection/components/atoms/backdrop/test/backdrop.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/backdrop/test/backdrop.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/button/button.component.js.map +1 -1
- package/dist/collection/components/atoms/button/test/button.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/button/test/button.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/card-body/card-body.component.js.map +1 -1
- package/dist/collection/components/atoms/card-body/test/card-body.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/card-body/test/card-body.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/card-container/card-container.component.js.map +1 -1
- package/dist/collection/components/atoms/card-container/test/card-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/card-container/test/card-container.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/card-header/card-header.component.js.map +1 -1
- package/dist/collection/components/atoms/card-header/test/card-header.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/card-header/test/card-header.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/counter/counter.component.js.map +1 -1
- package/dist/collection/components/atoms/counter/test/counter.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/counter/test/counter.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/divider/divider.component.js.map +1 -1
- package/dist/collection/components/atoms/divider/test/divider.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/divider/test/divider.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/drawer-body/drawer-body.component.js.map +1 -1
- package/dist/collection/components/atoms/drawer-body/test/drawer-body.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/drawer-body/test/drawer-body.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/drawer-container/drawer-container.component.js.map +1 -1
- package/dist/collection/components/atoms/drawer-container/test/drawer-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/drawer-container/test/drawer-container.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/drawer-header/drawer-header.component.js.map +1 -1
- package/dist/collection/components/atoms/drawer-header/test/drawer-header.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/drawer-header/test/drawer-header.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.js.map +1 -1
- package/dist/collection/components/atoms/dropdown-menu-container/test/dropdown-menu-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/dropdown-menu-container/test/dropdown-menu-item.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.css +1 -1
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js +21 -2
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js.map +1 -1
- package/dist/collection/components/atoms/dropdown-menu-item/test/dropdown-menu-item.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/dropdown-menu-item/test/dropdown-menu-item.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/floating-menu-container/floating-menu-container.component.js.map +1 -1
- package/dist/collection/components/atoms/floating-menu-container/test/floating-menu-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/floating-menu-container/test/floating-menu-container.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.js.map +1 -1
- package/dist/collection/components/atoms/floating-menu-item/test/floating-menu-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/floating-menu-item/test/floating-menu-container.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/helper/helper.component.js.map +1 -1
- package/dist/collection/components/atoms/helper/test/helper.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/helper/test/helper.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/icon/icon.component.js.map +1 -1
- package/dist/collection/components/atoms/icon/test/icon.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/icon/test/icon.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/illustration/illustration.component.js +1 -1
- package/dist/collection/components/atoms/illustration/illustration.component.js.map +1 -1
- package/dist/collection/components/atoms/illustration/test/illustration.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/illustration/test/illustration.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/info-panel/info-panel.component.js.map +1 -1
- package/dist/collection/components/atoms/info-panel/test/info-panel.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/info-panel/test/info-panel.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/label/label.component.js +2 -2
- package/dist/collection/components/atoms/label/label.component.js.map +1 -1
- package/dist/collection/components/atoms/label/test/label.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/label/test/label.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/layout/layout.component.js.map +1 -1
- package/dist/collection/components/atoms/layout/test/layout.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/layout/test/layout.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/loader/loader.component.js +1 -1
- package/dist/collection/components/atoms/loader/loader.component.js.map +1 -1
- package/dist/collection/components/atoms/loader/test/loader.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/loader/test/loader.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/modal-body/modal-body.component.js.map +1 -1
- package/dist/collection/components/atoms/modal-body/test/modal-body.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/modal-body/test/modal-body.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/modal-container/modal-container.component.js.map +1 -1
- package/dist/collection/components/atoms/modal-container/test/modal-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/modal-container/test/modal-container.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/modal-footer/modal-footer.component.js.map +1 -1
- package/dist/collection/components/atoms/modal-footer/test/modal-footer.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/modal-footer/test/modal-footer.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/modal-header/modal-header.component.js.map +1 -1
- package/dist/collection/components/atoms/modal-header/test/modal-header.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/modal-header/test/modal-header.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/pagination-item/pagination-item.component.js.map +1 -1
- package/dist/collection/components/atoms/pagination-item/test/pagination-item.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/pagination-item/test/pagination-item.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/segment-container/segment-container.component.js.map +1 -1
- package/dist/collection/components/atoms/segment-container/test/segment-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/segment-container/test/segment-container.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/segment-item/segment-item.component.js +1 -1
- package/dist/collection/components/atoms/segment-item/segment-item.component.js.map +1 -1
- package/dist/collection/components/atoms/segment-item/test/segment-item.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/segment-item/test/segment-item.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.js.map +1 -1
- package/dist/collection/components/atoms/slider-indicator/test/slider-indicator.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/slider-indicator/test/slider-indicator.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/status/status.component.js.map +1 -1
- package/dist/collection/components/atoms/status/test/status.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/status/test/status.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/stepper-item/stepper-item.component.js.map +1 -1
- package/dist/collection/components/atoms/stepper-item/test/stepper-item.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/stepper-item/test/stepper-item.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/stepper-line/stepper-line.component.js.map +1 -1
- package/dist/collection/components/atoms/stepper-line/test/stepper-line.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/stepper-line/test/stepper-line.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/tab-group/tab-group.component.js.map +1 -1
- package/dist/collection/components/atoms/tab-group/test/tab-group.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/tab-group/test/tab-group.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/tab-item/tab-item.component.js.map +1 -1
- package/dist/collection/components/atoms/tab-item/test/tab-item.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/tab-item/test/tab-item.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/table-container/table-container.component.js.map +1 -1
- package/dist/collection/components/atoms/table-container/test/table-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/table-container/test/table-container.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/toast-container/test/toast-container.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/toast-container/test/toast-container.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/toast-container/toast-container.component.js.map +1 -1
- package/dist/collection/components/atoms/tooltip/test/tooltip.component.e2e.js.map +1 -1
- package/dist/collection/components/atoms/tooltip/test/tooltip.component.spec.js.map +1 -1
- package/dist/collection/components/atoms/tooltip/tooltip.component.js.map +1 -1
- package/dist/collection/components/helpers/table-column/table-column.component.js +1 -1
- package/dist/collection/components/helpers/table-column/table-column.component.js.map +1 -1
- package/dist/collection/components/molecules/accordion/accordion.component.js.map +1 -1
- package/dist/collection/components/molecules/accordion/test/accordion.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/accordion/test/accordion.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/attachment/attachment.component.js.map +1 -1
- package/dist/collection/components/molecules/attachment/test/attachment.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/attachment/test/attachment.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/calendar/calendar.component.js +2 -2
- package/dist/collection/components/molecules/calendar/calendar.component.js.map +1 -1
- package/dist/collection/components/molecules/calendar/test/calendar.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/calendar/test/calendar.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/content-slider/content-slider.component.js.map +1 -1
- package/dist/collection/components/molecules/content-slider/test/content-slider.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/content-slider/test/content-slider.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/cropper/cropper.component.js.map +1 -1
- package/dist/collection/components/molecules/cropper/test/cropper.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/cropper/test/cropper.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/datepicker/datepicker.component.js.map +1 -1
- package/dist/collection/components/molecules/datepicker/test/datepicker.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/datepicker/test/datepicker.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/dropdown/dropdown.component.js +22 -0
- package/dist/collection/components/molecules/dropdown/dropdown.component.js.map +1 -1
- package/dist/collection/components/molecules/dropdown/test/dropdown.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/dropdown/test/dropdown.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/input-error/input-error.component.js.map +1 -1
- package/dist/collection/components/molecules/input-error/test/input-error.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/input-error/test/input-error.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/input-group/input-group.component.js +4 -4
- package/dist/collection/components/molecules/input-group/input-group.component.js.map +1 -1
- package/dist/collection/components/molecules/input-group/test/input-group.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/input-group/test/input-group.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/navigation-item/navigation-item.component.js.map +1 -1
- package/dist/collection/components/molecules/navigation-item/test/navigation-item.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/navigation-item/test/navigation-item.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/page-size-select/page-size-select.component.js +2 -2
- package/dist/collection/components/molecules/page-size-select/page-size-select.component.js.map +1 -1
- package/dist/collection/components/molecules/page-size-select/test/page-size-select.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/page-size-select/test/page-size-select.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/pagination/pagination.component.js +1 -1
- package/dist/collection/components/molecules/pagination/pagination.component.js.map +1 -1
- package/dist/collection/components/molecules/pagination/test/pagination.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/pagination/test/pagination.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/profile/profile.component.js.map +1 -1
- package/dist/collection/components/molecules/profile/test/profile.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/profile/test/profile.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/select/select.component.css +1 -1
- package/dist/collection/components/molecules/select/select.component.js +238 -18
- package/dist/collection/components/molecules/select/select.component.js.map +1 -1
- package/dist/collection/components/molecules/select/test/select.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/select/test/select.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/stepper/stepper.component.js.map +1 -1
- package/dist/collection/components/molecules/stepper/test/stepper.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/stepper/test/stepper.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/table-cell/table-cell.component.js +40 -40
- package/dist/collection/components/molecules/table-cell/table-cell.component.js.map +1 -1
- package/dist/collection/components/molecules/table-cell/test/table-cell.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/table-cell/test/table-cell.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/table-footer/table-footer.component.js +2 -2
- package/dist/collection/components/molecules/table-footer/table-footer.component.js.map +1 -1
- package/dist/collection/components/molecules/table-footer/test/table-footer.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/table-footer/test/table-footer.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/table-header/table-header.component.js.map +1 -1
- package/dist/collection/components/molecules/table-header/test/table-header.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/table-header/test/table-header.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/table-row/table-row.component.js.map +1 -1
- package/dist/collection/components/molecules/table-row/test/table-row.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/table-row/test/table-row.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/toast/test/toast.component.e2e.js.map +1 -1
- package/dist/collection/components/molecules/toast/test/toast.component.spec.js.map +1 -1
- package/dist/collection/components/molecules/toast/toast.component.js.map +1 -1
- package/dist/collection/components/organisms/drawer/drawer.component.js +2 -2
- package/dist/collection/components/organisms/drawer/drawer.component.js.map +1 -1
- package/dist/collection/components/organisms/drawer/test/drawer.component.e2e.js.map +1 -1
- package/dist/collection/components/organisms/drawer/test/drawer.component.spec.js.map +1 -1
- package/dist/collection/components/organisms/modal/modal.component.js.map +1 -1
- package/dist/collection/components/organisms/modal/test/modal.component.e2e.js.map +1 -1
- package/dist/collection/components/organisms/modal/test/modal.component.spec.js.map +1 -1
- package/dist/collection/components/organisms/navbar/navbar.component.js.map +1 -1
- package/dist/collection/components/organisms/navbar/test/navbar.component.e2e.js.map +1 -1
- package/dist/collection/components/organisms/navbar/test/navbar.component.spec.js.map +1 -1
- package/dist/collection/components/organisms/table/table.component.js +6 -6
- package/dist/collection/components/organisms/table/table.component.js.map +1 -1
- package/dist/collection/components/organisms/table/test/table.component.e2e.js.map +1 -1
- package/dist/collection/components/organisms/table/test/table.component.spec.js.map +1 -1
- package/dist/components/avatar.component.js +70 -0
- package/dist/components/avatar.component.js.map +1 -0
- package/dist/components/backdrop.component.js.map +1 -1
- package/dist/components/button.component.js.map +1 -1
- package/dist/components/calendar.component.js +2 -2
- package/dist/components/calendar.component.js.map +1 -1
- package/dist/components/counter.component.js.map +1 -1
- package/dist/components/divider.component.js.map +1 -1
- package/dist/components/drawer-body.component.js.map +1 -1
- package/dist/components/drawer-container.component.js.map +1 -1
- package/dist/components/drawer-header.component.js.map +1 -1
- package/dist/components/dropdown-menu-container.component.js.map +1 -1
- package/dist/components/dropdown-menu-item.component.js +4 -2
- package/dist/components/dropdown-menu-item.component.js.map +1 -1
- package/dist/components/dropdown.component.js +5 -0
- package/dist/components/dropdown.component.js.map +1 -1
- package/dist/components/floating-menu-container.component.js.map +1 -1
- package/dist/components/floating-menu-item.component.js.map +1 -1
- package/dist/components/helper.component.js.map +1 -1
- package/dist/components/icon.component.js.map +1 -1
- package/dist/components/illustration.component.js +1 -1
- package/dist/components/illustration.component.js.map +1 -1
- package/dist/components/input-error.component.js.map +1 -1
- package/dist/components/input-group.component.js +4 -4
- package/dist/components/input-group.component.js.map +1 -1
- package/dist/components/label.component.js.map +1 -1
- package/dist/components/loader.component.js.map +1 -1
- package/dist/components/modal-body.component.js.map +1 -1
- package/dist/components/modal-container.component.js.map +1 -1
- package/dist/components/modal-footer.component.js.map +1 -1
- package/dist/components/modal-header.component.js.map +1 -1
- package/dist/components/p-accordion.js.map +1 -1
- package/dist/components/p-attachment.js.map +1 -1
- package/dist/components/p-avatar-group.js.map +1 -1
- package/dist/components/p-avatar.js +1 -66
- package/dist/components/p-avatar.js.map +1 -1
- package/dist/components/p-card-body.js.map +1 -1
- package/dist/components/p-card-container.js.map +1 -1
- package/dist/components/p-card-header.js.map +1 -1
- package/dist/components/p-content-slider.js.map +1 -1
- package/dist/components/p-cropper.js.map +1 -1
- package/dist/components/p-datepicker.js.map +1 -1
- package/dist/components/p-drawer.js.map +1 -1
- package/dist/components/p-info-panel.js.map +1 -1
- package/dist/components/p-layout.js.map +1 -1
- package/dist/components/p-modal.js.map +1 -1
- package/dist/components/p-navbar.js.map +1 -1
- package/dist/components/p-navigation-item.js.map +1 -1
- package/dist/components/p-profile.js.map +1 -1
- package/dist/components/p-select.js +150 -20
- package/dist/components/p-select.js.map +1 -1
- package/dist/components/p-status.js.map +1 -1
- package/dist/components/p-stepper-item.js.map +1 -1
- package/dist/components/p-stepper.js.map +1 -1
- package/dist/components/p-tab-group.js.map +1 -1
- package/dist/components/p-tab-item.js.map +1 -1
- package/dist/components/p-table-column.js.map +1 -1
- package/dist/components/p-table.js.map +1 -1
- package/dist/components/p-toast-container.js.map +1 -1
- package/dist/components/p-toast.js.map +1 -1
- package/dist/components/page-size-select.component.js.map +1 -1
- package/dist/components/pagination-item.component.js.map +1 -1
- package/dist/components/pagination.component.js.map +1 -1
- package/dist/components/segment-container.component.js.map +1 -1
- package/dist/components/segment-item.component.js +1 -1
- package/dist/components/segment-item.component.js.map +1 -1
- package/dist/components/slider-indicator.component.js.map +1 -1
- package/dist/components/stepper-line.component.js.map +1 -1
- package/dist/components/table-cell.component.js +39 -39
- package/dist/components/table-cell.component.js.map +1 -1
- package/dist/components/table-container.component.js.map +1 -1
- package/dist/components/table-footer.component.js.map +1 -1
- package/dist/components/table-header.component.js.map +1 -1
- package/dist/components/table-row.component.js.map +1 -1
- package/dist/components/tooltip.component.js.map +1 -1
- package/dist/esm/index-7b917f6b.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-accordion.entry.js.map +1 -1
- package/dist/esm/p-attachment.entry.js.map +1 -1
- package/dist/esm/p-avatar-group.entry.js.map +1 -1
- package/dist/esm/p-avatar.entry.js.map +1 -1
- package/dist/esm/p-backdrop.entry.js.map +1 -1
- package/dist/esm/p-button_3.entry.js.map +1 -1
- package/dist/esm/p-calendar.entry.js +2 -2
- package/dist/esm/p-calendar.entry.js.map +1 -1
- package/dist/esm/p-card-body.entry.js.map +1 -1
- package/dist/esm/p-card-container.entry.js.map +1 -1
- package/dist/esm/p-card-header.entry.js.map +1 -1
- package/dist/esm/p-content-slider.entry.js.map +1 -1
- package/dist/esm/p-counter.entry.js.map +1 -1
- package/dist/esm/p-cropper.entry.js.map +1 -1
- package/dist/esm/p-datepicker.entry.js.map +1 -1
- package/dist/esm/p-divider.entry.js.map +1 -1
- package/dist/esm/p-drawer-body_3.entry.js.map +1 -1
- package/dist/esm/p-drawer.entry.js.map +1 -1
- package/dist/esm/p-dropdown-menu-container.entry.js.map +1 -1
- package/dist/esm/p-dropdown_2.entry.js +7 -2
- package/dist/esm/p-dropdown_2.entry.js.map +1 -1
- package/dist/esm/p-floating-menu-container_8.entry.js +40 -40
- package/dist/esm/p-floating-menu-container_8.entry.js.map +1 -1
- package/dist/esm/p-helper_3.entry.js +4 -4
- package/dist/esm/p-helper_3.entry.js.map +1 -1
- package/dist/esm/p-info-panel.entry.js.map +1 -1
- package/dist/esm/p-label_3.entry.js +1 -1
- package/dist/esm/p-label_3.entry.js.map +1 -1
- package/dist/esm/p-layout.entry.js.map +1 -1
- package/dist/esm/p-modal-body_4.entry.js.map +1 -1
- package/dist/esm/p-modal.entry.js.map +1 -1
- package/dist/esm/p-navbar.entry.js.map +1 -1
- package/dist/esm/p-navigation-item.entry.js.map +1 -1
- package/dist/esm/p-page-size-select_3.entry.js.map +1 -1
- package/dist/esm/p-profile.entry.js.map +1 -1
- package/dist/esm/p-select.entry.js +136 -18
- package/dist/esm/p-select.entry.js.map +1 -1
- package/dist/esm/p-slider-indicator.entry.js.map +1 -1
- package/dist/esm/p-status.entry.js.map +1 -1
- package/dist/esm/p-stepper-item.entry.js.map +1 -1
- package/dist/esm/p-stepper-line.entry.js.map +1 -1
- package/dist/esm/p-stepper.entry.js.map +1 -1
- package/dist/esm/p-tab-group.entry.js.map +1 -1
- package/dist/esm/p-tab-item.entry.js.map +1 -1
- package/dist/esm/p-table-column.entry.js.map +1 -1
- package/dist/esm/p-table.entry.js.map +1 -1
- package/dist/esm/p-toast-container.entry.js.map +1 -1
- package/dist/esm/p-toast.entry.js.map +1 -1
- package/dist/esm/p-tooltip.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/p-03090f03.entry.js.map +1 -1
- package/dist/paperless/p-085e6ff4.entry.js.map +1 -1
- package/dist/paperless/p-2becd73c.entry.js.map +1 -1
- package/dist/paperless/p-2cb55f24.entry.js.map +1 -1
- package/dist/paperless/p-2cd5062f.entry.js.map +1 -1
- package/dist/paperless/p-35c563a7.entry.js.map +1 -1
- package/dist/paperless/p-415c5040.entry.js.map +1 -1
- package/dist/paperless/p-424d5c8a.entry.js.map +1 -1
- package/dist/paperless/p-46a939e2.entry.js.map +1 -1
- package/dist/paperless/p-4c30c74b.entry.js.map +1 -1
- package/dist/paperless/p-4dc5647e.entry.js.map +1 -1
- package/dist/paperless/p-4e9e4ce2.entry.js.map +1 -1
- package/dist/paperless/p-606ad811.entry.js.map +1 -1
- package/dist/paperless/p-682db916.entry.js.map +1 -1
- package/dist/paperless/p-699e0b35.entry.js.map +1 -1
- package/dist/paperless/p-6a5aeb90.entry.js.map +1 -1
- package/dist/paperless/p-7793ba3a.entry.js.map +1 -1
- package/dist/paperless/p-7d15ff9a.entry.js.map +1 -1
- package/dist/paperless/p-8426ca20.entry.js.map +1 -1
- package/dist/paperless/p-93052b42.entry.js.map +1 -1
- package/dist/paperless/p-97bcf0b5.entry.js.map +1 -1
- package/dist/paperless/p-9c914665.entry.js.map +1 -1
- package/dist/paperless/p-9d3d72fa.entry.js.map +1 -1
- package/dist/paperless/p-a2b552f9.entry.js.map +1 -1
- package/dist/paperless/p-a7344d53.entry.js +2 -0
- package/dist/paperless/p-a7344d53.entry.js.map +1 -0
- package/dist/paperless/p-af6b813e.entry.js.map +1 -1
- package/dist/paperless/p-b6f43309.entry.js.map +1 -1
- package/dist/paperless/p-b7c0f157.entry.js.map +1 -1
- package/dist/paperless/p-c644d1e3.entry.js.map +1 -1
- package/dist/paperless/p-c9b840a7.entry.js.map +1 -1
- package/dist/paperless/p-cb2674b5.entry.js.map +1 -1
- package/dist/paperless/p-cf7bd354.entry.js.map +1 -1
- package/dist/paperless/p-d0796984.entry.js.map +1 -1
- package/dist/paperless/p-d23db949.entry.js.map +1 -1
- package/dist/paperless/p-dace47c5.entry.js.map +1 -1
- package/dist/paperless/p-dd20caf1.entry.js.map +1 -1
- package/dist/paperless/p-dfa8eae9.entry.js +2 -0
- package/dist/paperless/p-dfa8eae9.entry.js.map +1 -0
- package/dist/paperless/p-ec15ee73.entry.js.map +1 -1
- package/dist/paperless/p-ec29eed0.entry.js.map +1 -1
- package/dist/paperless/p-f0f1a46b.entry.js.map +1 -1
- package/dist/paperless/p-f34e08ec.entry.js.map +1 -1
- package/dist/paperless/p-f9e52ae3.entry.js.map +1 -1
- package/dist/paperless/p-fac13366.entry.js.map +1 -1
- package/dist/paperless/paperless.css +7 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/paperless/paperless.esm.js.map +1 -1
- package/dist/style/form/_checkbox.scss +4 -0
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/atoms/dropdown-menu-item/dropdown-menu-item.component.d.ts +4 -0
- package/dist/types/components/molecules/dropdown/dropdown.component.d.ts +4 -0
- package/dist/types/components/molecules/select/select.component.d.ts +34 -0
- package/dist/types/components.d.ts +105 -45
- package/hydrate/index.js +201 -70
- package/package.json +1 -1
- package/dist/build/p-573648d0.entry.js +0 -2
- package/dist/build/p-573648d0.entry.js.map +0 -1
- package/dist/build/p-9c7cfd25.entry.js +0 -2
- package/dist/build/p-9c7cfd25.entry.js.map +0 -1
- package/dist/paperless/p-573648d0.entry.js +0 -2
- package/dist/paperless/p-573648d0.entry.js.map +0 -1
- package/dist/paperless/p-9c7cfd25.entry.js +0 -2
- package/dist/paperless/p-9c7cfd25.entry.js.map +0 -1
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-1fde8b14.js');
|
|
6
6
|
const childOf = require('./child-of-af405fc2.js');
|
|
7
7
|
|
|
8
|
-
const selectComponentCss = ".flex{display:flex!important}.w-full{width:100%!important}*{box-sizing:border-box}p-select{display:flex;flex-direction:column;width:100%}p-select input.read-only{text-overflow:ellipsis}.static{position:static!important}.h-6{height:1.5rem!important}.
|
|
8
|
+
const selectComponentCss = ".pointer-events-none{pointer-events:none!important}.pointer-events-auto{pointer-events:auto!important}.absolute{position:absolute!important}.relative{position:relative!important}.left-0{left:0!important}.top-0{top:0!important}.flex{display:flex!important}.h-\\[1\\.625rem\\]{height:1.625rem!important}.h-full{height:100%!important}.w-full{width:100%!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.overflow-hidden{overflow:hidden!important}.rounded{border-radius:.25rem!important}.bg-indigo-light{--tw-bg-opacity:1!important;background-color:rgb(241 246 255/var(--tw-bg-opacity))!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-4{padding-bottom:1rem!important;padding-top:1rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-indigo{--tw-text-opacity:1!important;color:rgb(82 138 250/var(--tw-text-opacity))!important}.text-indigo-dark{--tw-text-opacity:1!important;color:rgb(44 75 169/var(--tw-text-opacity))!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}*{box-sizing:border-box}p-select{display:flex;flex-direction:column;position:relative;width:100%}p-select input.read-only{text-overflow:ellipsis}p-select .multi-container{align-items:center;display:flex;gap:.5rem;height:100%;left:0;overflow:hidden;padding:1rem .5rem;pointer-events:none;position:absolute;top:0;width:100%}p-select .multi-container .item{--tw-bg-opacity:1;--tw-text-opacity:1;align-items:center;background-color:rgb(241 246 255/var(--tw-bg-opacity));border-radius:.25rem;color:rgb(44 75 169/var(--tw-text-opacity));cursor:pointer;display:flex;font-size:.875rem;font-weight:600;gap:.5rem;height:1.625rem;line-height:1.25rem;padding-left:.5rem;padding-right:.5rem;pointer-events:auto;white-space:nowrap}p-select .multi-container .item p-icon{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity));font-size:.75rem;line-height:1rem}p-select .multi-container .extra{--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;pointer-events:none}.static{position:static!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.gap-1{gap:.25rem!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}";
|
|
9
9
|
|
|
10
10
|
const Select = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -13,7 +13,9 @@ const Select = class {
|
|
|
13
13
|
this.queryChange = index.createEvent(this, "queryChange", 3);
|
|
14
14
|
this.valueChange = index.createEvent(this, "valueChange", 3);
|
|
15
15
|
this.dropdownShown = index.createEvent(this, "dropdownShown", 3);
|
|
16
|
+
this.add = index.createEvent(this, "add", 3);
|
|
16
17
|
this.items = undefined;
|
|
18
|
+
this.multi = undefined;
|
|
17
19
|
this.icon = undefined;
|
|
18
20
|
this.query = undefined;
|
|
19
21
|
this.placeholder = undefined;
|
|
@@ -21,6 +23,8 @@ const Select = class {
|
|
|
21
23
|
this.value = undefined;
|
|
22
24
|
this.displayKey = 'text';
|
|
23
25
|
this.valueKey = undefined;
|
|
26
|
+
this.avatarKey = undefined;
|
|
27
|
+
this.avatarLettersKey = undefined;
|
|
24
28
|
this.identifierKey = undefined;
|
|
25
29
|
this.queryKey = undefined;
|
|
26
30
|
this.autoSelectFirst = true;
|
|
@@ -37,9 +41,12 @@ const Select = class {
|
|
|
37
41
|
this.required = undefined;
|
|
38
42
|
this.error = undefined;
|
|
39
43
|
this.disabled = false;
|
|
44
|
+
this.showAddItem = false;
|
|
45
|
+
this.addItemText = 'Add item';
|
|
40
46
|
this._showDropdown = false;
|
|
41
47
|
this._selectedItem = null;
|
|
42
48
|
this._isAutoCompleting = false;
|
|
49
|
+
this._amountHidden = 0;
|
|
43
50
|
}
|
|
44
51
|
get _items() {
|
|
45
52
|
var _a, _b;
|
|
@@ -72,11 +79,14 @@ const Select = class {
|
|
|
72
79
|
return items === null || items === void 0 ? void 0 : items.slice(0, this.maxDisplayedItems);
|
|
73
80
|
}
|
|
74
81
|
get _displayValue() {
|
|
75
|
-
var _a;
|
|
82
|
+
var _a, _b;
|
|
76
83
|
if (this._isAutoCompleting) {
|
|
77
84
|
return this.query;
|
|
78
85
|
}
|
|
79
|
-
|
|
86
|
+
if (this.multi) {
|
|
87
|
+
return (_a = this._selectedItem) === null || _a === void 0 ? void 0 : _a.map((i) => i === null || i === void 0 ? void 0 : i[this.displayKey]).filter((i) => !!i);
|
|
88
|
+
}
|
|
89
|
+
return (_b = this._selectedItem) === null || _b === void 0 ? void 0 : _b[this.displayKey];
|
|
80
90
|
}
|
|
81
91
|
get _placeholder() {
|
|
82
92
|
var _a;
|
|
@@ -92,17 +102,46 @@ const Select = class {
|
|
|
92
102
|
if (!this.valueKey && !this.identifierKey) {
|
|
93
103
|
throw new Error('You must provide a valueKey or identifierKey');
|
|
94
104
|
}
|
|
105
|
+
if (this.multi) {
|
|
106
|
+
this.enableAutocomplete = false;
|
|
107
|
+
this._setMultiContainerMaxWidth();
|
|
108
|
+
this._resizeObserver = new ResizeObserver(() => {
|
|
109
|
+
if (this._resizeDebounceTimer) {
|
|
110
|
+
clearTimeout(this._resizeDebounceTimer);
|
|
111
|
+
this._resizeDebounceTimer = null;
|
|
112
|
+
}
|
|
113
|
+
this._resizeDebounceTimer = setTimeout(() => {
|
|
114
|
+
this._setMultiContainerMaxWidth();
|
|
115
|
+
this._checkSelectedItems();
|
|
116
|
+
}, 200);
|
|
117
|
+
});
|
|
118
|
+
this._resizeObserver.observe(this._el);
|
|
119
|
+
}
|
|
95
120
|
if (this.value) {
|
|
96
121
|
this._valueChange();
|
|
97
122
|
return;
|
|
98
123
|
}
|
|
99
124
|
this.itemChanges();
|
|
100
125
|
}
|
|
126
|
+
componentDidRender() {
|
|
127
|
+
if (this.multi) {
|
|
128
|
+
this._setMultiContainerMaxWidth();
|
|
129
|
+
this._checkSelectedItems();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
disconnectedCallback() {
|
|
133
|
+
if (this.multi) {
|
|
134
|
+
this._resizeObserver.disconnect();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
101
137
|
render() {
|
|
138
|
+
var _a, _b;
|
|
102
139
|
return (index.h(index.Host, { class: "p-select" }, this._showDropdown && (!!this._items.length || this.loading), this._isAutoCompleting, index.h("p-dropdown", { disableTriggerClick: true, calculateWidth: true, insideClick: true, scrollable: true, show: this._showDropdown &&
|
|
103
|
-
(!!this._items.length || this.loading) }, index.h("p-input-group", { slot: "trigger", icon: this.icon, size: this.size, prefix: this.prefix, label: this.label, helper: this.helper, required: this.required, error: this.error, disabled: this.disabled, focused: this._showDropdown, focusMethod: this.enableAutocomplete ? 'focus' : 'click' }, index.h("input", { slot: "input", type: "text", placeholder: this._placeholder, value: this.
|
|
140
|
+
(!!this._items.length || this.loading) }, index.h("p-input-group", { slot: "trigger", icon: this.icon, size: this.size, prefix: this.prefix, label: this.label, helper: this.helper, required: this.required, error: this.error, disabled: this.disabled, focused: this._showDropdown, focusMethod: this.enableAutocomplete ? 'focus' : 'click' }, index.h("input", { slot: "input", type: "text", placeholder: this._placeholder, value: this.multi && ((_a = this._displayValue) === null || _a === void 0 ? void 0 : _a.length)
|
|
141
|
+
? ' '
|
|
142
|
+
: this._displayValue, class: `p-input cursor-pointer ${!this._isAutoCompleting && 'read-only'}`, onFocus: (ev) => this._onFocus(ev), onMouseDown: (ev) => this._onMouseDown(ev), onClick: () => this._onClick(), onInput: (ev) => this._onChange(ev), ref: (ref) => (this._inputRef = ref) }), this.showChevron && (index.h("p-icon", { variant: "chevron", slot: "suffix" }))), index.h("div", { slot: "items" }, this.loading
|
|
104
143
|
? this._getLoadingItems()
|
|
105
|
-
: this._getItems()))));
|
|
144
|
+
: this._getItems(), this.showAddItem && this._getAddItem())), this.multi && ((_b = this._selectedItem) === null || _b === void 0 ? void 0 : _b.length) > 0 && (index.h("div", { class: "multi-container", ref: (ref) => (this._multiContainerRef = ref) }, this._selectedItem.map((item) => (index.h("div", { class: "item", onClick: () => this._selectValue(item) }, item[this.displayKey], index.h("p-icon", { variant: "negative" })))), index.h("div", { class: "extra hidden" }, "+", this._amountHidden)))));
|
|
106
145
|
}
|
|
107
146
|
documentClickHandler({ target }) {
|
|
108
147
|
if (!this._showDropdown || childOf.childOf(target, this._el)) {
|
|
@@ -128,14 +167,28 @@ const Select = class {
|
|
|
128
167
|
if (this._isAutoCompleting && ((_a = this.query) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
129
168
|
return;
|
|
130
169
|
}
|
|
131
|
-
let value = this.value
|
|
170
|
+
let value = typeof this.value === 'string' && this.multi
|
|
171
|
+
? JSON.parse(this.value)
|
|
172
|
+
: this.value;
|
|
173
|
+
if (this.multi) {
|
|
174
|
+
if (!Array.isArray(value)) {
|
|
175
|
+
this.value = [];
|
|
176
|
+
this.valueChange.emit(this.value);
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
this.value = value;
|
|
180
|
+
if (!value.length) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
this._selectedItem =
|
|
184
|
+
!!this.valueKey && this.valueKey !== 'false'
|
|
185
|
+
? this._items.filter((i) => value.includes(i === null || i === void 0 ? void 0 : i[this.valueKey]))
|
|
186
|
+
: [...value];
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
132
189
|
if (!this._selectedItem && !value && this.autoSelectFirst) {
|
|
133
190
|
value = this._items[0];
|
|
134
191
|
}
|
|
135
|
-
// if (!value) {
|
|
136
|
-
// this._selectValue(null);
|
|
137
|
-
// return;
|
|
138
|
-
// }
|
|
139
192
|
const identifier = typeof value === 'object' && value !== null
|
|
140
193
|
? value[this._identifierKey]
|
|
141
194
|
: value;
|
|
@@ -166,14 +219,40 @@ const Select = class {
|
|
|
166
219
|
this._selectValue(!!item ? item : value);
|
|
167
220
|
}
|
|
168
221
|
_selectValue(item) {
|
|
169
|
-
this.
|
|
170
|
-
const value = !!this.valueKey && this.valueKey !== 'false' && item !== null
|
|
222
|
+
let value = !!this.valueKey && this.valueKey !== 'false' && item !== null
|
|
171
223
|
? item === null || item === void 0 ? void 0 : item[this.valueKey]
|
|
172
224
|
: item;
|
|
173
225
|
this.query = this.keepQuery ? item === null || item === void 0 ? void 0 : item[this.displayKey] : null;
|
|
174
|
-
this.
|
|
175
|
-
|
|
176
|
-
|
|
226
|
+
if (this.multi) {
|
|
227
|
+
if (!this._selectedItem || !Array.isArray(this._selectedItem)) {
|
|
228
|
+
this._selectedItem = [];
|
|
229
|
+
}
|
|
230
|
+
if (!this.value || !Array.isArray(this.value)) {
|
|
231
|
+
this.value = [];
|
|
232
|
+
}
|
|
233
|
+
const selectedItem = [...this._selectedItem];
|
|
234
|
+
const valueArray = [...this.value];
|
|
235
|
+
const includesIndex = selectedItem.findIndex((i) => i[this._identifierKey] === item[this._identifierKey]);
|
|
236
|
+
if (includesIndex === -1) {
|
|
237
|
+
selectedItem.push(item);
|
|
238
|
+
valueArray.push(value);
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
selectedItem.splice(includesIndex, 1);
|
|
242
|
+
valueArray.splice(includesIndex, 1);
|
|
243
|
+
}
|
|
244
|
+
this._selectedItem = selectedItem;
|
|
245
|
+
this.value = valueArray;
|
|
246
|
+
this.valueChange.emit(valueArray);
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
this._selectedItem = item;
|
|
250
|
+
this.value = value;
|
|
251
|
+
this.valueChange.emit(value);
|
|
252
|
+
}
|
|
253
|
+
if (!this.multi) {
|
|
254
|
+
this._onBlur(true);
|
|
255
|
+
}
|
|
177
256
|
}
|
|
178
257
|
_onFocus(ev) {
|
|
179
258
|
if (!this.enableAutocomplete) {
|
|
@@ -223,14 +302,53 @@ const Select = class {
|
|
|
223
302
|
}
|
|
224
303
|
_getItems() {
|
|
225
304
|
return this._items.map((item) => {
|
|
226
|
-
var _a;
|
|
227
|
-
return (index.h("p-dropdown-menu-item", { onClick: () => this._selectValue(item), active:
|
|
228
|
-
((_a = this._selectedItem) === null || _a === void 0 ? void 0 : _a
|
|
305
|
+
var _a, _b;
|
|
306
|
+
return (index.h("p-dropdown-menu-item", { onClick: () => this._selectValue(item), active: this.multi
|
|
307
|
+
? ((_a = this._selectedItem) === null || _a === void 0 ? void 0 : _a.findIndex((i) => i[this._identifierKey] ===
|
|
308
|
+
item[this._identifierKey])) >= 0
|
|
309
|
+
: item[this._identifierKey] ===
|
|
310
|
+
((_b = this._selectedItem) === null || _b === void 0 ? void 0 : _b[this._identifierKey]), variant: this.multi ? 'checkbox' : 'default' }, this.avatarKey ? (index.h("span", { class: "flex items-center gap-2" }, index.h("p-avatar", { size: "xsmall", src: item[this.avatarKey], letters: item[this.avatarLettersKey] }), item[this.displayKey])) : (item[this.displayKey])));
|
|
229
311
|
});
|
|
230
312
|
}
|
|
313
|
+
_getAddItem() {
|
|
314
|
+
return (index.h("p-dropdown-menu-item", { onClick: () => this.add.emit() }, index.h("span", { class: "text-indigo font-semibold flex gap-1 items-center" }, this.addItemText, index.h("p-icon", { variant: "plus" }))));
|
|
315
|
+
}
|
|
231
316
|
_getLoadingItems() {
|
|
232
317
|
return [0, 0, 0].map(() => (index.h("p-dropdown-menu-item", { enableHover: false }, index.h("p-loader", { variant: "ghost", class: "h-6 w-full rounded" }))));
|
|
233
318
|
}
|
|
319
|
+
_setMultiContainerMaxWidth() {
|
|
320
|
+
if (!this._inputRef || !this._multiContainerRef) {
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
323
|
+
this._multiContainerRef.style.maxWidth = `${this._inputRef.clientWidth - 16}px`;
|
|
324
|
+
}
|
|
325
|
+
_checkSelectedItems() {
|
|
326
|
+
if (!this._multiContainerRef) {
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
const containerRect = this._multiContainerRef.getBoundingClientRect();
|
|
330
|
+
const items = Array.from(this._multiContainerRef.querySelectorAll('.item'));
|
|
331
|
+
let amountHidden = 0;
|
|
332
|
+
for (const child of items) {
|
|
333
|
+
child.classList.remove('hidden');
|
|
334
|
+
const childRect = child.getBoundingClientRect();
|
|
335
|
+
if (childRect.right > containerRect.right) {
|
|
336
|
+
child.classList.add('hidden');
|
|
337
|
+
amountHidden++;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
this._amountHidden = amountHidden;
|
|
341
|
+
const extra = this._multiContainerRef.querySelector('.extra');
|
|
342
|
+
if (!extra) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
if (!extra.classList.contains('hidden')) {
|
|
346
|
+
extra.classList.add('hidden');
|
|
347
|
+
}
|
|
348
|
+
if (amountHidden > 0) {
|
|
349
|
+
extra.classList.remove('hidden');
|
|
350
|
+
}
|
|
351
|
+
}
|
|
234
352
|
get _el() { return index.getElement(this); }
|
|
235
353
|
static get watchers() { return {
|
|
236
354
|
"value": ["_valueChange"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-select.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,kBAAkB,GAAG,8gBAA8gB;;MCoB5hB,MAAM;;;;;;;;;;;;sBAkCc,MAAM;;;;2BAoBA,IAAI;uBAKR,IAAI;6BAKC,EAAE;8BAKA,IAAI;qBAKb,IAAI;uBAKF,KAAK;mBAKT,KAAK;gBA6BG,QAA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,EAAE,IAAI;;IACzB,QACI,CAAA,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAG,GAAG,CAAC,0CACL,QAAQ,EAAE,0CACV,WAAW,GACZ,OAAO,CAAC,MAAA,IAAI,CAAC,KAAK,0CAAE,WAAW,EAAE,CAAC,KAAI,CAAC,EAC9C;GACL;EAEO,SAAS;IACb,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI;;MAAK,QAC7BF,kCACI,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EACtC,MAAM,EACF,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC;WACzB,MAAA,IAAI,CAAC,aAAa,0CAAG,IAAI,CAAC,cAAc,CAAC,CAAA,IAG5C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CACH,EAC1B;KAAA,CAAC,CAAC;GACN;EAEO,gBAAgB;IACpB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,OACjBA,kCAAsB,WAAW,EAAE,KAAK,IACpCA,sBAAU,OAAO,EAAC,OAAO,EAAC,KAAK,EAAC,oBAAoB,GAAG,CACpC,CAC1B,CAAC,CAAC;GACN;;;;;;;;;;;;","names":["h","Host","childOf"],"sources":["src/components/molecules/select/select.component.scss?tag=p-select","src/components/molecules/select/select.component.tsx"],"sourcesContent":["p-select {\n @apply flex w-full flex-col;\n\n input.read-only {\n @apply text-ellipsis;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { childOf } from '../../../utils';\nimport { IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n tag: 'p-select',\n styleUrl: 'select.component.scss',\n shadow: false,\n})\nexport class Select {\n /**\n * The items to show in the dropdown\n */\n @Prop() items: string | any[];\n\n /**\n * Icon of the select box\n */\n @Prop() icon: IconVariant;\n\n /**\n * The current query\n */\n @Prop() query: string;\n\n /**\n * The placeholder of the input\n */\n @Prop() placeholder: string;\n\n /**\n * The placeholder of the input when auto completing\n */\n @Prop() autocompletePlaceholder: string;\n\n /**\n * The current value\n */\n @Prop() value: any;\n\n /**\n * The key of the object to display\n */\n @Prop() displayKey: string = 'text';\n\n /**\n * The key of the object to return\n */\n @Prop() valueKey: string;\n\n /**\n * The key to identify an object\n */\n @Prop() identifierKey: string;\n\n /**\n * The key of the object to display\n */\n @Prop() queryKey?: string;\n\n /**\n * Wether to automatically select the first item\n */\n @Prop() autoSelectFirst: boolean = true;\n\n /**\n * Wether to show the chevron or not\n */\n @Prop() showChevron: boolean = true;\n\n /**\n * The maximum amount of items to display\n */\n @Prop() maxDisplayedItems: number = 10;\n\n /**\n * Wether to enable autocomplete\n */\n @Prop() enableAutocomplete: boolean = true;\n\n /**\n * Wether to keep the query or not\n */\n @Prop() keepQuery: boolean = true;\n\n /**\n * Wether the input uses async filtering\n */\n @Prop() asyncFilter: boolean = false;\n\n /**\n * Wether to show loading items\n */\n @Prop() loading: boolean = false;\n\n /**\n * Event when the query of the autocomplete changes\n */\n @Event({\n bubbles: false,\n })\n queryChange: EventEmitter<string>;\n\n /**\n * Event when the value changes\n */\n @Event({\n bubbles: false,\n })\n valueChange: EventEmitter<any>;\n\n /**\n * Event when the dropdown shows\n */\n @Event({\n bubbles: false,\n })\n dropdownShown: EventEmitter<any>;\n\n /**\n * The size of the input group used by the select\n */\n @Prop() size: 'small' | 'medium' = 'medium';\n\n /**\n * The prefix of the input group used by the select\n */\n @Prop() prefix: string;\n\n /**\n * The label of the input group used by the select\n */\n @Prop() label: string;\n\n /**\n * The helper of the input group used by the select\n */\n @Prop() helper: string;\n\n /**\n * Wether the field is required\n */\n @Prop({ reflect: true }) required: boolean;\n\n /**\n * The helper of the input group used by the select\n */\n @Prop({ reflect: true }) error: string;\n\n /**\n * Wether the input group is disabled used by the select\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n @State() private _showDropdown: any = false;\n @State() private _selectedItem: any = null;\n\n @State() private _isAutoCompleting: boolean = false;\n\n get _items() {\n if (!this.items || this.loading) {\n return [];\n }\n\n let items =\n typeof this.items === 'string'\n ? JSON.parse(this.items)\n : this.items;\n\n if (typeof items?.[0] === 'string') {\n this.displayKey = 'text';\n this.valueKey = 'value';\n\n items = items.map((str) => ({\n value: str,\n text: str,\n }));\n }\n\n if (\n this._isAutoCompleting &&\n this.query?.length &&\n this.query !== this._selectedItem?.[this.displayKey] &&\n !this.asyncFilter\n ) {\n items = items.filter((item) => {\n if (this.queryKey) {\n return this._checkvalue(this.queryKey, item);\n }\n\n return (\n this._checkvalue(this._identifierKey, item) ||\n this._checkvalue(this.displayKey, item)\n );\n });\n }\n\n return items?.slice(0, this.maxDisplayedItems);\n }\n\n get _displayValue() {\n if (this._isAutoCompleting) {\n return this.query;\n }\n\n return this._selectedItem?.[this.displayKey];\n }\n\n get _placeholder() {\n return this._isAutoCompleting && this.autocompletePlaceholder?.length\n ? this.autocompletePlaceholder\n : this.placeholder;\n }\n\n get _identifierKey() {\n return this.identifierKey ?? this.valueKey ?? 'value';\n }\n\n componentDidLoad() {\n if (!this.valueKey && !this.identifierKey) {\n throw new Error('You must provide a valueKey or identifierKey');\n }\n\n if (this.value) {\n this._valueChange();\n return;\n }\n\n this.itemChanges();\n }\n\n render() {\n return (\n <Host class=\"p-select\">\n {this._showDropdown && (!!this._items.length || this.loading)}\n {this._isAutoCompleting}\n <p-dropdown\n disableTriggerClick={true}\n calculateWidth={true}\n insideClick={true}\n scrollable={true}\n show={\n this._showDropdown &&\n (!!this._items.length || this.loading)\n }\n >\n <p-input-group\n slot=\"trigger\"\n icon={this.icon}\n size={this.size}\n prefix={this.prefix}\n label={this.label}\n helper={this.helper}\n required={this.required}\n error={this.error}\n disabled={this.disabled}\n focused={this._showDropdown}\n focusMethod={\n this.enableAutocomplete ? 'focus' : 'click'\n }\n >\n <input\n slot=\"input\"\n type=\"text\"\n placeholder={this._placeholder}\n value={this._displayValue}\n class={`p-input cursor-pointer ${\n !this._isAutoCompleting && 'read-only'\n }`}\n onFocus={(ev) => this._onFocus(ev)}\n onMouseDown={(ev) => this._onMouseDown(ev)}\n onClick={() => this._onClick()}\n onInput={(ev) => this._onChange(ev)}\n />\n\n {this.showChevron && (\n <p-icon variant=\"chevron\" slot=\"suffix\" />\n )}\n </p-input-group>\n <div slot=\"items\">\n {this.loading\n ? this._getLoadingItems()\n : this._getItems()}\n </div>\n </p-dropdown>\n </Host>\n );\n }\n\n @Listen('click', { target: 'document', capture: true })\n protected documentClickHandler({ target }) {\n if (!this._showDropdown || childOf(target, this._el)) {\n return;\n }\n\n this._showDropdown = false;\n this._isAutoCompleting = false;\n }\n\n @Watch('value')\n private _valueChange() {\n this._preselectItem();\n }\n\n @Watch('items')\n public itemChanges() {\n this._preselectItem();\n }\n\n @Watch('_showDropdown')\n public _showDropdownChanges() {\n this.dropdownShown.emit({\n value: this._showDropdown,\n query: this.query,\n });\n }\n\n private _preselectItem() {\n if (this._isAutoCompleting && this.query?.length) {\n return;\n }\n\n let value = this.value;\n\n if (!this._selectedItem && !value && this.autoSelectFirst) {\n value = this._items[0];\n }\n\n // if (!value) {\n // this._selectValue(null);\n // return;\n // }\n\n const identifier =\n typeof value === 'object' && value !== null\n ? value[this._identifierKey]\n : value;\n const parsedValue =\n typeof identifier === 'string' || typeof identifier === 'number'\n ? identifier\n : JSON.stringify(identifier);\n\n const currentValue = this._selectedItem\n ? this._selectedItem?.[this._identifierKey]\n : null;\n const currentParsedValue =\n typeof currentValue === 'string' || typeof currentValue === 'number'\n ? currentValue\n : JSON.stringify(currentValue);\n\n if (this._selectedItem && currentParsedValue === parsedValue) {\n return;\n }\n\n if (!this._items?.length && value) {\n this._selectValue(value);\n return;\n }\n\n const item = this._items.find((i) => {\n const itemIdentifier = i?.[this._identifierKey];\n const parsedItemIdentifier =\n typeof itemIdentifier === 'string' ||\n typeof itemIdentifier === 'number'\n ? itemIdentifier\n : JSON.stringify(itemIdentifier);\n\n return parsedItemIdentifier === parsedValue;\n });\n\n this._selectValue(!!item ? item : value);\n }\n\n private _selectValue(item) {\n this._selectedItem = item;\n const value =\n !!this.valueKey && this.valueKey !== 'false' && item !== null\n ? item?.[this.valueKey]\n : item;\n\n this.query = this.keepQuery ? item?.[this.displayKey] : null;\n this.value = value;\n this.valueChange.emit(value);\n\n this._onBlur(true);\n }\n\n private _onFocus(ev) {\n if (!this.enableAutocomplete) {\n ev.preventDefault();\n ev.stopPropogation();\n\n if (!this._showDropdown) {\n this._showDropdown = true;\n }\n return;\n }\n\n this._showDropdown = true;\n this._isAutoCompleting = true;\n }\n\n private _onMouseDown(ev) {\n if (this.enableAutocomplete) {\n return;\n }\n\n ev.preventDefault();\n }\n\n private _onClick() {\n if (this.enableAutocomplete) {\n return;\n }\n\n this._showDropdown = !this._showDropdown;\n }\n\n private _onBlur(force = false) {\n if (!this.enableAutocomplete && !force) {\n return;\n }\n\n this._isAutoCompleting = false;\n this._showDropdown = false;\n }\n\n private _onChange(ev) {\n if (!this.enableAutocomplete) {\n return;\n }\n\n if (!this._isAutoCompleting) {\n this._isAutoCompleting = true;\n this._showDropdown = true;\n }\n\n this.query = ev.target.value;\n this.queryChange.emit(ev.target.value);\n }\n\n private _checkvalue(key, item) {\n return (\n item?.[key]\n ?.toString()\n ?.toLowerCase()\n .indexOf(this.query?.toLowerCase()) >= 0\n );\n }\n\n private _getItems() {\n return this._items.map((item) => (\n <p-dropdown-menu-item\n onClick={() => this._selectValue(item)}\n active={\n item[this._identifierKey] ===\n this._selectedItem?.[this._identifierKey]\n }\n >\n {item[this.displayKey]}\n </p-dropdown-menu-item>\n ));\n }\n\n private _getLoadingItems() {\n return [0, 0, 0].map(() => (\n <p-dropdown-menu-item enableHover={false}>\n <p-loader variant=\"ghost\" class=\"h-6 w-full rounded\" />\n </p-dropdown-menu-item>\n ));\n }\n}\n"],"version":3}
|
|
1
|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AK,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC9B,YAAY,EAAE,CAAC;OACf;KACD;IAED,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;IAClC,MAAM,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAC9D,IAAI,CAAC,KAAK,EAAE;MACX,OAAO;KACP;IAED,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;MACxC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;KAC9B;IAED,IAAI,YAAY,GAAG,CAAC,EAAE;MACrB,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;KACjC;GACD;;;;;;;;;;;;","names":["h","Host","childOf"],"sources":["src/components/molecules/select/select.component.scss?tag=p-select","src/components/molecules/select/select.component.tsx"],"sourcesContent":["p-select {\n\t@apply flex w-full flex-col relative;\n\n\tinput.read-only {\n\t\t@apply text-ellipsis;\n\t}\n\n\t.multi-container {\n\t\t@apply absolute top-0 left-0 h-full flex gap-2 items-center px-2 py-4 overflow-hidden pointer-events-none w-full;\n\n\t\t.item {\n\t\t\t@apply bg-indigo-light rounded px-2 flex gap-2 items-center cursor-pointer text-indigo-dark h-[1.625rem] text-sm font-semibold pointer-events-auto whitespace-nowrap;\n\n\t\t\tp-icon {\n\t\t\t\t@apply text-indigo text-xs;\n\t\t\t}\n\t\t}\n\n\t\t.extra {\n\t\t\t@apply text-sm text-storm-medium pointer-events-none;\n\t\t}\n\t}\n}\n","import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tState,\n\tWatch,\n} from '@stencil/core';\nimport { childOf } from '../../../utils';\nimport { IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n\ttag: 'p-select',\n\tstyleUrl: 'select.component.scss',\n\tshadow: false,\n})\nexport class Select {\n\t/**\n\t * The items to show in the dropdown\n\t */\n\t@Prop() items: string | any[];\n\n\t/**\n\t * Wether to enable multi select\n\t */\n\t@Prop({ reflect: true }) multi: boolean;\n\n\t/**\n\t * Icon of the select box\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * The current query\n\t */\n\t@Prop() query: string;\n\n\t/**\n\t * The placeholder of the input\n\t */\n\t@Prop() placeholder: string;\n\n\t/**\n\t * The placeholder of the input when auto completing\n\t */\n\t@Prop() autocompletePlaceholder: string;\n\n\t/**\n\t * The current value\n\t */\n\t@Prop() value: any;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() displayKey: string = 'text';\n\n\t/**\n\t * The key of the object to return\n\t */\n\t@Prop() valueKey: string;\n\n\t/**\n\t * The key of avatar within an item to show\n\t */\n\t@Prop() avatarKey: string;\n\n\t/**\n\t * The key of avatar letters within an item to show when the avatar url doesn't work\n\t */\n\t@Prop() avatarLettersKey: string;\n\n\t/**\n\t * The key to identify an object\n\t */\n\t@Prop() identifierKey: string;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() queryKey?: string;\n\n\t/**\n\t * Wether to automatically select the first item\n\t */\n\t@Prop() autoSelectFirst: boolean = true;\n\n\t/**\n\t * Wether to show the chevron or not\n\t */\n\t@Prop() showChevron: boolean = true;\n\n\t/**\n\t * The maximum amount of items to display\n\t */\n\t@Prop() maxDisplayedItems: number = 10;\n\n\t/**\n\t * Wether to enable autocomplete\n\t */\n\t@Prop() enableAutocomplete: boolean = true;\n\n\t/**\n\t * Wether to keep the query or not\n\t */\n\t@Prop() keepQuery: boolean = true;\n\n\t/**\n\t * Wether the input uses async filtering\n\t */\n\t@Prop() asyncFilter: boolean = false;\n\n\t/**\n\t * Wether to show loading items\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * Event when the query of the autocomplete changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tqueryChange: EventEmitter<string>;\n\n\t/**\n\t * Event when the value changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tvalueChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the dropdown shows\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdropdownShown: EventEmitter<any>;\n\n\t/**\n\t * The size of the input group used by the select\n\t */\n\t@Prop() size: 'small' | 'medium' = 'medium';\n\n\t/**\n\t * The prefix of the input group used by the select\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The label of the input group used by the select\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop() helper: string;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * Wether the input group is disabled used by the select\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether to show a \"add\" item\n\t */\n\t@Prop() showAddItem: boolean = false;\n\n\t/**\n\t * The text to show when add item is being shown\n\t */\n\t@Prop() addItemText: string = 'Add item';\n\n\t/**\n\t * Event when the add item is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tadd: EventEmitter;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _showDropdown: any = false;\n\t@State() private _selectedItem: any = null;\n\n\t@State() private _isAutoCompleting: boolean = false;\n\t@State() private _amountHidden = 0;\n\n\tprivate _inputRef: HTMLInputElement;\n\tprivate _multiContainerRef: HTMLElement;\n\n\tprivate _resizeObserver: ResizeObserver;\n\tprivate _resizeDebounceTimer: NodeJS.Timer;\n\n\tget _items() {\n\t\tif (!this.items || this.loading) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet items =\n\t\t\ttypeof this.items === 'string'\n\t\t\t\t? JSON.parse(this.items)\n\t\t\t\t: this.items;\n\n\t\tif (typeof items?.[0] === 'string') {\n\t\t\tthis.displayKey = 'text';\n\t\t\tthis.valueKey = 'value';\n\n\t\t\titems = items.map((str) => ({\n\t\t\t\tvalue: str,\n\t\t\t\ttext: str,\n\t\t\t}));\n\t\t}\n\n\t\tif (\n\t\t\tthis._isAutoCompleting &&\n\t\t\tthis.query?.length &&\n\t\t\tthis.query !== this._selectedItem?.[this.displayKey] &&\n\t\t\t!this.asyncFilter\n\t\t) {\n\t\t\titems = items.filter((item) => {\n\t\t\t\tif (this.queryKey) {\n\t\t\t\t\treturn this._checkvalue(this.queryKey, item);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tthis._checkvalue(this._identifierKey, item) ||\n\t\t\t\t\tthis._checkvalue(this.displayKey, item)\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\treturn items?.slice(0, this.maxDisplayedItems);\n\t}\n\n\tget _displayValue() {\n\t\tif (this._isAutoCompleting) {\n\t\t\treturn this.query;\n\t\t}\n\n\t\tif (this.multi) {\n\t\t\treturn this._selectedItem\n\t\t\t\t?.map((i) => i?.[this.displayKey])\n\t\t\t\t.filter((i) => !!i);\n\t\t}\n\n\t\treturn this._selectedItem?.[this.displayKey];\n\t}\n\n\tget _placeholder() {\n\t\treturn this._isAutoCompleting && this.autocompletePlaceholder?.length\n\t\t\t? this.autocompletePlaceholder\n\t\t\t: this.placeholder;\n\t}\n\n\tget _identifierKey() {\n\t\treturn this.identifierKey ?? this.valueKey ?? 'value';\n\t}\n\n\tcomponentDidLoad() {\n\t\tif (!this.valueKey && !this.identifierKey) {\n\t\t\tthrow new Error('You must provide a valueKey or identifierKey');\n\t\t}\n\n\t\tif (this.multi) {\n\t\t\tthis.enableAutocomplete = false;\n\t\t\tthis._setMultiContainerMaxWidth();\n\n\t\t\tthis._resizeObserver = new ResizeObserver(() => {\n\t\t\t\tif (this._resizeDebounceTimer) {\n\t\t\t\t\tclearTimeout(this._resizeDebounceTimer);\n\t\t\t\t\tthis._resizeDebounceTimer = null;\n\t\t\t\t}\n\n\t\t\t\tthis._resizeDebounceTimer = setTimeout(() => {\n\t\t\t\t\tthis._setMultiContainerMaxWidth();\n\t\t\t\t\tthis._checkSelectedItems();\n\t\t\t\t}, 200);\n\t\t\t});\n\t\t\tthis._resizeObserver.observe(this._el);\n\t\t}\n\n\t\tif (this.value) {\n\t\t\tthis._valueChange();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.itemChanges();\n\t}\n\n\tcomponentDidRender() {\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\t\t\tthis._checkSelectedItems();\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this.multi) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-select\">\n\t\t\t\t{this._showDropdown && (!!this._items.length || this.loading)}\n\t\t\t\t{this._isAutoCompleting}\n\t\t\t\t<p-dropdown\n\t\t\t\t\tdisableTriggerClick={true}\n\t\t\t\t\tcalculateWidth={true}\n\t\t\t\t\tinsideClick={true}\n\t\t\t\t\tscrollable={true}\n\t\t\t\t\tshow={\n\t\t\t\t\t\tthis._showDropdown &&\n\t\t\t\t\t\t(!!this._items.length || this.loading)\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<p-input-group\n\t\t\t\t\t\tslot=\"trigger\"\n\t\t\t\t\t\ticon={this.icon}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\tprefix={this.prefix}\n\t\t\t\t\t\tlabel={this.label}\n\t\t\t\t\t\thelper={this.helper}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\terror={this.error}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tfocused={this._showDropdown}\n\t\t\t\t\t\tfocusMethod={\n\t\t\t\t\t\t\tthis.enableAutocomplete ? 'focus' : 'click'\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tslot=\"input\"\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tplaceholder={this._placeholder}\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tthis.multi && this._displayValue?.length\n\t\t\t\t\t\t\t\t\t? ' '\n\t\t\t\t\t\t\t\t\t: this._displayValue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tclass={`p-input cursor-pointer ${\n\t\t\t\t\t\t\t\t!this._isAutoCompleting && 'read-only'\n\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\tonFocus={(ev) => this._onFocus(ev)}\n\t\t\t\t\t\t\tonMouseDown={(ev) => this._onMouseDown(ev)}\n\t\t\t\t\t\t\tonClick={() => this._onClick()}\n\t\t\t\t\t\t\tonInput={(ev) => this._onChange(ev)}\n\t\t\t\t\t\t\tref={(ref) => (this._inputRef = ref)}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{this.showChevron && (\n\t\t\t\t\t\t\t<p-icon variant=\"chevron\" slot=\"suffix\" />\n\t\t\t\t\t\t)}\n\t\t\t\t\t</p-input-group>\n\t\t\t\t\t<div slot=\"items\">\n\t\t\t\t\t\t{this.loading\n\t\t\t\t\t\t\t? this._getLoadingItems()\n\t\t\t\t\t\t\t: this._getItems()}\n\t\t\t\t\t\t{this.showAddItem && this._getAddItem()}\n\t\t\t\t\t</div>\n\t\t\t\t</p-dropdown>\n\n\t\t\t\t{this.multi && this._selectedItem?.length > 0 && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"multi-container\"\n\t\t\t\t\t\tref={(ref) => (this._multiContainerRef = ref)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{this._selectedItem.map((item) => (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass=\"item\"\n\t\t\t\t\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{item[this.displayKey]}\n\t\t\t\t\t\t\t\t<p-icon variant=\"negative\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t<div class=\"extra hidden\">+{this._amountHidden}</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler({ target }) {\n\t\tif (!this._showDropdown || childOf(target, this._el)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t\tthis._isAutoCompleting = false;\n\t}\n\n\t@Watch('value')\n\tprivate _valueChange() {\n\t\tthis._preselectItem();\n\t}\n\n\t@Watch('items')\n\tpublic itemChanges() {\n\t\tthis._preselectItem();\n\t}\n\n\t@Watch('_showDropdown')\n\tpublic _showDropdownChanges() {\n\t\tthis.dropdownShown.emit({\n\t\t\tvalue: this._showDropdown,\n\t\t\tquery: this.query,\n\t\t});\n\t}\n\n\tprivate _preselectItem() {\n\t\tif (this._isAutoCompleting && this.query?.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet value =\n\t\t\ttypeof this.value === 'string' && this.multi\n\t\t\t\t? JSON.parse(this.value)\n\t\t\t\t: this.value;\n\n\t\tif (this.multi) {\n\t\t\tif (!Array.isArray(value)) {\n\t\t\t\tthis.value = [];\n\t\t\t\tthis.valueChange.emit(this.value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.value = value;\n\t\t\tif (!value.length) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._selectedItem =\n\t\t\t\t!!this.valueKey && this.valueKey !== 'false'\n\t\t\t\t\t? this._items.filter((i) =>\n\t\t\t\t\t\t\tvalue.includes(i?.[this.valueKey])\n\t\t\t\t\t\t)\n\t\t\t\t\t: [...value];\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._selectedItem && !value && this.autoSelectFirst) {\n\t\t\tvalue = this._items[0];\n\t\t}\n\n\t\tconst identifier =\n\t\t\ttypeof value === 'object' && value !== null\n\t\t\t\t? value[this._identifierKey]\n\t\t\t\t: value;\n\t\tconst parsedValue =\n\t\t\ttypeof identifier === 'string' || typeof identifier === 'number'\n\t\t\t\t? identifier\n\t\t\t\t: JSON.stringify(identifier);\n\n\t\tconst currentValue = this._selectedItem\n\t\t\t? this._selectedItem?.[this._identifierKey]\n\t\t\t: null;\n\t\tconst currentParsedValue =\n\t\t\ttypeof currentValue === 'string' || typeof currentValue === 'number'\n\t\t\t\t? currentValue\n\t\t\t\t: JSON.stringify(currentValue);\n\n\t\tif (this._selectedItem && currentParsedValue === parsedValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._items?.length && value) {\n\t\t\tthis._selectValue(value);\n\t\t\treturn;\n\t\t}\n\n\t\tconst item = this._items.find((i) => {\n\t\t\tconst itemIdentifier = i?.[this._identifierKey];\n\t\t\tconst parsedItemIdentifier =\n\t\t\t\ttypeof itemIdentifier === 'string' ||\n\t\t\t\ttypeof itemIdentifier === 'number'\n\t\t\t\t\t? itemIdentifier\n\t\t\t\t\t: JSON.stringify(itemIdentifier);\n\n\t\t\treturn parsedItemIdentifier === parsedValue;\n\t\t});\n\n\t\tthis._selectValue(!!item ? item : value);\n\t}\n\n\tprivate _selectValue(item) {\n\t\tlet value =\n\t\t\t!!this.valueKey && this.valueKey !== 'false' && item !== null\n\t\t\t\t? item?.[this.valueKey]\n\t\t\t\t: item;\n\n\t\tthis.query = this.keepQuery ? item?.[this.displayKey] : null;\n\n\t\tif (this.multi) {\n\t\t\tif (!this._selectedItem || !Array.isArray(this._selectedItem)) {\n\t\t\t\tthis._selectedItem = [];\n\t\t\t}\n\n\t\t\tif (!this.value || !Array.isArray(this.value)) {\n\t\t\t\tthis.value = [];\n\t\t\t}\n\n\t\t\tconst selectedItem = [...this._selectedItem];\n\t\t\tconst valueArray = [...this.value];\n\n\t\t\tconst includesIndex = selectedItem.findIndex(\n\t\t\t\t(i) => i[this._identifierKey] === item[this._identifierKey]\n\t\t\t);\n\t\t\tif (includesIndex === -1) {\n\t\t\t\tselectedItem.push(item);\n\t\t\t\tvalueArray.push(value);\n\t\t\t} else {\n\t\t\t\tselectedItem.splice(includesIndex, 1);\n\t\t\t\tvalueArray.splice(includesIndex, 1);\n\t\t\t}\n\n\t\t\tthis._selectedItem = selectedItem;\n\t\t\tthis.value = valueArray;\n\t\t\tthis.valueChange.emit(valueArray);\n\t\t} else {\n\t\t\tthis._selectedItem = item;\n\t\t\tthis.value = value;\n\t\t\tthis.valueChange.emit(value);\n\t\t}\n\n\t\tif (!this.multi) {\n\t\t\tthis._onBlur(true);\n\t\t}\n\t}\n\n\tprivate _onFocus(ev) {\n\t\tif (!this.enableAutocomplete) {\n\t\t\tev.preventDefault();\n\t\t\tev.stopPropogation();\n\n\t\t\tif (!this._showDropdown) {\n\t\t\t\tthis._showDropdown = true;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = true;\n\t\tthis._isAutoCompleting = true;\n\t}\n\n\tprivate _onMouseDown(ev) {\n\t\tif (this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tev.preventDefault();\n\t}\n\n\tprivate _onClick() {\n\t\tif (this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = !this._showDropdown;\n\t}\n\n\tprivate _onBlur(force = false) {\n\t\tif (!this.enableAutocomplete && !force) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isAutoCompleting = false;\n\t\tthis._showDropdown = false;\n\t}\n\n\tprivate _onChange(ev) {\n\t\tif (!this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._isAutoCompleting) {\n\t\t\tthis._isAutoCompleting = true;\n\t\t\tthis._showDropdown = true;\n\t\t}\n\n\t\tthis.query = ev.target.value;\n\t\tthis.queryChange.emit(ev.target.value);\n\t}\n\n\tprivate _checkvalue(key, item) {\n\t\treturn (\n\t\t\titem?.[key]\n\t\t\t\t?.toString()\n\t\t\t\t?.toLowerCase()\n\t\t\t\t.indexOf(this.query?.toLowerCase()) >= 0\n\t\t);\n\t}\n\n\tprivate _getItems() {\n\t\treturn this._items.map((item) => (\n\t\t\t<p-dropdown-menu-item\n\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\tactive={\n\t\t\t\t\tthis.multi\n\t\t\t\t\t\t? this._selectedItem?.findIndex(\n\t\t\t\t\t\t\t\t(i) =>\n\t\t\t\t\t\t\t\t\ti[this._identifierKey] ===\n\t\t\t\t\t\t\t\t\titem[this._identifierKey]\n\t\t\t\t\t\t\t) >= 0\n\t\t\t\t\t\t: item[this._identifierKey] ===\n\t\t\t\t\t\t\tthis._selectedItem?.[this._identifierKey]\n\t\t\t\t}\n\t\t\t\tvariant={this.multi ? 'checkbox' : 'default'}\n\t\t\t>\n\t\t\t\t{this.avatarKey ? (\n\t\t\t\t\t<span class=\"flex items-center gap-2\">\n\t\t\t\t\t\t<p-avatar\n\t\t\t\t\t\t\tsize=\"xsmall\"\n\t\t\t\t\t\t\tsrc={item[this.avatarKey]}\n\t\t\t\t\t\t\tletters={item[this.avatarLettersKey]}\n\t\t\t\t\t\t></p-avatar>\n\t\t\t\t\t\t{item[this.displayKey]}\n\t\t\t\t\t</span>\n\t\t\t\t) : (\n\t\t\t\t\titem[this.displayKey]\n\t\t\t\t)}\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\t}\n\n\tprivate _getAddItem() {\n\t\treturn (\n\t\t\t<p-dropdown-menu-item onClick={() => this.add.emit()}>\n\t\t\t\t<span class=\"text-indigo font-semibold flex gap-1 items-center\">\n\t\t\t\t\t{this.addItemText}\n\t\t\t\t\t<p-icon variant=\"plus\" />\n\t\t\t\t</span>\n\t\t\t</p-dropdown-menu-item>\n\t\t);\n\t}\n\n\tprivate _getLoadingItems() {\n\t\treturn [0, 0, 0].map(() => (\n\t\t\t<p-dropdown-menu-item enableHover={false}>\n\t\t\t\t<p-loader variant=\"ghost\" class=\"h-6 w-full rounded\" />\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\t}\n\n\tprivate _setMultiContainerMaxWidth() {\n\t\tif (!this._inputRef || !this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._multiContainerRef.style.maxWidth = `${this._inputRef.clientWidth - 16}px`;\n\t}\n\n\tprivate _checkSelectedItems() {\n\t\tif (!this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst containerRect = this._multiContainerRef.getBoundingClientRect();\n\t\tconst items = Array.from(\n\t\t\tthis._multiContainerRef.querySelectorAll('.item')\n\t\t) as HTMLElement[];\n\n\t\tlet amountHidden = 0;\n\n\t\tfor (const child of items) {\n\t\t\tchild.classList.remove('hidden');\n\n\t\t\tconst childRect = child.getBoundingClientRect();\n\t\t\tif (childRect.right > containerRect.right) {\n\t\t\t\tchild.classList.add('hidden');\n\t\t\t\tamountHidden++;\n\t\t\t}\n\t\t}\n\n\t\tthis._amountHidden = amountHidden;\n\t\tconst extra = this._multiContainerRef.querySelector('.extra');\n\t\tif (!extra) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!extra.classList.contains('hidden')) {\n\t\t\textra.classList.add('hidden');\n\t\t}\n\n\t\tif (amountHidden > 0) {\n\t\t\textra.classList.remove('hidden');\n\t\t}\n\t}\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-slider-indicator.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,2BAA2B,GAAG,+dAA+d;;MCOtf,eAAe;;;
|
|
1
|
+
{"file":"p-slider-indicator.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,2BAA2B,GAAG,+dAA+d;;MCOtf,eAAe;;;kBAID,KAAK;;EAE/B,MAAM;IACL,QACCA,QAACC,UAAI,IACJ,KAAK,EAAE,sBAAsB,IAAI,CAAC,MAAM,IAAI,QAAQ,EAAE,GAC/C,EACP;GACF;;;;;;","names":["h","Host"],"sources":["src/components/atoms/slider-indicator/slider-indicator.component.scss?tag=p-slider-indicator&encapsulation=shadow","src/components/atoms/slider-indicator/slider-indicator.component.tsx"],"sourcesContent":[":host {\n\t@apply block w-2 h-2 bg-mystic-dark rounded-round;\n}\n\n:host(.active) {\n\t@apply bg-indigo;\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-slider-indicator',\n\tstyleUrl: 'slider-indicator.component.scss',\n\tshadow: true,\n})\nexport class SliderIndicator {\n\t/**\n\t * Wether the slider indicator is active\n\t */\n\t@Prop() active: boolean = false;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={`p-slider-indicator ${this.active && 'active'}`}\n\t\t\t></Host>\n\t\t);\n\t}\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-status.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,kBAAkB,GAAG,6xBAA6xB;;MCQ3yB,MAAM;;;
|
|
1
|
+
{"file":"p-status.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,kBAAkB,GAAG,6xBAA6xB;;MCQ3yB,MAAM;;;mBAKjB,SAAS;;;;;EAiBV,MAAM;IACL,QACCA,QAACC,UAAI,IACJ,KAAK,EAAE,oBAAoB,IAAI,CAAC,OAAO;kBACzB,IAEb,IAAI,CAAC,QAAQ,EAAE,EAChBD,qBAAQ,CACF,EACN;GACF;EAEO,QAAQ;IACf,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;IAEjD,IAAI,CAAC,IAAI,EAAE;MACV,OAAO;KACP;IAED,QACCA,oBACC,OAAO,EAAE,IAAI,EACb,IAAI,EAAE,IAAI,CAAC,QAAQ,EACnB,MAAM,EAAE,IAAI,CAAC,UAAU,GACtB,EACD;GACF;EAEO,eAAe;IACtB,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,QAAQ,IAAI,CAAC,OAAO;MACnB,KAAK,UAAU;QACd,IAAI,GAAG,WAAW,CAAC;QACnB,MAAM;MACP,KAAK,UAAU;QACd,IAAI,GAAG,UAAU,CAAC;QAClB,MAAM;MACP,KAAK,UAAU;QACd,IAAI,GAAG,OAAO,CAAC;QACf,MAAM;MACP;QACC,IAAI,GAAG,IAAI,CAAC;QACZ,MAAM;KACP;IAED,OAAO,IAAI,CAAC;GACZ;;;;;;","names":["h","Host"],"sources":["src/components/atoms/status/status.component.scss?tag=p-status","src/components/atoms/status/status.component.tsx"],"sourcesContent":["p-status {\n\t@apply flex items-center;\n\t@apply text-sm text-storm-vague font-medium;\n\n\tp-icon {\n\t\t@apply mr-2 text-base;\n\t}\n\n\t&.variant-positive {\n\t\t@apply text-positive;\n\t}\n\n\t&.variant-unbiased {\n\t\t@apply text-unbiased;\n\t}\n\n\t&.variant-negative {\n\t\t@apply text-negative;\n\t}\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { RotateOptions } from '../../../types/tailwind';\nimport { IconFlipOptions, IconVariant } from '../icon/icon.component';\n\n@Component({\n\ttag: 'p-status',\n\tstyleUrl: 'status.component.scss',\n})\nexport class Status {\n\t/**\n\t * The variant of the status\n\t */\n\t@Prop() variant: 'default' | 'positive' | 'unbiased' | 'negative' =\n\t\t'default';\n\n\t/**\n\t * Icon to show on the status\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * Icon flip\n\t */\n\t@Prop() iconFlip: IconFlipOptions;\n\n\t/**\n\t * Icon rotate\n\t */\n\t@Prop() iconRotate: RotateOptions;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={`p-status variant-${this.variant}\n }`}\n\t\t\t>\n\t\t\t\t{this._getIcon()}\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _getIcon() {\n\t\tconst icon = this.icon || this._getVariantIcon();\n\n\t\tif (!icon) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn (\n\t\t\t<p-icon\n\t\t\t\tvariant={icon}\n\t\t\t\tflip={this.iconFlip}\n\t\t\t\trotate={this.iconRotate}\n\t\t\t/>\n\t\t);\n\t}\n\n\tprivate _getVariantIcon() {\n\t\tlet icon = null;\n\t\tswitch (this.variant) {\n\t\t\tcase 'positive':\n\t\t\t\ticon = 'checkmark';\n\t\t\t\tbreak;\n\t\t\tcase 'negative':\n\t\t\t\ticon = 'negative';\n\t\t\t\tbreak;\n\t\t\tcase 'unbiased':\n\t\t\t\ticon = 'clock';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ticon = null;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn icon;\n\t}\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-stepper-item.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,uBAAuB,GAAG,g6HAAg6H;;MCOn7H,WAAW;;;
|
|
1
|
+
{"file":"p-stepper-item.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,uBAAuB,GAAG,g6HAAg6H;;MCOn7H,WAAW;;;iBAIsC,QAAQ;qBAMpE,YAAY;2BAK+C,KAAK;oBAKpB,KAAK;kBAKP,KAAK;;EAEhD,MAAM;IACL,QACCA,QAACC,UAAI,IAAC,KAAK,EAAC,gBAAgB,IAC3BD,iBAAK,KAAK,EAAC,QAAQ,IACjB,IAAI,CAAC,QAAQ,IAAIA,oBAAQ,OAAO,EAAC,WAAW,GAAG,CAC3C,EACNA,iBAAK,KAAK,EAAC,SAAS,IACnBA,kBAAM,IAAI,EAAC,SAAS,GAAG,CAClB,CACA,EACN;GACF;;;;;;","names":["h","Host"],"sources":["src/components/atoms/stepper-item/stepper-item.component.scss?tag=p-stepper-item&encapsulation=shadow","src/components/atoms/stepper-item/stepper-item.component.tsx"],"sourcesContent":[":host {\n\t@apply relative flex w-full items-end justify-center;\n\n\t.content {\n\t\t@apply min-w-[calc(100%-2rem)] whitespace-nowrap;\n\t\t@apply text-sm text-storm-light;\n\t}\n\n\t.circle {\n\t\t@apply transition duration-500 ease-in-out;\n\t\t@apply flex items-center justify-center;\n\t\t@apply h-4 w-4 rounded-round;\n\t\t@apply bg-mystic-dark text-white;\n\n\t\tp-icon {\n\t\t\t@apply flex #{!important};\n\t\t\tfont-size: 0.625rem;\n\t\t}\n\t}\n}\n\n:host([direction='horizontal']) {\n\t@apply h-10;\n\n\t.content {\n\t\t@apply absolute top-0 min-w-0;\n\t\t@apply order-1;\n\t}\n\n\t.circle {\n\t\t@apply order-2;\n\t}\n}\n\n:host([direction='vertical']) {\n\t@apply min-h-[1rem] items-center;\n\n\t.content {\n\t\t@apply order-2 ml-4;\n\t}\n\n\t.circle {\n\t\t@apply order-1;\n\t}\n}\n\n:host([active]),\n:host([finished]) {\n\t.content {\n\t\t@apply text-indigo;\n\t}\n\n\t.circle {\n\t\t@apply bg-indigo;\n\t}\n}\n\n:host([direction='horizontal'][align='start']) {\n\t.content {\n\t\t@apply left-0;\n\t}\n}\n\n:host([direction='horizontal'][align='end']) {\n\t.content {\n\t\t@apply right-0;\n\t}\n}\n\n:host([direction='horizontal'][align='center']) {\n\t.content {\n\t\t@apply left-1/2 -translate-x-1/2 transform text-center;\n\t}\n}\n\n:host([direction='vertical'][content-position='start']) {\n\t@apply flex-row-reverse;\n\n\t.content {\n\t\t@apply ml-0 mr-4 flex justify-end;\n\t}\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper-item',\n\tstyleUrl: 'stepper-item.component.scss',\n\tshadow: true,\n})\nexport class StepperItem {\n\t/**\n\t * The alignment of the step content\n\t */\n\t@Prop({ reflect: true }) align: 'start' | 'center' | 'end' = 'center';\n\n\t/**\n\t * The direction of the stepper step\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' =\n\t\t'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * Wether the step is finished\n\t */\n\t@Prop({ reflect: true }) finished: boolean = false;\n\n\t/**\n\t * Wether the step is active\n\t */\n\t@Prop({ reflect: true }) active: boolean = false;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-stepper-item\">\n\t\t\t\t<div class=\"circle\">\n\t\t\t\t\t{this.finished && <p-icon variant=\"checkmark\" />}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"content\">\n\t\t\t\t\t<slot name=\"content\" />\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-stepper-line.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,uBAAuB,GAAG,67DAA67D;;MCOh9D,WAAW;;;
|
|
1
|
+
{"file":"p-stepper-line.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,uBAAuB,GAAG,67DAA67D;;MCOh9D,WAAW;;;kBAIoB,KAAK;qBAM/C,YAAY;;EAEb,MAAM;IACL,OAAOA,QAACC,UAAI,IAAC,KAAK,EAAC,gBAAgB,GAAQ,CAAC;GAC5C;;;;;;","names":["h","Host"],"sources":["src/components/atoms/stepper-line/stepper-line.component.scss?tag=p-stepper-line&encapsulation=shadow","src/components/atoms/stepper-line/stepper-line.component.tsx"],"sourcesContent":[":host {\n\t@apply flex-auto;\n\t@apply transition duration-500 ease-in-out;\n\n\t@apply block;\n\n\t@apply bg-mystic-dark;\n}\n\n:host([direction='horizontal']) {\n\t@apply mb-[calc(.5rem-1px)] h-[2px];\n}\n\n:host([direction='vertical']) {\n\t@apply ml-[calc(.5rem-1px)] mr-[calc(.5rem-1px)] min-h-[1rem] w-[2px];\n}\n\n:host([active]) {\n\t@apply bg-indigo;\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper-line',\n\tstyleUrl: 'stepper-line.component.scss',\n\tshadow: true,\n})\nexport class StepperLine {\n\t/**\n\t * Wether the line is active\n\t */\n\t@Prop({ reflect: true }) active: boolean = false;\n\n\t/**\n\t * The direction of the stepper line\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' =\n\t\t'horizontal';\n\n\trender() {\n\t\treturn <Host class=\"p-stepper-line\"></Host>;\n\t}\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-stepper.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,gfAAgf;;MCO/f,OAAO;;;
|
|
1
|
+
{"file":"p-stepper.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,gfAAgf;;MCO/f,OAAO;;;sBAIU,CAAC;qBAM7B,YAAY;2BAK+C,KAAK;;;EASjE,kBAAkB;IACjB,IAAI,CAAC,cAAc,EAAE,CAAC;GACtB;EAED,MAAM;IACL,QACCA,QAACC,UAAI,IAAC,KAAK,EAAC,WAAW,IACtBD,qBAAQ,CACF,EACN;GACF;EAGO,cAAc;IACrB,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAE1D,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,UAAU,GAAG,CAAC,EAAE;MACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,CAAA,EAAE,CAAC,EAAE,EAAE;QACvC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAQ,CAAC;QAElC,IAAI,IAAI,CAAC,MAAM,EAAE;UAChB,UAAU,GAAG,CAAC,CAAC;SACf;QAED,IAAI,UAAU,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE;UACpC,UAAU,GAAG,CAAC,GAAG,CAAC,CAAC;SACnB;OACD;KACD;IAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,CAAA,EAAE,CAAC,EAAE,EAA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C;WACP;UAED,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;UAE7C,SAAS;SACT;OACD;MAED,IAAI,CAAC,GAAG,CAAC,EAAE;QACV,MAAM,YAAY,GAAG,IAAI,CAAC,sBAAsB,CAAC;QACjD,IAAI,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,gBAAgB,EAAE;UAC5D,YAAY,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;UACxC,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC;SACnD;OACD;KACD;GACD;;;;;;;;;;","names":["h","Host"],"sources":["src/components/molecules/stepper/stepper.component.scss?tag=p-stepper&encapsulation=shadow","src/components/molecules/stepper/stepper.component.tsx"],"sourcesContent":[":host {\n\t@apply flex;\n}\n\n:host([direction='horizontal']) {\n\t@apply h-auto items-end;\n}\n\n:host([direction='vertical']) {\n\t@apply flex-col flex-wrap items-start;\n\t@apply w-full min-h-full;\n}\n\n:host([direction='vertical'][content-position='start']) {\n\t@apply items-end;\n}\n","import { Component, Element, h, Host, Prop, Watch } from '@stencil/core';\n\n@Component({\n\ttag: 'p-stepper',\n\tstyleUrl: 'stepper.component.scss',\n\tshadow: true,\n})\nexport class Stepper {\n\t/**\n\t * The currently active step\n\t */\n\t@Prop() activeStep: number = 1;\n\n\t/**\n\t * The direction of the stepper\n\t */\n\t@Prop({ reflect: true }) direction: 'horizontal' | 'vertical' =\n\t\t'horizontal';\n\n\t/**\n\t * The position of the content in case of vertical direction\n\t */\n\t@Prop({ reflect: true }) contentPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t// private _steps: Array<HTMLPStepperItemElement>;\n\n\tcomponentDidRender() {\n\t\tthis._generateSteps();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-stepper\">\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Watch('activeStep')\n\tprivate _generateSteps() {\n\t\tlet activeStep = this.activeStep - 1 || 0;\n\t\tconst items = this._el.querySelectorAll('p-stepper-item');\n\n\t\tif (!this.activeStep || activeStep < 0) {\n\t\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\t\tconst item = items.item(i) as any;\n\n\t\t\t\tif (item.active) {\n\t\t\t\t\tactiveStep = i;\n\t\t\t\t}\n\n\t\t\t\tif (activeStep < 0 && item.finished) {\n\t\t\t\t\tactiveStep = i + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (let i = 0; i < items?.length; i++) {\n\t\t\tconst item = items.item(i) as any;\n\n\t\t\titem.active = i === activeStep;\n\t\t\titem.finished = i < activeStep;\n\t\t\titem.direction = this.direction;\n\t\t\titem.align =\n\t\t\t\ti === 0 ? 'start' : i === items?.length - 1 ? 'end' : 'center';\n\t\t\titem.contentPosition = this.contentPosition;\n\n\t\t\tif (i < items.length - 1) {\n\t\t\t\tconst nextItem = item.nextElementSibling;\n\t\t\t\tif (\n\t\t\t\t\tnextItem &&\n\t\t\t\t\tnextItem.tagName.toLowerCase() === 'p-stepper-item'\n\t\t\t\t) {\n\t\t\t\t\tconst heightDiff = (item.clientHeight - 16) / 2;\n\n\t\t\t\t\tconst stepperLine =\n\t\t\t\t\t\tdocument.createElement('p-stepper-line');\n\n\t\t\t\t\tstepperLine.direction = this.direction;\n\t\t\t\t\tstepperLine.active = i <= activeStep;\n\n\t\t\t\t\tif (heightDiff > 0 && this.direction === 'vertical') {\n\t\t\t\t\t\tstepperLine.style.marginTop = `-${heightDiff / 16}rem`;\n\t\t\t\t\t\tstepperLine.style.marginBottom = `-${\n\t\t\t\t\t\t\theightDiff / 16\n\t\t\t\t\t\t}rem`;\n\t\t\t\t\t\tstepperLine.style.minHeight = `calc(1rem + ${\n\t\t\t\t\t\t\t(heightDiff * 2) / 16\n\t\t\t\t\t\t}rem)`;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._el.insertBefore(stepperLine, nextItem);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (i > 0) {\n\t\t\t\tconst previousItem = item.previousElementSibling;\n\t\t\t\tif (previousItem.tagName.toLowerCase() === 'p-stepper-line') {\n\t\t\t\t\tpreviousItem.direction = this.direction;\n\t\t\t\t\tpreviousItem.active = item.active || item.finished;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-tab-group.entry.cjs.js","mappings":";;;;;;MAMa,QAAQ;;;;;
|
|
1
|
+
{"file":"p-tab-group.entry.cjs.js","mappings":";;;;;;MAMa,QAAQ;;;;;wBAGbA,UAAC,sDACL,iBAAK,kEACJ,wBAED,uBAAW,gDACL,EACN;;;;;;;;","names":["Host"],"sources":["src/components/atoms/tab-group/tab-group.component.tsx"],"sourcesContent":["import { Component, h, Host } from '@stencil/core';\n\n@Component({\n\ttag: 'p-tab-group',\n\tshadow: true,\n})\nexport class TabGroup {\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-tab-group relative flex w-full flex-col\">\n\t\t\t\t<div class=\"scrollbar-hide z-10 flex w-full gap-5 overflow-x-auto\">\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t\t<p-divider class=\"absolute bottom-0 left-0 m-0 w-full\" />\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-tab-item.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,u9BAAu9B;;MCOt+B,OAAO;;;
|
|
1
|
+
{"file":"p-tab-item.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,mBAAmB,GAAG,u9BAAu9B;;MCOt+B,OAAO;;;kBAIO,KAAK;;EAE/B,MAAM;IACL,QACCA,QAACC,UAAI,IAAC,KAAK,EAAE,cAAc,IAAI,CAAC,MAAM,IAAI,QAAQ,EAAE,IACnDD,qBAAQ,CACF,EACN;GACF;;;;;;","names":["h","Host"],"sources":["src/components/atoms/tab-item/tab-item.component.scss?tag=p-tab-item&encapsulation=shadow","src/components/atoms/tab-item/tab-item.component.tsx"],"sourcesContent":[":host {\n\t@apply flex h-10 items-center;\n\t@apply whitespace-nowrap font-semibold text-storm-medium;\n\t@apply cursor-pointer;\n\t@apply border-0 border-b-2 border-transparent #{!important};\n}\n\n:host(.active) {\n\t@apply border-indigo text-indigo #{!important};\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-tab-item',\n\tstyleUrl: 'tab-item.component.scss',\n\tshadow: true,\n})\nexport class TabItem {\n\t/**\n\t * Wether the tab item is active\n\t */\n\t@Prop() active: boolean = false;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class={`p-tab-item ${this.active && 'active'}`}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t);\n\t}\n}\n"],"version":3}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-table-column.entry.cjs.js","mappings":";;;;;;MAMa,WAAW;;;;;
|
|
1
|
+
{"file":"p-table-column.entry.cjs.js","mappings":";;;;;;MAMa,WAAW;;;;;gBASqC,IAAI;;mBAUL,KAAK;uBAKD,KAAK;iBAMnE,OAAO;kBAKkD,KAAK;iBAUzC,MAAM;;EAQ5B,kBAAkB;IACjB,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;GACvC;EAED,MAAM;IACL,OAAO;GACP;;;;;","names":[],"sources":["src/components/helpers/table-column/table-column.component.tsx"],"sourcesContent":["import { Component, Event, EventEmitter, Prop } from '@stencil/core';\nimport { TableColumnSizes } from '../../../types/table';\n\n@Component({\n\ttag: 'p-table-column',\n})\nexport class TableColumn {\n\t/**\n\t * The path of the value of the item you want to display\n\t */\n\t@Prop({ reflect: true, mutable: true }) path: string;\n\n\t/**\n\t * The type of the column\n\t */\n\t@Prop({ reflect: true, mutable: true }) type: 'td' | 'th' = 'td';\n\n\t/**\n\t * The name of the column\n\t */\n\t@Prop({ reflect: true, mutable: true }) name: string;\n\n\t/**\n\t * Wether the column should use the slot\n\t */\n\t@Prop({ reflect: true, mutable: true }) useSlot: boolean = false;\n\n\t/**\n\t * Wether the column should have a checkbox\n\t */\n\t@Prop({ reflect: true, mutable: true }) hasCheckbox: boolean = false;\n\n\t/**\n\t * The alignment of the column\n\t */\n\t@Prop({ reflect: true, mutable: true }) align: 'start' | 'center' | 'end' =\n\t\t'start';\n\n\t/**\n\t * Wether the column is the last in the row\n\t */\n\t@Prop({ reflect: true, mutable: true }) isLast: boolean = false;\n\n\t/**\n\t * The sizes of the column\n\t */\n\t@Prop({ mutable: true }) sizes:\n\t\t| 'auto'\n\t\t| 'hidden'\n\t\t| 'full'\n\t\t| number\n\t\t| TableColumnSizes = 'auto';\n\n\t/**\n\t * Event to let the table know it has to re render\n\t */\n\t@Event({ bubbles: true, composed: true })\n\ttableDefinitionChanged: EventEmitter<boolean>;\n\n\tcomponentDidUpdate() {\n\t\tthis.tableDefinitionChanged.emit(true);\n\t}\n\n\trender() {\n\t\treturn;\n\t}\n}\n"],"version":3}
|