@paperless/core 2.0.1-beta.150 → 2.0.1-beta.152
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 +23 -0
- package/dist/{paperless/p-c879f50c.entry.js → build/p-0103e9ac.entry.js} +2 -2
- package/dist/build/{p-0740b690.entry.js → p-133e9259.entry.js} +2 -2
- package/dist/build/{p-c4724fb7.entry.js → p-213bc400.entry.js} +2 -2
- package/dist/build/p-213bc400.entry.js.map +1 -0
- package/dist/build/{p-e33a56c8.entry.js → p-219db898.entry.js} +2 -2
- package/dist/build/{p-cc3307b8.entry.js → p-2da67519.entry.js} +2 -2
- package/dist/build/{p-8981247d.entry.js → p-302eedc6.entry.js} +2 -2
- package/dist/build/p-32f997e7.entry.js +2 -0
- package/dist/build/p-3322c57a.js +2 -0
- package/dist/build/p-3f02cbe4.entry.js +2 -0
- package/dist/build/p-3f02cbe4.entry.js.map +1 -0
- package/dist/build/{p-add932d6.entry.js → p-4fb1f39b.entry.js} +2 -2
- package/dist/{paperless/p-5048c4c2.entry.js → build/p-50a816b0.entry.js} +2 -2
- package/dist/build/{p-8fcf3bb8.entry.js → p-7b7c60de.entry.js} +2 -2
- package/dist/build/{p-e2054751.entry.js → p-9e4cbacf.entry.js} +2 -2
- package/dist/build/p-ad3595e3.entry.js +3 -0
- package/dist/build/p-ad3595e3.entry.js.map +1 -0
- package/dist/build/p-b137cbd4.entry.js +2 -0
- package/dist/build/{p-d6828011.entry.js → p-bb7a5be7.entry.js} +2 -2
- package/dist/build/{p-2edd87f3.entry.js → p-c3558fb4.entry.js} +2 -2
- package/dist/build/{p-6230b6da.entry.js → p-c74c4740.entry.js} +2 -2
- package/dist/build/p-c74c4740.entry.js.map +1 -0
- package/dist/build/{p-26a3990a.entry.js → p-c892b87a.entry.js} +2 -2
- package/dist/build/p-cropper.entry.esm.js.map +1 -1
- package/dist/build/{p-fa0234e9.entry.js → p-dc5fab19.entry.js} +2 -2
- package/dist/{paperless/p-0875bbbb.entry.js → build/p-e596d429.entry.js} +2 -2
- package/dist/build/p-empty-state.p-floating-menu-container.p-floating-menu-item.p-table-cell.p-table-container.p-table-footer.p-table-header.p-table-row.p-table-row-actions-container.entry.esm.js.map +1 -1
- package/dist/build/{p-d4152f66.entry.js → p-fa78c45a.entry.js} +2 -2
- package/dist/build/p-range.entry.esm.js.map +1 -0
- package/dist/build/p-table.entry.esm.js.map +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/index-BDuPp9vl.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-accordion.cjs.entry.js +2 -2
- package/dist/cjs/p-attachment.cjs.entry.js +6 -6
- package/dist/cjs/p-button-group.cjs.entry.js +1 -1
- package/dist/cjs/p-calendar.cjs.entry.js +1 -1
- package/dist/cjs/p-checkbox_4.cjs.entry.js +3 -3
- package/dist/cjs/p-content-slider.cjs.entry.js +2 -2
- package/dist/cjs/p-cropper.cjs.entry.js +6 -19
- package/dist/cjs/p-cropper.cjs.entry.js.map +1 -1
- package/dist/cjs/p-cropper.entry.cjs.js.map +1 -1
- package/dist/cjs/p-datepicker.cjs.entry.js +2 -2
- package/dist/cjs/p-empty-state.p-floating-menu-container.p-floating-menu-item.p-table-cell.p-table-container.p-table-footer.p-table-header.p-table-row.p-table-row-actions-container.entry.cjs.js.map +1 -1
- package/dist/cjs/p-empty-state_9.cjs.entry.js +23 -9
- package/dist/cjs/p-empty-state_9.cjs.entry.js.map +1 -1
- package/dist/cjs/p-field_2.cjs.entry.js +3 -3
- package/dist/cjs/p-label.cjs.entry.js +3 -3
- package/dist/cjs/p-listing.cjs.entry.js +2 -2
- package/dist/cjs/p-navbar.cjs.entry.js +1 -1
- package/dist/cjs/p-navigation-item.cjs.entry.js +2 -2
- package/dist/cjs/p-navigation-section.cjs.entry.js +1 -1
- package/dist/cjs/p-pagination_3.cjs.entry.js +4 -4
- package/dist/cjs/p-portal.cjs.entry.js +1 -1
- package/dist/cjs/p-range.cjs.entry.js +44 -0
- package/dist/cjs/p-range.cjs.entry.js.map +1 -0
- package/dist/cjs/p-range.entry.cjs.js.map +1 -0
- package/dist/cjs/p-select.cjs.entry.js +1 -1
- package/dist/cjs/p-table.cjs.entry.js +1 -1
- package/dist/cjs/p-table.cjs.entry.js.map +1 -1
- package/dist/cjs/p-table.entry.cjs.js.map +1 -1
- package/dist/cjs/p-toast.cjs.entry.js +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/helpers/portal/portal.component.js +1 -1
- package/dist/collection/components/molecules/accordion/accordion.component.js +2 -2
- package/dist/collection/components/molecules/attachment/attachment.component.js +6 -6
- package/dist/collection/components/molecules/button-group/button-group.component.js +1 -1
- package/dist/collection/components/molecules/calendar/calendar.component.js +1 -1
- package/dist/collection/components/molecules/content-slider/content-slider.component.js +2 -2
- package/dist/collection/components/molecules/cropper/cropper.component.css +1 -0
- package/dist/collection/components/{deprecated/molecules → molecules}/cropper/cropper.component.js +8 -41
- package/dist/collection/components/molecules/cropper/cropper.component.js.map +1 -0
- package/dist/collection/components/molecules/datepicker/datepicker.component.js +2 -2
- package/dist/collection/components/molecules/dropdown/dropdown.component.js +3 -3
- package/dist/collection/components/molecules/empty-state/empty-state.component.js +2 -2
- package/dist/collection/components/molecules/field/field/field.component.js +3 -3
- package/dist/collection/components/molecules/label/label.component.js +3 -3
- package/dist/collection/components/molecules/navigation/item/navigation-item.component.js +2 -2
- package/dist/collection/components/molecules/navigation/section/navigation-section.component.js +1 -1
- package/dist/collection/components/molecules/pagination/pages/pagination-pages.component.js +1 -1
- package/dist/collection/components/molecules/pagination/pagination/pagination.component.js +3 -3
- package/dist/collection/components/molecules/range/range.component.css +1 -0
- package/dist/collection/components/molecules/range/range.component.js +144 -0
- package/dist/collection/components/molecules/range/range.component.js.map +1 -0
- package/dist/collection/components/molecules/select/select.component.js +1 -1
- package/dist/collection/components/molecules/table/cell/table-cell.component.js +1 -1
- package/dist/collection/components/molecules/table/footer/table-footer.component.js +2 -2
- package/dist/collection/components/molecules/table/row/table-row.component.css +1 -1
- package/dist/collection/components/molecules/table/row/table-row.component.js +37 -3
- package/dist/collection/components/molecules/table/row/table-row.component.js.map +1 -1
- package/dist/collection/components/molecules/toast/toast.component.js +1 -1
- package/dist/collection/components/organisms/listing/listing.component.js +2 -2
- package/dist/collection/components/organisms/navbar/navbar.component.js +1 -1
- package/dist/collection/components/organisms/table/table.component.js +1 -1
- package/dist/collection/components/organisms/table/table.component.js.map +1 -1
- package/dist/components/p--NCbtXAT.js +69 -0
- package/dist/components/p--NCbtXAT.js.map +1 -0
- package/dist/components/{p-D07Uh9cR.js → p-6G9LqZu0.js} +3 -3
- package/dist/components/{p-D07Uh9cR.js.map → p-6G9LqZu0.js.map} +1 -1
- package/dist/components/{p-CU2NvmYF.js → p-B60b7s3F.js} +9 -9
- package/dist/components/{p-CU2NvmYF.js.map → p-B60b7s3F.js.map} +1 -1
- package/dist/components/{p-DQE2U_Lj.js → p-BPFWBp7T.js} +9 -9
- package/dist/components/{p-DQE2U_Lj.js.map → p-BPFWBp7T.js.map} +1 -1
- package/dist/components/{p-DfRQHBer.js → p-BuB74H5T.js} +3 -3
- package/dist/components/{p-DfRQHBer.js.map → p-BuB74H5T.js.map} +1 -1
- package/dist/components/{p-Du_Am2CT.js → p-C0ZWBE1t.js} +6 -6
- package/dist/components/{p-Du_Am2CT.js.map → p-C0ZWBE1t.js.map} +1 -1
- package/dist/components/{p-FA9hEJhK.js → p-C4qAvszO.js} +4 -4
- package/dist/components/{p-FA9hEJhK.js.map → p-C4qAvszO.js.map} +1 -1
- package/dist/components/{p-Dh_4gXYW.js → p-C6mKH4oI.js} +3 -3
- package/dist/components/{p-Dh_4gXYW.js.map → p-C6mKH4oI.js.map} +1 -1
- package/dist/components/{p-jSbWZMTW.js → p-CJPrTM14.js} +3 -3
- package/dist/components/{p-jSbWZMTW.js.map → p-CJPrTM14.js.map} +1 -1
- package/dist/components/{p-C7SA9Zu6.js → p-COcP6KwP.js} +5 -5
- package/dist/components/{p-C7SA9Zu6.js.map → p-COcP6KwP.js.map} +1 -1
- package/dist/components/{p-DnE_NWa3.js → p-CSK_X0tW.js} +9 -9
- package/dist/components/{p-DnE_NWa3.js.map → p-CSK_X0tW.js.map} +1 -1
- package/dist/components/{p-CzDfB4le.js → p-CdJmhxHE.js} +22 -7
- package/dist/components/p-CdJmhxHE.js.map +1 -0
- package/dist/components/{p-Bs_oUMiX.js → p-QH6YwDKn.js} +4 -4
- package/dist/components/{p-Bs_oUMiX.js.map → p-QH6YwDKn.js.map} +1 -1
- package/dist/components/{p-v8w9H3NB.js → p-S7p7V6sq.js} +4 -4
- package/dist/components/{p-v8w9H3NB.js.map → p-S7p7V6sq.js.map} +1 -1
- package/dist/components/p-accordion.js +2 -2
- package/dist/components/p-attachment.js +10 -10
- package/dist/components/p-button-group.js +1 -1
- package/dist/components/{p-DqpPnj1P.js → p-c2_LHyBE.js} +3 -3
- package/dist/components/{p-DqpPnj1P.js.map → p-c2_LHyBE.js.map} +1 -1
- package/dist/components/p-calendar.js +1 -1
- package/dist/components/p-content-slider.js +2 -2
- package/dist/components/p-cropper.js +15 -23
- package/dist/components/p-cropper.js.map +1 -1
- package/dist/components/p-datepicker.js +9 -9
- package/dist/components/p-dropdown.js +1 -1
- package/dist/components/p-empty-state.js +1 -1
- package/dist/components/p-field-container.js +1 -1
- package/dist/components/p-field.js +1 -1
- package/dist/components/p-helper.js +1 -1
- package/dist/components/p-label.js +3 -3
- package/dist/components/p-listing.js +2 -2
- package/dist/components/p-navbar.js +1 -1
- package/dist/components/p-navigation-item.js +2 -2
- package/dist/components/p-navigation-section.js +1 -1
- package/dist/components/p-pagination-pages.js +1 -1
- package/dist/components/p-pagination-size.js +1 -1
- package/dist/components/p-pagination.js +1 -1
- package/dist/components/p-portal.js +1 -1
- package/dist/components/p-profile.js +2 -2
- package/dist/components/p-range.d.ts +11 -0
- package/dist/components/p-range.js +9 -0
- package/dist/components/p-range.js.map +1 -0
- package/dist/components/p-select.js +7 -7
- package/dist/components/p-table-cell.js +1 -1
- package/dist/components/p-table-footer.js +1 -1
- package/dist/components/p-table-header.js +1 -1
- package/dist/components/p-table-row.js +1 -1
- package/dist/components/p-table.js +15 -15
- package/dist/components/p-table.js.map +1 -1
- package/dist/components/p-toast.js +1 -1
- package/dist/components/p-tooltip.js +1 -1
- package/dist/components/{p-B1sC2mve.js → p-z7y5Yxgj.js} +7 -7
- package/dist/components/{p-B1sC2mve.js.map → p-z7y5Yxgj.js.map} +1 -1
- package/dist/esm/index-DhGo7hbh.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-accordion.entry.js +2 -2
- package/dist/esm/p-attachment.entry.js +6 -6
- package/dist/esm/p-button-group.entry.js +1 -1
- package/dist/esm/p-calendar.entry.js +1 -1
- package/dist/esm/p-checkbox_4.entry.js +3 -3
- package/dist/esm/p-content-slider.entry.js +2 -2
- package/dist/esm/p-cropper.entry.js +6 -19
- package/dist/esm/p-cropper.entry.js.map +1 -1
- package/dist/esm/p-datepicker.entry.js +2 -2
- package/dist/esm/p-empty-state.p-floating-menu-container.p-floating-menu-item.p-table-cell.p-table-container.p-table-footer.p-table-header.p-table-row.p-table-row-actions-container.entry.js.map +1 -1
- package/dist/esm/p-empty-state_9.entry.js +23 -9
- package/dist/esm/p-empty-state_9.entry.js.map +1 -1
- package/dist/esm/p-field_2.entry.js +3 -3
- package/dist/esm/p-label.entry.js +3 -3
- package/dist/esm/p-listing.entry.js +2 -2
- package/dist/esm/p-navbar.entry.js +1 -1
- package/dist/esm/p-navigation-item.entry.js +2 -2
- package/dist/esm/p-navigation-section.entry.js +1 -1
- package/dist/esm/p-pagination_3.entry.js +4 -4
- package/dist/esm/p-portal.entry.js +1 -1
- package/dist/esm/p-range.entry.js +42 -0
- package/dist/esm/p-range.entry.js.map +1 -0
- package/dist/esm/p-select.entry.js +1 -1
- package/dist/esm/p-table.entry.js +1 -1
- package/dist/esm/p-table.entry.js.map +1 -1
- package/dist/esm/p-toast.entry.js +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/{build/p-c879f50c.entry.js → paperless/p-0103e9ac.entry.js} +2 -2
- package/dist/paperless/{p-0740b690.entry.js → p-133e9259.entry.js} +2 -2
- package/dist/paperless/{p-c4724fb7.entry.js → p-213bc400.entry.js} +2 -2
- package/dist/paperless/p-213bc400.entry.js.map +1 -0
- package/dist/paperless/{p-e33a56c8.entry.js → p-219db898.entry.js} +2 -2
- package/dist/paperless/{p-cc3307b8.entry.js → p-2da67519.entry.js} +2 -2
- package/dist/paperless/{p-8981247d.entry.js → p-302eedc6.entry.js} +2 -2
- package/dist/paperless/p-32f997e7.entry.js +2 -0
- package/dist/paperless/p-3f02cbe4.entry.js +2 -0
- package/dist/paperless/p-3f02cbe4.entry.js.map +1 -0
- package/dist/paperless/{p-add932d6.entry.js → p-4fb1f39b.entry.js} +2 -2
- package/dist/{build/p-5048c4c2.entry.js → paperless/p-50a816b0.entry.js} +2 -2
- package/dist/paperless/{p-8fcf3bb8.entry.js → p-7b7c60de.entry.js} +2 -2
- package/dist/paperless/{p-e2054751.entry.js → p-9e4cbacf.entry.js} +2 -2
- package/dist/paperless/p-ad3595e3.entry.js +3 -0
- package/dist/paperless/p-ad3595e3.entry.js.map +1 -0
- package/dist/paperless/p-b137cbd4.entry.js +2 -0
- package/dist/paperless/{p-d6828011.entry.js → p-bb7a5be7.entry.js} +2 -2
- package/dist/paperless/{p-2edd87f3.entry.js → p-c3558fb4.entry.js} +2 -2
- package/dist/paperless/{p-6230b6da.entry.js → p-c74c4740.entry.js} +2 -2
- package/dist/paperless/p-c74c4740.entry.js.map +1 -0
- package/dist/paperless/{p-26a3990a.entry.js → p-c892b87a.entry.js} +2 -2
- package/dist/paperless/p-cropper.entry.esm.js.map +1 -1
- package/dist/paperless/{p-fa0234e9.entry.js → p-dc5fab19.entry.js} +2 -2
- package/dist/{build/p-0875bbbb.entry.js → paperless/p-e596d429.entry.js} +2 -2
- package/dist/paperless/p-empty-state.p-floating-menu-container.p-floating-menu-item.p-table-cell.p-table-container.p-table-footer.p-table-header.p-table-row.p-table-row-actions-container.entry.esm.js.map +1 -1
- package/dist/paperless/{p-d4152f66.entry.js → p-fa78c45a.entry.js} +2 -2
- package/dist/paperless/p-range.entry.esm.js.map +1 -0
- package/dist/paperless/p-table.entry.esm.js.map +1 -1
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/{deprecated/molecules → molecules}/cropper/cropper.component.d.ts +2 -6
- package/dist/types/components/molecules/range/range.component.d.ts +24 -0
- package/dist/types/components/molecules/table/row/table-row.component.d.ts +4 -0
- package/dist/types/components.d.ts +74 -10
- package/package.json +2 -2
- package/dist/build/p-30f6e463.entry.js +0 -3
- package/dist/build/p-30f6e463.entry.js.map +0 -1
- package/dist/build/p-474a16ab.entry.js +0 -2
- package/dist/build/p-6230b6da.entry.js.map +0 -1
- package/dist/build/p-c4724fb7.entry.js.map +0 -1
- package/dist/build/p-d3554d9b.js +0 -2
- package/dist/build/p-eef52967.entry.js +0 -2
- package/dist/collection/components/deprecated/molecules/cropper/cropper.component.css +0 -1
- package/dist/collection/components/deprecated/molecules/cropper/cropper.component.js.map +0 -1
- package/dist/components/p-CzDfB4le.js.map +0 -1
- package/dist/paperless/p-30f6e463.entry.js +0 -3
- package/dist/paperless/p-30f6e463.entry.js.map +0 -1
- package/dist/paperless/p-474a16ab.entry.js +0 -2
- package/dist/paperless/p-6230b6da.entry.js.map +0 -1
- package/dist/paperless/p-c4724fb7.entry.js.map +0 -1
- package/dist/paperless/p-eef52967.entry.js +0 -2
- /package/dist/build/{p-c879f50c.entry.js.map → p-0103e9ac.entry.js.map} +0 -0
- /package/dist/build/{p-0740b690.entry.js.map → p-133e9259.entry.js.map} +0 -0
- /package/dist/build/{p-e33a56c8.entry.js.map → p-219db898.entry.js.map} +0 -0
- /package/dist/build/{p-cc3307b8.entry.js.map → p-2da67519.entry.js.map} +0 -0
- /package/dist/build/{p-8981247d.entry.js.map → p-302eedc6.entry.js.map} +0 -0
- /package/dist/build/{p-474a16ab.entry.js.map → p-32f997e7.entry.js.map} +0 -0
- /package/dist/build/{p-add932d6.entry.js.map → p-4fb1f39b.entry.js.map} +0 -0
- /package/dist/build/{p-5048c4c2.entry.js.map → p-50a816b0.entry.js.map} +0 -0
- /package/dist/build/{p-8fcf3bb8.entry.js.map → p-7b7c60de.entry.js.map} +0 -0
- /package/dist/build/{p-e2054751.entry.js.map → p-9e4cbacf.entry.js.map} +0 -0
- /package/dist/build/{p-eef52967.entry.js.map → p-b137cbd4.entry.js.map} +0 -0
- /package/dist/build/{p-d6828011.entry.js.map → p-bb7a5be7.entry.js.map} +0 -0
- /package/dist/build/{p-2edd87f3.entry.js.map → p-c3558fb4.entry.js.map} +0 -0
- /package/dist/build/{p-26a3990a.entry.js.map → p-c892b87a.entry.js.map} +0 -0
- /package/dist/build/{p-fa0234e9.entry.js.map → p-dc5fab19.entry.js.map} +0 -0
- /package/dist/build/{p-0875bbbb.entry.js.map → p-e596d429.entry.js.map} +0 -0
- /package/dist/build/{p-d4152f66.entry.js.map → p-fa78c45a.entry.js.map} +0 -0
- /package/dist/paperless/{p-c879f50c.entry.js.map → p-0103e9ac.entry.js.map} +0 -0
- /package/dist/paperless/{p-0740b690.entry.js.map → p-133e9259.entry.js.map} +0 -0
- /package/dist/paperless/{p-e33a56c8.entry.js.map → p-219db898.entry.js.map} +0 -0
- /package/dist/paperless/{p-cc3307b8.entry.js.map → p-2da67519.entry.js.map} +0 -0
- /package/dist/paperless/{p-8981247d.entry.js.map → p-302eedc6.entry.js.map} +0 -0
- /package/dist/paperless/{p-474a16ab.entry.js.map → p-32f997e7.entry.js.map} +0 -0
- /package/dist/paperless/{p-add932d6.entry.js.map → p-4fb1f39b.entry.js.map} +0 -0
- /package/dist/paperless/{p-5048c4c2.entry.js.map → p-50a816b0.entry.js.map} +0 -0
- /package/dist/paperless/{p-8fcf3bb8.entry.js.map → p-7b7c60de.entry.js.map} +0 -0
- /package/dist/paperless/{p-e2054751.entry.js.map → p-9e4cbacf.entry.js.map} +0 -0
- /package/dist/paperless/{p-eef52967.entry.js.map → p-b137cbd4.entry.js.map} +0 -0
- /package/dist/paperless/{p-d6828011.entry.js.map → p-bb7a5be7.entry.js.map} +0 -0
- /package/dist/paperless/{p-2edd87f3.entry.js.map → p-c3558fb4.entry.js.map} +0 -0
- /package/dist/paperless/{p-26a3990a.entry.js.map → p-c892b87a.entry.js.map} +0 -0
- /package/dist/paperless/{p-fa0234e9.entry.js.map → p-dc5fab19.entry.js.map} +0 -0
- /package/dist/paperless/{p-0875bbbb.entry.js.map → p-e596d429.entry.js.map} +0 -0
- /package/dist/paperless/{p-d4152f66.entry.js.map → p-fa78c45a.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,g as i,h as s}from"./p-DhGo7hbh.js";import{a as r}from"./p-BFSNj6hu.js";import{c as a}from"./p-CBWjHURv.js";import"./p-ChV9xqsO.js";const n="*{box-sizing:border-box}.pointer-events-none{pointer-events:none!important}.pointer-events-auto{pointer-events:auto!important}.static{position:static!important}.absolute{position:absolute!important}.relative{position:relative!important}.sticky{position:sticky!important}.top-0{top:0!important}.mb-3{margin-bottom:.75rem!important}.block{display:block!important}.flex{display:flex!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.h-\\[1\\.625rem\\]{height:1.625rem!important}.h-full{height:100%!important}.w-6{width:1.5rem!important}.w-full{width:100%!important}.min-w-0{min-width:0!important}.flex-1{flex:1 1 0%!important}.cursor-pointer{cursor:pointer!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.whitespace-nowrap{white-space:nowrap!important}.rounded{border-radius:.25rem!important}.rounded-lg{border-radius:.5rem!important}.bg-supportive-lilac-100{--tw-bg-opacity:1!important;background-color:rgb(246 239 255/var(--tw-bg-opacity,1))!important}.p-2{padding:.5rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-center{text-align:center!important}.text-start{text-align:start!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-semibold{font-weight:600!important}.text-black-teal-100{--tw-text-opacity:1!important;color:rgb(205 212 211/var(--tw-text-opacity,1))!important}.text-black-teal-400{--tw-text-opacity:1!important;color:rgb(53 85 80/var(--tw-text-opacity,1))!important}.text-supportive-lilac{--tw-text-opacity:1!important;color:rgb(209 174 255/var(--tw-text-opacity,1))!important}.text-teal-800{--tw-text-opacity:1!important;color:rgb(2 102 92/var(--tw-text-opacity,1))!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}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:85.375rem){.container{max-width:85.375rem}}@media (min-width:90rem){.container{max-width:90rem}}@media (min-width:96rem){.container{max-width:96rem}}@media (min-width:105rem){.container{max-width:105rem}}@media (min-width:120rem){.container{max-width:120rem}}@media (min-width:160rem){.container{max-width:160rem}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.group\\/item:hover .group-hover\\/item\\:text-supportive-lilac-800{--tw-text-opacity:1!important;color:rgb(189 140 255/var(--tw-text-opacity,1))!important}";const o=a(["flex items-center gap-2","flex-1 min-w-0 h-full","pointer-events-none overflow-hidden"]);const h=a(["item group/item","pointer-events-auto cursor-pointer","flex h-[1.625rem] items-center gap-2","h-[1.625rem] px-2","text-sm font-semibold whitespace-nowrap","rounded-lg","bg-supportive-lilac-100"]);const l=a("block w-full overflow-hidden text-ellipsis whitespace-nowrap text-start",{variants:{variant:{placeholder:"text-black-teal-400",default:null}}});const m=class{constructor(i){t(this,i);this.queryChange=e(this,"queryChange",3);this.valueChange=e(this,"valueChange",3);this.selectAllChange=e(this,"selectAllChange",3);this.dropdownShown=e(this,"dropdownShown",3);this.add=e(this,"add",3);if(i.$hostElement$["s-ei"]){this._internals=i.$hostElement$["s-ei"]}else{this._internals=i.$hostElement$.attachInternals();i.$hostElement$["s-ei"]=this._internals}}items;multi;usePortal=false;strategy="absolute";icon;query;placeholder;autocompletePlaceholder="Search...";value;displayKey="text";dropdownDisplayKey;selectionDisplayKey;valueKey;avatarKey;iconKey;showIconOnSelectedItem;classKey="class";applyClassOnSelectedItem;avatarLettersKey;identifierKey;queryKey;autoSelectFirst=true;showChevron=true;maxDisplayedItems=10;enableAutocomplete=true;asyncFilter=false;loading=false;enableSelectAll=false;selectAllText="Select all";selectAllIcon;queryChange;valueChange;selectAllChange;dropdownShown;size="base";prefix;label;helper;required=true;error;disabled=false;showAddItem=false;addItemText="Add item";add;emptyStateText="No items available";get _el(){return i(this)}_showDropdown=false;_selectedItem=null;_allSelected=false;_amountHidden=0;_internals;_inputRef;autocompleteInputRef;_multiContainerRef;_resizeObserver;_resizeDebounceTimer;_checkSelectedItemsTimeout;get _items(){return this._getParsedItems()}get _displayValue(){const t=s("div",{class:l({variant:"placeholder"})},this.placeholder);if(!this._selectedItem){return t}if(this.multi){if(this._selectedItem?.length===0){return t}return s("div",{class:o(),ref:t=>this._multiContainerRef=t},this._selectedItem.map((t=>s("div",{class:h(),onClick:()=>this._selectValue(t)},t[this.selectionDisplayKey??this.displayKey],s("p-icon",{class:"text-xs text-supportive-lilac group-hover/item:text-supportive-lilac-800",variant:"negative"})))),s("div",{class:"extra pointer-events-none hidden text-sm text-black-teal-100"},"+",this._amountHidden))}return this._getDisplay(this._selectedItem,true)}get _identifierKey(){return this.identifierKey??this.valueKey??"value"}formResetCallback(){this._selectValue(null)}formDisabledCallback(t){if(!this._internals.form){return}this.disabled=t}componentDidLoad(){if(!this.valueKey&&!this.identifierKey){throw new Error("You must provide a valueKey or identifierKey")}if(this.multi){this._setMultiContainerMaxWidth();this._resizeObserver=new ResizeObserver((()=>{if(this._resizeDebounceTimer){clearTimeout(this._resizeDebounceTimer);this._resizeDebounceTimer=null}this._resizeDebounceTimer=setTimeout((()=>{this._setMultiContainerMaxWidth();this._setCheckSelectedItemsTimeout()}),200)}));this._resizeObserver.observe(this._el)}if(this.value){this._valueChange();return}this.itemChanges()}componentDidRender(){if(this.multi){this._setMultiContainerMaxWidth()}}disconnectedCallback(){if(this.multi){this._resizeObserver.disconnect()}}render(){let t=this.icon;if(this._selectedItem&&!this.avatarKey&&!!this.iconKey&&this._selectedItem?.[this.iconKey]&&!this.showIconOnSelectedItem){t=this._selectedItem[this.iconKey]}if(this.avatarKey&&this._selectedItem?.[this.avatarKey]){t=null}if(this.error?.length){t="warning"}return s("p-dropdown",{key:"6f6f679ef40aa9f1d76cb918f5d58151514252cc",disableTriggerClick:true,calculateWidth:true,insideClick:true,scrollable:this.enableAutocomplete?"large":true,show:this._showDropdown,onIsOpen:t=>this._onDropdownOpen(t),usePortal:this.usePortal,strategy:this.strategy},s("p-field-container",{key:"1649d36d0b4264c5beba02602312390e16ba04ab",slot:"trigger",variant:"write",prefix:this.prefix,label:this.label,helper:this.helper,required:this.required,error:this.error,forceShowTooltip:!!this.error?.length&&!this._showDropdown},s("p-button",{key:"f1af3b2a5573ff53ba742dfe4d5ad84ed24ca26c",class:"w-full",slot:"content",variant:"secondary",size:this.size,chevron:this.showChevron?this._showDropdown?"up":"down":false,disabled:this.disabled,active:this._showDropdown,error:!!this.error?.length,icon:t,onClick:t=>this._onClick(t)},s("div",{key:"4d767ee052e81fdc1240d01c09fa822b3930e04c",class:"relative min-w-0 flex-1",ref:t=>this._inputRef=t},this._displayValue))),this.loading?this._getLoadingItems():this._getItems(),this.showAddItem&&this._getAddItem())}documentClickHandler(t){if(!this._showDropdown||r(t,this._el)){return}this._showDropdown=false}_valueChange(){setTimeout((()=>{this._preselectItem();this._setCheckSelectedItemsTimeout()}))}itemChanges(){setTimeout((()=>this._preselectItem()))}_showDropdownChanges(){this.dropdownShown.emit({value:this._showDropdown,query:this.query})}multiChanges(){if(this._selectedItem&&!Array.isArray(this._selectedItem)){this._selectedItem=[]}}_preselectItem(){let t=typeof this.value==="string"&&this.multi?JSON.parse(this.value):this.value;if(this.multi){if(!Array.isArray(t)){this.value=[];this.valueChange.emit(this.value);return}this.value=t;if(!t.length){this._selectedItem=[];return}this._selectedItem=!!this.valueKey&&this.valueKey!=="false"?this._items.filter((e=>t.includes(e?.[this.valueKey]))):[...t];return}if(!this._selectedItem&&!t&&this.autoSelectFirst){t=this._items[0]}const e=typeof t==="object"&&t!==null?t[this._identifierKey]:t;const i=typeof e==="string"||typeof e==="number"?e:JSON.stringify(e);const s=this._selectedItem?this._selectedItem?.[this._identifierKey]:null;const r=typeof s==="string"||typeof s==="number"?s:JSON.stringify(s);if(this._selectedItem&&r===i){return}if(!this._items?.length&&t){this._selectValue(t,false);return}const a=this._getParsedItems(false);const n=a.find((t=>{const e=t?.[this._identifierKey];const s=typeof e==="string"||typeof e==="number"?e:JSON.stringify(e);return s===i}));this._selectValue(!!n?n:t,false)}_selectValue(t,e=true){let i=!!this.valueKey&&this.valueKey!=="false"&&t!==null?t?.[this.valueKey]:t;if(this.multi){if(!this._selectedItem||!Array.isArray(this._selectedItem)){this._selectedItem=[]}if(!this.value||!Array.isArray(this.value)){this.value=[]}const e=[...this._selectedItem];const s=[...this.value];const r=e.findIndex((e=>e[this._identifierKey]===t[this._identifierKey]));if(r===-1){e.push(t);s.push(i)}else{e.splice(r,1);s.splice(r,1)}this._selectedItem=e;this.value=s;this.valueChange.emit(s);return}this._selectedItem=t;this.value=i;this.valueChange.emit(i);this._onBlur(e)}_onClick(t){const e=t?.composedPath();for(const t of e){if(t.nodeName.toLowerCase()==="p-button"){break}if(t.classList.contains("item")){return}}this._showDropdown=!this._showDropdown}_onBlur(t=false){if(this.enableAutocomplete&&!t){return}this._showDropdown=false}_onAutoComplete(t){if(!this.enableAutocomplete){return}this._showDropdown=true;this.query=t.detail;this.queryChange.emit(t.detail)}_checkvalue(t,e){return e?.[t]?.toString()?.toLowerCase().indexOf(this.query?.toLowerCase())>=0}_getItems(){let t=this._items.map((t=>s("p-dropdown-menu-item",{useContainer:false,onClick:()=>this._selectValue(t),active:this.multi&&!!this._selectedItem&&Array.isArray(this._selectedItem)?this._selectedItem.findIndex((e=>e[this._identifierKey]===t[this._identifierKey]))>=0:t[this._identifierKey]===this._selectedItem?.[this._identifierKey],checkbox:this.multi?true:false,slot:"items"},this._getDisplay(t))));if(!this._items.length){t=[s("p",{class:"w-full p-2 text-center text-sm text-black-teal-400",slot:"items"},this.emptyStateText)]}if(this.enableSelectAll&&this._items.length){t.unshift(s("p-dropdown-menu-item",{slot:"items",useContainer:false,checkbox:true,onClick:()=>this._selectAllChange(),active:this._allSelected},this.selectAllIcon?.length?s("span",{class:"flex items-center gap-2"},s("div",{class:"flex w-6 justify-center text-lg"},s("p-icon",{variant:this.selectAllIcon}))," ",this.selectAllText):this.selectAllText))}if(this.enableAutocomplete){t.unshift(this._getAutoCompleteItem())}return t}_getAddItem(){return s("p-dropdown-menu-item",{onClick:()=>this.add.emit(),useContainer:false,slot:"items"},s("span",{class:"flex items-center gap-1 font-semibold text-teal-800"},this.addItemText,s("p-icon",{variant:"plus"})))}_getLoadingItems(){const t=[0,0,0].map((()=>s("p-dropdown-menu-item",{enableHover:false,slot:"items"},s("p-loader",{variant:"ghost",class:"h-6 w-full rounded"}))));if(this.enableAutocomplete){t.unshift(this._getAutoCompleteItem())}return t}_getAutoCompleteItem(){return s("div",{class:"sticky top-0 mb-3 h-8",slot:"items"},s("p-field",{class:"block",placeholder:this.autocompletePlaceholder,onValueChange:t=>this._onAutoComplete(t),onInputRefChange:t=>this.autocompleteInputRef=t.detail,value:this.query}))}_setMultiContainerMaxWidth(){if(!this._inputRef||!this._multiContainerRef){return}const t=this._inputRef.clientWidth-16;this._multiContainerRef.style.maxWidth=`${t>=16?t:16}px`}_setCheckSelectedItemsTimeout(){if(this._checkSelectedItemsTimeout){clearTimeout(this._checkSelectedItemsTimeout)}this._checkSelectedItemsTimeout=setTimeout((()=>this._checkSelectedItems()),50)}_checkSelectedItems(){if(!this._multiContainerRef){return}const t=this._multiContainerRef.getBoundingClientRect();const e=this._multiContainerRef.querySelectorAll(".item");let i=0;for(const s of e){s.classList.remove("hidden");s.classList.add("flex");const e=s.getBoundingClientRect();if(e.right>t.right){s.classList.remove("flex");s.classList.add("hidden");i++;continue}}this._amountHidden=i;const s=this._multiContainerRef.querySelector(".extra");if(!s){return}if(!s.classList.contains("hidden")){s.classList.add("hidden")}if(i>0){s.classList.remove("hidden")}}_onDropdownOpen(t){if(!t.detail||!this.autocompleteInputRef){return}this.autocompleteInputRef.focus()}_selectAllChange(){this._allSelected=!this._allSelected;this.selectAllChange.emit(this._allSelected)}_getDisplay(t,e=false){let i=s("div",{class:l({variant:"default"})},t[e?this.selectionDisplayKey??this.displayKey:this.displayKey]);if(this.avatarKey){i=s("span",{class:"flex items-center gap-2"},s("p-avatar",{size:"sm",src:t[this.avatarKey],letters:t[this.avatarLettersKey]}),s("div",{class:l({variant:"default"})},t[this.dropdownDisplayKey??this.displayKey]))}if(this.iconKey&&(!e||this.showIconOnSelectedItem)){i=s("span",{class:"flex items-center gap-2"},s("p-icon",{class:"black-teal-300",variant:t[this.iconKey]}),s("div",{class:l({variant:"default"})},t[this.dropdownDisplayKey??this.displayKey]))}if((!e||this.applyClassOnSelectedItem)&&!!t?.class?.length){return s("div",{class:t.class},i)}return i}_getParsedItems(t=true){if(!this.items||this.loading){return[]}let e=typeof this.items==="string"?JSON.parse(this.items):this.items;if(typeof e?.[0]==="string"){this.displayKey="text";this.valueKey="value";e=e.map((t=>({value:t,text:t})))}if(this.query?.length&&!this.asyncFilter){e=e.filter((t=>{if(this.queryKey){return this._checkvalue(this.queryKey,t)}return this._checkvalue(this._identifierKey,t)||this._checkvalue(this.displayKey,t)}))}if(!t){return e}return e?.slice(0,this.maxDisplayedItems)}static get formAssociated(){return true}static get watchers(){return{value:["_valueChange"],items:["itemChanges"],_showDropdown:["_showDropdownChanges"],multi:["multiChanges"]}}};m.style=n;export{m as p_select};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,g as i,h as s}from"./p-DhGo7hbh.js";import{a as r}from"./p-BFSNj6hu.js";import{c as a}from"./p-CBWjHURv.js";import"./p-ChV9xqsO.js";const n="*{box-sizing:border-box}.pointer-events-none{pointer-events:none!important}.pointer-events-auto{pointer-events:auto!important}.static{position:static!important}.absolute{position:absolute!important}.relative{position:relative!important}.sticky{position:sticky!important}.top-0{top:0!important}.mb-3{margin-bottom:.75rem!important}.block{display:block!important}.flex{display:flex!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.h-\\[1\\.625rem\\]{height:1.625rem!important}.h-full{height:100%!important}.w-6{width:1.5rem!important}.w-full{width:100%!important}.min-w-0{min-width:0!important}.flex-1{flex:1 1 0%!important}.cursor-pointer{cursor:pointer!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.whitespace-nowrap{white-space:nowrap!important}.rounded{border-radius:.25rem!important}.rounded-lg{border-radius:.5rem!important}.bg-supportive-lilac-100{--tw-bg-opacity:1!important;background-color:rgb(246 239 255/var(--tw-bg-opacity,1))!important}.p-2{padding:.5rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-center{text-align:center!important}.text-start{text-align:start!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-semibold{font-weight:600!important}.text-black-teal-100{--tw-text-opacity:1!important;color:rgb(205 212 211/var(--tw-text-opacity,1))!important}.text-black-teal-400{--tw-text-opacity:1!important;color:rgb(53 85 80/var(--tw-text-opacity,1))!important}.text-supportive-lilac{--tw-text-opacity:1!important;color:rgb(209 174 255/var(--tw-text-opacity,1))!important}.text-teal-800{--tw-text-opacity:1!important;color:rgb(2 102 92/var(--tw-text-opacity,1))!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}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:85.375rem){.container{max-width:85.375rem}}@media (min-width:90rem){.container{max-width:90rem}}@media (min-width:96rem){.container{max-width:96rem}}@media (min-width:105rem){.container{max-width:105rem}}@media (min-width:120rem){.container{max-width:120rem}}@media (min-width:160rem){.container{max-width:160rem}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.group\\/item:hover .group-hover\\/item\\:text-supportive-lilac-800{--tw-text-opacity:1!important;color:rgb(189 140 255/var(--tw-text-opacity,1))!important}";const o=a(["flex items-center gap-2","flex-1 min-w-0 h-full","pointer-events-none overflow-hidden"]);const h=a(["item group/item","pointer-events-auto cursor-pointer","flex h-[1.625rem] items-center gap-2","h-[1.625rem] px-2","text-sm font-semibold whitespace-nowrap","rounded-lg","bg-supportive-lilac-100"]);const l=a("block w-full overflow-hidden text-ellipsis whitespace-nowrap text-start",{variants:{variant:{placeholder:"text-black-teal-400",default:null}}});const m=class{constructor(i){t(this,i);this.queryChange=e(this,"queryChange",3);this.valueChange=e(this,"valueChange",3);this.selectAllChange=e(this,"selectAllChange",3);this.dropdownShown=e(this,"dropdownShown",3);this.add=e(this,"add",3);if(i.$hostElement$["s-ei"]){this._internals=i.$hostElement$["s-ei"]}else{this._internals=i.$hostElement$.attachInternals();i.$hostElement$["s-ei"]=this._internals}}items;multi;usePortal=false;strategy="absolute";icon;query;placeholder;autocompletePlaceholder="Search...";value;displayKey="text";dropdownDisplayKey;selectionDisplayKey;valueKey;avatarKey;iconKey;showIconOnSelectedItem;classKey="class";applyClassOnSelectedItem;avatarLettersKey;identifierKey;queryKey;autoSelectFirst=true;showChevron=true;maxDisplayedItems=10;enableAutocomplete=true;asyncFilter=false;loading=false;enableSelectAll=false;selectAllText="Select all";selectAllIcon;queryChange;valueChange;selectAllChange;dropdownShown;size="base";prefix;label;helper;required=true;error;disabled=false;showAddItem=false;addItemText="Add item";add;emptyStateText="No items available";get _el(){return i(this)}_showDropdown=false;_selectedItem=null;_allSelected=false;_amountHidden=0;_internals;_inputRef;autocompleteInputRef;_multiContainerRef;_resizeObserver;_resizeDebounceTimer;_checkSelectedItemsTimeout;get _items(){return this._getParsedItems()}get _displayValue(){const t=s("div",{class:l({variant:"placeholder"})},this.placeholder);if(!this._selectedItem){return t}if(this.multi){if(this._selectedItem?.length===0){return t}return s("div",{class:o(),ref:t=>this._multiContainerRef=t},this._selectedItem.map((t=>s("div",{class:h(),onClick:()=>this._selectValue(t)},t[this.selectionDisplayKey??this.displayKey],s("p-icon",{class:"text-xs text-supportive-lilac group-hover/item:text-supportive-lilac-800",variant:"negative"})))),s("div",{class:"extra pointer-events-none hidden text-sm text-black-teal-100"},"+",this._amountHidden))}return this._getDisplay(this._selectedItem,true)}get _identifierKey(){return this.identifierKey??this.valueKey??"value"}formResetCallback(){this._selectValue(null)}formDisabledCallback(t){if(!this._internals.form){return}this.disabled=t}componentDidLoad(){if(!this.valueKey&&!this.identifierKey){throw new Error("You must provide a valueKey or identifierKey")}if(this.multi){this._setMultiContainerMaxWidth();this._resizeObserver=new ResizeObserver((()=>{if(this._resizeDebounceTimer){clearTimeout(this._resizeDebounceTimer);this._resizeDebounceTimer=null}this._resizeDebounceTimer=setTimeout((()=>{this._setMultiContainerMaxWidth();this._setCheckSelectedItemsTimeout()}),200)}));this._resizeObserver.observe(this._el)}if(this.value){this._valueChange();return}this.itemChanges()}componentDidRender(){if(this.multi){this._setMultiContainerMaxWidth()}}disconnectedCallback(){if(this.multi){this._resizeObserver.disconnect()}}render(){let t=this.icon;if(this._selectedItem&&!this.avatarKey&&!!this.iconKey&&this._selectedItem?.[this.iconKey]&&!this.showIconOnSelectedItem){t=this._selectedItem[this.iconKey]}if(this.avatarKey&&this._selectedItem?.[this.avatarKey]){t=null}if(this.error?.length){t="warning"}return s("p-dropdown",{key:"1d9a6331dd586fbaae253835ed53707dc4de4b8d",disableTriggerClick:true,calculateWidth:true,insideClick:true,scrollable:this.enableAutocomplete?"large":true,show:this._showDropdown,onIsOpen:t=>this._onDropdownOpen(t),usePortal:this.usePortal,strategy:this.strategy},s("p-field-container",{key:"80f65e4b733f4586e205e3812064dd53371c5c82",slot:"trigger",variant:"write",prefix:this.prefix,label:this.label,helper:this.helper,required:this.required,error:this.error,forceShowTooltip:!!this.error?.length&&!this._showDropdown},s("p-button",{key:"9fe31f3469128492ee3cf7cccd4f254b91a023de",class:"w-full",slot:"content",variant:"secondary",size:this.size,chevron:this.showChevron?this._showDropdown?"up":"down":false,disabled:this.disabled,active:this._showDropdown,error:!!this.error?.length,icon:t,onClick:t=>this._onClick(t)},s("div",{key:"7ae2af505698b7fd160e2df3c689e6a0e0f110a3",class:"relative min-w-0 flex-1",ref:t=>this._inputRef=t},this._displayValue))),this.loading?this._getLoadingItems():this._getItems(),this.showAddItem&&this._getAddItem())}documentClickHandler(t){if(!this._showDropdown||r(t,this._el)){return}this._showDropdown=false}_valueChange(){setTimeout((()=>{this._preselectItem();this._setCheckSelectedItemsTimeout()}))}itemChanges(){setTimeout((()=>this._preselectItem()))}_showDropdownChanges(){this.dropdownShown.emit({value:this._showDropdown,query:this.query})}multiChanges(){if(this._selectedItem&&!Array.isArray(this._selectedItem)){this._selectedItem=[]}}_preselectItem(){let t=typeof this.value==="string"&&this.multi?JSON.parse(this.value):this.value;if(this.multi){if(!Array.isArray(t)){this.value=[];this.valueChange.emit(this.value);return}this.value=t;if(!t.length){this._selectedItem=[];return}this._selectedItem=!!this.valueKey&&this.valueKey!=="false"?this._items.filter((e=>t.includes(e?.[this.valueKey]))):[...t];return}if(!this._selectedItem&&!t&&this.autoSelectFirst){t=this._items[0]}const e=typeof t==="object"&&t!==null?t[this._identifierKey]:t;const i=typeof e==="string"||typeof e==="number"?e:JSON.stringify(e);const s=this._selectedItem?this._selectedItem?.[this._identifierKey]:null;const r=typeof s==="string"||typeof s==="number"?s:JSON.stringify(s);if(this._selectedItem&&r===i){return}if(!this._items?.length&&t){this._selectValue(t,false);return}const a=this._getParsedItems(false);const n=a.find((t=>{const e=t?.[this._identifierKey];const s=typeof e==="string"||typeof e==="number"?e:JSON.stringify(e);return s===i}));this._selectValue(!!n?n:t,false)}_selectValue(t,e=true){let i=!!this.valueKey&&this.valueKey!=="false"&&t!==null?t?.[this.valueKey]:t;if(this.multi){if(!this._selectedItem||!Array.isArray(this._selectedItem)){this._selectedItem=[]}if(!this.value||!Array.isArray(this.value)){this.value=[]}const e=[...this._selectedItem];const s=[...this.value];const r=e.findIndex((e=>e[this._identifierKey]===t[this._identifierKey]));if(r===-1){e.push(t);s.push(i)}else{e.splice(r,1);s.splice(r,1)}this._selectedItem=e;this.value=s;this.valueChange.emit(s);return}this._selectedItem=t;this.value=i;this.valueChange.emit(i);this._onBlur(e)}_onClick(t){const e=t?.composedPath();for(const t of e){if(t.nodeName.toLowerCase()==="p-button"){break}if(t.classList.contains("item")){return}}this._showDropdown=!this._showDropdown}_onBlur(t=false){if(this.enableAutocomplete&&!t){return}this._showDropdown=false}_onAutoComplete(t){if(!this.enableAutocomplete){return}this._showDropdown=true;this.query=t.detail;this.queryChange.emit(t.detail)}_checkvalue(t,e){return e?.[t]?.toString()?.toLowerCase().indexOf(this.query?.toLowerCase())>=0}_getItems(){let t=this._items.map((t=>s("p-dropdown-menu-item",{useContainer:false,onClick:()=>this._selectValue(t),active:this.multi&&!!this._selectedItem&&Array.isArray(this._selectedItem)?this._selectedItem.findIndex((e=>e[this._identifierKey]===t[this._identifierKey]))>=0:t[this._identifierKey]===this._selectedItem?.[this._identifierKey],checkbox:this.multi?true:false,slot:"items"},this._getDisplay(t))));if(!this._items.length){t=[s("p",{class:"w-full p-2 text-center text-sm text-black-teal-400",slot:"items"},this.emptyStateText)]}if(this.enableSelectAll&&this._items.length){t.unshift(s("p-dropdown-menu-item",{slot:"items",useContainer:false,checkbox:true,onClick:()=>this._selectAllChange(),active:this._allSelected},this.selectAllIcon?.length?s("span",{class:"flex items-center gap-2"},s("div",{class:"flex w-6 justify-center text-lg"},s("p-icon",{variant:this.selectAllIcon}))," ",this.selectAllText):this.selectAllText))}if(this.enableAutocomplete){t.unshift(this._getAutoCompleteItem())}return t}_getAddItem(){return s("p-dropdown-menu-item",{onClick:()=>this.add.emit(),useContainer:false,slot:"items"},s("span",{class:"flex items-center gap-1 font-semibold text-teal-800"},this.addItemText,s("p-icon",{variant:"plus"})))}_getLoadingItems(){const t=[0,0,0].map((()=>s("p-dropdown-menu-item",{enableHover:false,slot:"items"},s("p-loader",{variant:"ghost",class:"h-6 w-full rounded"}))));if(this.enableAutocomplete){t.unshift(this._getAutoCompleteItem())}return t}_getAutoCompleteItem(){return s("div",{class:"sticky top-0 mb-3 h-8",slot:"items"},s("p-field",{class:"block",placeholder:this.autocompletePlaceholder,onValueChange:t=>this._onAutoComplete(t),onInputRefChange:t=>this.autocompleteInputRef=t.detail,value:this.query}))}_setMultiContainerMaxWidth(){if(!this._inputRef||!this._multiContainerRef){return}const t=this._inputRef.clientWidth-16;this._multiContainerRef.style.maxWidth=`${t>=16?t:16}px`}_setCheckSelectedItemsTimeout(){if(this._checkSelectedItemsTimeout){clearTimeout(this._checkSelectedItemsTimeout)}this._checkSelectedItemsTimeout=setTimeout((()=>this._checkSelectedItems()),50)}_checkSelectedItems(){if(!this._multiContainerRef){return}const t=this._multiContainerRef.getBoundingClientRect();const e=this._multiContainerRef.querySelectorAll(".item");let i=0;for(const s of e){s.classList.remove("hidden");s.classList.add("flex");const e=s.getBoundingClientRect();if(e.right>t.right){s.classList.remove("flex");s.classList.add("hidden");i++;continue}}this._amountHidden=i;const s=this._multiContainerRef.querySelector(".extra");if(!s){return}if(!s.classList.contains("hidden")){s.classList.add("hidden")}if(i>0){s.classList.remove("hidden")}}_onDropdownOpen(t){if(!t.detail||!this.autocompleteInputRef){return}this.autocompleteInputRef.focus()}_selectAllChange(){this._allSelected=!this._allSelected;this.selectAllChange.emit(this._allSelected)}_getDisplay(t,e=false){let i=s("div",{class:l({variant:"default"})},t[e?this.selectionDisplayKey??this.displayKey:this.displayKey]);if(this.avatarKey){i=s("span",{class:"flex items-center gap-2"},s("p-avatar",{size:"sm",src:t[this.avatarKey],letters:t[this.avatarLettersKey]}),s("div",{class:l({variant:"default"})},t[this.dropdownDisplayKey??this.displayKey]))}if(this.iconKey&&(!e||this.showIconOnSelectedItem)){i=s("span",{class:"flex items-center gap-2"},s("p-icon",{class:"black-teal-300",variant:t[this.iconKey]}),s("div",{class:l({variant:"default"})},t[this.dropdownDisplayKey??this.displayKey]))}if((!e||this.applyClassOnSelectedItem)&&!!t?.class?.length){return s("div",{class:t.class},i)}return i}_getParsedItems(t=true){if(!this.items||this.loading){return[]}let e=typeof this.items==="string"?JSON.parse(this.items):this.items;if(typeof e?.[0]==="string"){this.displayKey="text";this.valueKey="value";e=e.map((t=>({value:t,text:t})))}if(this.query?.length&&!this.asyncFilter){e=e.filter((t=>{if(this.queryKey){return this._checkvalue(this.queryKey,t)}return this._checkvalue(this._identifierKey,t)||this._checkvalue(this.displayKey,t)}))}if(!t){return e}return e?.slice(0,this.maxDisplayedItems)}static get formAssociated(){return true}static get watchers(){return{value:["_valueChange"],items:["itemChanges"],_showDropdown:["_showDropdownChanges"],multi:["multiChanges"]}}};m.style=n;export{m as p_select};
|
|
2
|
+
//# sourceMappingURL=p-dc5fab19.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,F as a}from"./p-DhGo7hbh.js";import{c as r}from"./p-CBWjHURv.js";import{h as o,f as s}from"./p-B3sNjfzc.js";import{c as n}from"./p-CT54OXR2.js";import"./p-ChV9xqsO.js";const d=".block{display:block!important}*{box-sizing:border-box}:host{display:block;width:100%}.static{position:static!important}.flex{display:flex!important}.hidden{display:none!important}.h-8{height:2rem!important}.w-full{width:100%!important}.min-w-0{min-width:0!important}.flex-1{flex:1 1 0%!important}.cursor-pointer{cursor:pointer!important}.items-start{align-items:flex-start!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.gap-2{gap:.5rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.whitespace-nowrap{white-space:nowrap!important}.rounded-lg{border-radius:.5rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-black-teal-100{--tw-border-opacity:1!important;border-color:rgb(205 212 211/var(--tw-border-opacity,1))!important}.border-negative-red{--tw-border-opacity:1!important;border-color:rgb(230 30 30/var(--tw-border-opacity,1))!important}.bg-white-600{--tw-bg-opacity:1!important;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-black-teal-200{--tw-text-opacity:1!important;color:rgb(154 170 167/var(--tw-text-opacity,1))!important}.text-black-teal-300{--tw-text-opacity:1!important;color:rgb(104 127 124/var(--tw-text-opacity,1))!important}.text-negative-red{--tw-text-opacity:1!important;color:rgb(230 30 30/var(--tw-text-opacity,1))!important}.empty\\:hidden:empty{display:none!important}.peer:empty~.peer-empty\\:block{display:block!important}@media (min-width:64rem){.desktop-xs\\:hidden{display:none!important}}";const l=r(["flex flex-1 items-center justify-start gap-2","h-8 min-w-0 px-2 rounded-lg","border border-solid bg-white-600"],{variants:{click:{false:null,true:"cursor-pointer"},error:{false:"bg-white-600 border-black-teal-100 text-black-teal-200",true:"border-negative-red"}}});const c=class{constructor(i){t(this,i);this.upload=e(this,"upload",3);this.download=e(this,"download",3);this.delete=e(this,"delete",3)}enableCameraOnMobile=false;value;fileId;accept=null;label;helper;required=true;mode="read";placeholder="Upload a file...";cameraTooltip="Camera";downloadTooltip="Download";uploadTooltip="Upload";deleteTooltip="Delete";loading=false;error;upload;download;delete;_fileRef;_cameraFileRef;render(){let t=i("p-icon",{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,h as i,F as a}from"./p-DhGo7hbh.js";import{c as r}from"./p-CBWjHURv.js";import{h as o,f as s}from"./p-B3sNjfzc.js";import{c as n}from"./p-CT54OXR2.js";import"./p-ChV9xqsO.js";const d=".block{display:block!important}*{box-sizing:border-box}:host{display:block;width:100%}.static{position:static!important}.flex{display:flex!important}.hidden{display:none!important}.h-8{height:2rem!important}.w-full{width:100%!important}.min-w-0{min-width:0!important}.flex-1{flex:1 1 0%!important}.cursor-pointer{cursor:pointer!important}.items-start{align-items:flex-start!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.gap-2{gap:.5rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.whitespace-nowrap{white-space:nowrap!important}.rounded-lg{border-radius:.5rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-black-teal-100{--tw-border-opacity:1!important;border-color:rgb(205 212 211/var(--tw-border-opacity,1))!important}.border-negative-red{--tw-border-opacity:1!important;border-color:rgb(230 30 30/var(--tw-border-opacity,1))!important}.bg-white-600{--tw-bg-opacity:1!important;background-color:rgb(250 250 250/var(--tw-bg-opacity,1))!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-black-teal-200{--tw-text-opacity:1!important;color:rgb(154 170 167/var(--tw-text-opacity,1))!important}.text-black-teal-300{--tw-text-opacity:1!important;color:rgb(104 127 124/var(--tw-text-opacity,1))!important}.text-negative-red{--tw-text-opacity:1!important;color:rgb(230 30 30/var(--tw-text-opacity,1))!important}.empty\\:hidden:empty{display:none!important}.peer:empty~.peer-empty\\:block{display:block!important}@media (min-width:64rem){.desktop-xs\\:hidden{display:none!important}}";const l=r(["flex flex-1 items-center justify-start gap-2","h-8 min-w-0 px-2 rounded-lg","border border-solid bg-white-600"],{variants:{click:{false:null,true:"cursor-pointer"},error:{false:"bg-white-600 border-black-teal-100 text-black-teal-200",true:"border-negative-red"}}});const c=class{constructor(i){t(this,i);this.upload=e(this,"upload",3);this.download=e(this,"download",3);this.delete=e(this,"delete",3)}enableCameraOnMobile=false;value;fileId;accept=null;label;helper;required=true;mode="read";placeholder="Upload a file...";cameraTooltip="Camera";downloadTooltip="Download";uploadTooltip="Upload";deleteTooltip="Delete";loading=false;error;upload;download;delete;_fileRef;_cameraFileRef;render(){let t=i("p-icon",{key:"3aa615acdf7a176a36ffaa6f9a4deaa0e6f261a0",class:"text-black-teal-300",variant:"attachment"});if(this.error){t=i("p-icon",{key:"523b6b5529ee861d4f3ce6c2cc6b39f7af630153",variant:"warning",class:"text-negative-red"})}const e=o();const r="min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-sm";return i(a,{key:"8075a826a3786e65fc775758192c08907948274b"},i("p-field-container",{key:"57591d7c6bc5d0a5d08b98cc6777f6f9a8f231f1",variant:"write",label:this.label,helper:this.helper,error:this.error,required:this.required,forceShowTooltip:!!this.error?.length},i("div",{key:"dede0c04052a74d23337e7221842b17f4584b5e8",slot:"content",class:"flex w-full items-start gap-2"},i("div",{key:"b07b0888ba35b82c7d2dc01d76081589fcd87e04",class:l({click:this.mode==="write"&&!this.value?.length,error:!!this.error?.length}),onClick:()=>this._uploadClick()},t,i("span",{key:"dfb94a5995b6ff0e264c8e737d1f80be58c0014f",class:n(r,"peer empty:hidden")},this.value),i("span",{key:"ab71b435157c2f8f51762e6563e43350c004ea68",class:n(r,"hidden peer-empty:block")},this.placeholder)),i("p-tooltip",{key:"0f2702bd954fc447883c50b094568bc6cbb3f759",content:this.mode==="read"?this.downloadTooltip:this.value?.length?this.deleteTooltip:this.uploadTooltip},i("p-button",{key:"9796aaaf9af1edde4f5529c69c688a83358e6f87",slot:"trigger",variant:"secondary",iconOnly:true,icon:this.mode==="read"?"download":this.value?.length?"trash":"upload",disabled:this.loading,loading:this.loading,onOnClick:()=>this.mode==="write"&&!this.value?.length?this._uploadClick():(this.mode==="read"?this.download:this.delete).emit()})),this.enableCameraOnMobile&&this.mode==="write"&&e&&!this.value?.length&&i("p-tooltip",{key:"77831721f97c38a523478d2edcfc59825b5cd11e",content:this.cameraTooltip,class:"desktop-xs:hidden"},i("p-button",{key:"101814ad9a95b5ada06d1d8677654d399f0cfa12",slot:"trigger",variant:"secondary",iconOnly:true,icon:"camera",onOnClick:()=>this._cameraClick()})))),i("input",{key:"8432cb3a5eca74c374af2bf641df89982f211cd6",class:"hidden",type:"file",accept:Array.isArray(this.accept)?this.accept?.join(","):this.accept,ref:t=>this._fileRef=t,onChange:t=>this._onFileChange(t)}),i("input",{key:"f4cbdcd1b141d8a0b032f4a8e2966fdfd84f14e0",class:"hidden",type:"file",accept:"image/*",capture:"true",ref:t=>this._cameraFileRef=t,onChange:t=>this._onFileChange(t)}))}_uploadClick(){if(!this._fileRef||this.mode!=="write"||this.value?.length){return}this._fileRef.click()}_cameraClick(){if(!this.enableCameraOnMobile||s()){return}if(!this._cameraFileRef||this.mode!=="write"){return}this._cameraFileRef?.click()}_onFileChange(t){const e=t.target;const i=e.files?.[0];if(i){this.loading=true;const t=new FileReader;t.onload=t=>this._onLoad(i,t?.currentTarget?.result);t.readAsDataURL(i)}}_onLoad(t,e){this.upload.emit({fileId:this.fileId,result:e,file:t});if(this._fileRef){this._fileRef.value=""}if(this._cameraFileRef){this._cameraFileRef.value=""}this.loading=false}};c.style=d;export{c as p_attachment};
|
|
2
|
+
//# sourceMappingURL=p-e596d429.entry.js.map
|