@paperless/core 3.15.8 → 3.17.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.
Files changed (176) hide show
  1. package/dist/build/p-0d03e46c.js +1 -0
  2. package/dist/build/{p-994c1ad5.entry.js → p-186454b1.entry.js} +1 -1
  3. package/dist/build/{p-5e83a91b.entry.js → p-282b2776.entry.js} +1 -1
  4. package/dist/build/{p-b8caedf6.entry.js → p-2e850d9d.entry.js} +1 -1
  5. package/dist/build/{p-501f2f7c.entry.js → p-3376af98.entry.js} +1 -1
  6. package/dist/{paperless/p-36ba5439.entry.js → build/p-337de35a.entry.js} +1 -1
  7. package/dist/build/{p-022c5075.entry.js → p-3557f8b1.entry.js} +1 -1
  8. package/dist/{paperless/p-ce15940f.entry.js → build/p-41326183.entry.js} +1 -1
  9. package/dist/build/p-418e1cfb.entry.js +1 -0
  10. package/dist/build/{p-8e2a982f.entry.js → p-6dff428b.entry.js} +1 -1
  11. package/dist/build/{p-e65ed748.entry.js → p-71ac632f.entry.js} +1 -1
  12. package/dist/build/p-7fb843e7.entry.js +1 -0
  13. package/dist/build/{p-aca23818.entry.js → p-883569e8.entry.js} +1 -1
  14. package/dist/build/p-887c9c21.entry.js +1 -0
  15. package/dist/{paperless/p-a2c812fa.entry.js → build/p-88fd696b.entry.js} +1 -1
  16. package/dist/build/{p-81f2e6ef.entry.js → p-9232a310.entry.js} +1 -1
  17. package/dist/build/{p-4cd8035a.entry.js → p-9a9f0cd0.entry.js} +1 -1
  18. package/dist/{paperless/p-44f0d99e.entry.js → build/p-9c440af8.entry.js} +1 -1
  19. package/dist/build/{p-83113087.entry.js → p-af1a320c.entry.js} +1 -1
  20. package/dist/{paperless/p-a0584184.entry.js → build/p-da849804.entry.js} +1 -1
  21. package/dist/build/{p-e7b589a3.entry.js → p-e13fb7aa.entry.js} +1 -1
  22. package/dist/build/{p-ee723380.entry.js → p-fae76adf.entry.js} +1 -1
  23. package/dist/build/paperless.esm.js +1 -1
  24. package/dist/cjs/index-BGtpSJv_.js +4 -4
  25. package/dist/cjs/loader.cjs.js +1 -1
  26. package/dist/cjs/p-accordion.cjs.entry.js +14 -2
  27. package/dist/cjs/p-attachment.cjs.entry.js +8 -8
  28. package/dist/cjs/p-button-group.cjs.entry.js +1 -1
  29. package/dist/cjs/p-calendar.cjs.entry.js +1 -1
  30. package/dist/cjs/p-checkbox_3.cjs.entry.js +2 -2
  31. package/dist/cjs/p-content-slider.cjs.entry.js +2 -2
  32. package/dist/cjs/p-cropper.cjs.entry.js +1 -1
  33. package/dist/cjs/p-datepicker.cjs.entry.js +2 -2
  34. package/dist/cjs/p-empty-state_8.cjs.entry.js +8 -8
  35. package/dist/cjs/p-field_3.cjs.entry.js +4 -4
  36. package/dist/cjs/p-label.cjs.entry.js +3 -3
  37. package/dist/cjs/p-listing.cjs.entry.js +2 -2
  38. package/dist/cjs/p-navbar.cjs.entry.js +1 -1
  39. package/dist/cjs/p-navigation-item.cjs.entry.js +3 -3
  40. package/dist/cjs/p-navigation-section.cjs.entry.js +1 -1
  41. package/dist/cjs/p-pagination_3.cjs.entry.js +3 -3
  42. package/dist/cjs/p-profile.cjs.entry.js +1 -1
  43. package/dist/cjs/p-range.cjs.entry.js +3 -3
  44. package/dist/cjs/p-select.cjs.entry.js +2 -2
  45. package/dist/cjs/p-table.cjs.entry.js +4 -4
  46. package/dist/cjs/p-toast.cjs.entry.js +1 -1
  47. package/dist/cjs/paperless.cjs.js +1 -1
  48. package/dist/collection/collection-manifest.json +1 -1
  49. package/dist/collection/components/molecules/accordion/accordion.component.js +86 -2
  50. package/dist/collection/components/molecules/attachment/attachment.component.js +8 -8
  51. package/dist/collection/components/molecules/button-group/button-group.component.js +1 -1
  52. package/dist/collection/components/molecules/calendar/calendar.component.js +1 -1
  53. package/dist/collection/components/molecules/content-slider/content-slider.component.js +2 -2
  54. package/dist/collection/components/molecules/cropper/cropper.component.js +1 -1
  55. package/dist/collection/components/molecules/datepicker/datepicker.component.js +2 -2
  56. package/dist/collection/components/molecules/dropdown/dropdown.component.js +2 -2
  57. package/dist/collection/components/molecules/empty-state/empty-state.component.js +2 -2
  58. package/dist/collection/components/molecules/field/field/field.component.js +4 -4
  59. package/dist/collection/components/molecules/label/label.component.js +11 -5
  60. package/dist/collection/components/molecules/navigation/item/navigation-item.component.js +3 -3
  61. package/dist/collection/components/molecules/navigation/section/navigation-section.component.js +1 -1
  62. package/dist/collection/components/molecules/pagination/pagination/pagination.component.js +3 -3
  63. package/dist/collection/components/molecules/profile/profile.component.js +1 -1
  64. package/dist/collection/components/molecules/range/range.component.js +3 -3
  65. package/dist/collection/components/molecules/select/select.component.js +2 -2
  66. package/dist/collection/components/molecules/table/cell/table-cell.component.js +1 -1
  67. package/dist/collection/components/molecules/table/footer/table-footer.component.js +2 -2
  68. package/dist/collection/components/molecules/table/row/table-row.component.js +3 -3
  69. package/dist/collection/components/molecules/toast/toast.component.js +1 -1
  70. package/dist/collection/components/organisms/listing/listing.component.js +2 -2
  71. package/dist/collection/components/organisms/navbar/navbar.component.js +1 -1
  72. package/dist/collection/components/organisms/table/table.component.js +4 -4
  73. package/dist/components/{p-BvjA9uxY.js → p-BOiWsfcF.js} +1 -1
  74. package/dist/components/{p-B_BKgQeH.js → p-BzqBJcLi.js} +1 -1
  75. package/dist/components/{p-DvAOnRQi.js → p-CDe7jCUk.js} +1 -1
  76. package/dist/components/{p-D32MmMyp.js → p-D-aqRvv-.js} +1 -1
  77. package/dist/components/{p-agrVwZh2.js → p-D33L0Zo8.js} +1 -1
  78. package/dist/components/p-DQBc9tJK.js +1 -0
  79. package/dist/components/{p-CgctO_zV.js → p-DQpI5tIr.js} +1 -1
  80. package/dist/components/{p-Csme11d5.js → p-Da9hczVK.js} +1 -1
  81. package/dist/components/{p-DV-90Xf7.js → p-DldbEkyU.js} +1 -1
  82. package/dist/components/{p-CUXnWkj8.js → p-DpmybwXO.js} +1 -1
  83. package/dist/components/{p-DqqbDTWo.js → p-DrNRSBlB.js} +1 -1
  84. package/dist/components/{p-28XxH8uR.js → p-DuDnxEzm.js} +1 -1
  85. package/dist/components/p-accordion.js +1 -1
  86. package/dist/components/p-attachment.js +1 -1
  87. package/dist/components/p-button-group.js +1 -1
  88. package/dist/components/p-calendar.js +1 -1
  89. package/dist/components/p-content-slider.js +1 -1
  90. package/dist/components/p-cropper.js +2 -2
  91. package/dist/components/p-datepicker.js +1 -1
  92. package/dist/components/p-dropdown.js +1 -1
  93. package/dist/components/p-empty-state.js +1 -1
  94. package/dist/components/p-field.js +1 -1
  95. package/dist/components/p-label.js +1 -1
  96. package/dist/components/p-listing.js +1 -1
  97. package/dist/components/p-navbar.js +1 -1
  98. package/dist/components/p-navigation-item.js +1 -1
  99. package/dist/components/p-navigation-section.js +1 -1
  100. package/dist/components/p-pagination-pages.js +1 -1
  101. package/dist/components/p-pagination-size.js +1 -1
  102. package/dist/components/p-pagination.js +1 -1
  103. package/dist/components/p-profile.js +1 -1
  104. package/dist/components/p-range.js +1 -1
  105. package/dist/components/p-select.js +1 -1
  106. package/dist/components/p-table-cell.js +1 -1
  107. package/dist/components/p-table-footer.js +1 -1
  108. package/dist/components/p-table-header.js +1 -1
  109. package/dist/components/p-table-row.js +1 -1
  110. package/dist/components/p-table.js +1 -1
  111. package/dist/components/p-toast.js +1 -1
  112. package/dist/components/p-upBcC1Jh.js +1 -0
  113. package/dist/esm/index-yFtRjnrU.js +4 -4
  114. package/dist/esm/loader.js +1 -1
  115. package/dist/esm/p-accordion.entry.js +14 -2
  116. package/dist/esm/p-attachment.entry.js +8 -8
  117. package/dist/esm/p-button-group.entry.js +1 -1
  118. package/dist/esm/p-calendar.entry.js +1 -1
  119. package/dist/esm/p-checkbox_3.entry.js +2 -2
  120. package/dist/esm/p-content-slider.entry.js +2 -2
  121. package/dist/esm/p-cropper.entry.js +1 -1
  122. package/dist/esm/p-datepicker.entry.js +2 -2
  123. package/dist/esm/p-empty-state_8.entry.js +8 -8
  124. package/dist/esm/p-field_3.entry.js +4 -4
  125. package/dist/esm/p-label.entry.js +3 -3
  126. package/dist/esm/p-listing.entry.js +2 -2
  127. package/dist/esm/p-navbar.entry.js +1 -1
  128. package/dist/esm/p-navigation-item.entry.js +3 -3
  129. package/dist/esm/p-navigation-section.entry.js +1 -1
  130. package/dist/esm/p-pagination_3.entry.js +3 -3
  131. package/dist/esm/p-profile.entry.js +1 -1
  132. package/dist/esm/p-range.entry.js +3 -3
  133. package/dist/esm/p-select.entry.js +2 -2
  134. package/dist/esm/p-table.entry.js +4 -4
  135. package/dist/esm/p-toast.entry.js +1 -1
  136. package/dist/esm/paperless.js +1 -1
  137. package/dist/index.html +1 -1
  138. package/dist/paperless/{p-994c1ad5.entry.js → p-186454b1.entry.js} +1 -1
  139. package/dist/paperless/{p-5e83a91b.entry.js → p-282b2776.entry.js} +1 -1
  140. package/dist/paperless/{p-b8caedf6.entry.js → p-2e850d9d.entry.js} +1 -1
  141. package/dist/paperless/{p-501f2f7c.entry.js → p-3376af98.entry.js} +1 -1
  142. package/dist/{build/p-36ba5439.entry.js → paperless/p-337de35a.entry.js} +1 -1
  143. package/dist/paperless/{p-022c5075.entry.js → p-3557f8b1.entry.js} +1 -1
  144. package/dist/{build/p-ce15940f.entry.js → paperless/p-41326183.entry.js} +1 -1
  145. package/dist/paperless/p-418e1cfb.entry.js +1 -0
  146. package/dist/paperless/{p-8e2a982f.entry.js → p-6dff428b.entry.js} +1 -1
  147. package/dist/paperless/{p-e65ed748.entry.js → p-71ac632f.entry.js} +1 -1
  148. package/dist/paperless/p-7fb843e7.entry.js +1 -0
  149. package/dist/paperless/{p-aca23818.entry.js → p-883569e8.entry.js} +1 -1
  150. package/dist/paperless/p-887c9c21.entry.js +1 -0
  151. package/dist/{build/p-a2c812fa.entry.js → paperless/p-88fd696b.entry.js} +1 -1
  152. package/dist/paperless/{p-81f2e6ef.entry.js → p-9232a310.entry.js} +1 -1
  153. package/dist/paperless/{p-4cd8035a.entry.js → p-9a9f0cd0.entry.js} +1 -1
  154. package/dist/{build/p-44f0d99e.entry.js → paperless/p-9c440af8.entry.js} +1 -1
  155. package/dist/paperless/{p-83113087.entry.js → p-af1a320c.entry.js} +1 -1
  156. package/dist/{build/p-a0584184.entry.js → paperless/p-da849804.entry.js} +1 -1
  157. package/dist/paperless/{p-e7b589a3.entry.js → p-e13fb7aa.entry.js} +1 -1
  158. package/dist/paperless/{p-ee723380.entry.js → p-fae76adf.entry.js} +1 -1
  159. package/dist/paperless/paperless.esm.js +1 -1
  160. package/dist/sw.js +1 -1
  161. package/dist/sw.js.map +1 -1
  162. package/dist/types/components/molecules/accordion/accordion.component.d.ts +14 -0
  163. package/dist/types/components/molecules/label/label.component.d.ts +2 -1
  164. package/dist/types/components/organisms/table/table.component.d.ts +2 -6
  165. package/dist/types/components.d.ts +72 -50
  166. package/hydrate/index.js +71 -56
  167. package/hydrate/index.mjs +71 -56
  168. package/package.json +1 -1
  169. package/dist/build/p-143f31bf.js +0 -1
  170. package/dist/build/p-4b7ac676.entry.js +0 -1
  171. package/dist/build/p-593fb8dd.entry.js +0 -1
  172. package/dist/build/p-6d99bd62.entry.js +0 -1
  173. package/dist/components/p-Cpjh5GlI.js +0 -1
  174. package/dist/paperless/p-4b7ac676.entry.js +0 -1
  175. package/dist/paperless/p-593fb8dd.entry.js +0 -1
  176. package/dist/paperless/p-6d99bd62.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{t,p as e,H as a,h as r}from"./p-CySg37XO.js";import{c as o}from"./p-CBWjHURv.js";import{T as i}from"./p-Au2WuEGF.js";import{a as n}from"./p-C5CTp9IA.js";import{d as c}from"./p-CnDhkkQD.js";const d=o(["flex min-w-[calc(100%-0.5rem)] flex-col","group","relative"],{variants:{variant:{default:["m-1 px-3","text-sm text-storm-500","dark:text-white"],header:null,"header-secondary":"mb-4",secondary:["px-4","font-ambit text-lg font-bold"]},enableHover:{true:null,false:null},checked:{true:null,false:null}},compoundVariants:[{variant:"default",enableHover:!0,class:["rounded-lg transition-colors","hover:cursor-pointer"]},{variant:"default",enableHover:!0,checked:!1,class:["hover:bg-off-white-300","dark:hover:bg-hurricane-600"]},{variant:"default",checked:!0,class:["rounded-lg transition-colors","\n bg-off-white-300\n dark:bg-hurricane-400\n dark:hover:bg-hurricane-400\n "]},{variant:["secondary","header-secondary"],class:["rounded-lg bg-off-white-300","dark:bg-hurricane-400"]},{variant:["header","header-secondary"],class:["px-4","text-xs font-normal text-storm-400","dark:text-hurricane-200"]}]}),s=o("relative flex min-w-full flex-nowrap items-stretch justify-between",{variants:{variant:{default:null,secondary:null,header:"pb-4","header-secondary":"py-2"}},compoundVariants:[{variant:["default","secondary"],class:"\n min-h-14 py-2\n tablet:py-4\n "},{variant:["header","header-secondary"],class:"min-h-0"}]}),h=o(["absolute -right-4 top-1 z-[2]","h-[calc(100%-0.5rem)]","\n opacity-0 transition-opacity\n group-hover:opacity-100\n ","empty:hidden"]),l=e(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}variant="default";enableHover=!0;checked=!1;isLast=!1;render(){return r(i,{key:"1b9139cb381d72eb6a14f6503f8e21c19bee4841"},r("div",{key:"bfa95509c2f9e38a5c91741a71a2e36bee729daa",class:"flex flex-col"},r("div",{key:"fc7c8e0051b9a8b676117b1001225f04a4624fdf",class:d({variant:this.variant,enableHover:this.enableHover,checked:this.checked})},r("div",{key:"bcb73f6e99b10220d3fc7f0b27dc13fed2b02d32",class:s({variant:this.variant})},r("slot",{key:"da29b07a752cbd0d5cf46ddccbaea4a2af3dae7a"}),r("div",{key:"e4ebfe659c0615848800d8e45befb04f2c5c8cbd",class:h()},r("slot",{key:"02398de67b6c0857d3cea60228eaea956629a6b9",name:"actions"})))),!n(this.isLast)&&"secondary"!==this.variant&&r("p-divider",{key:"096780e3edb7907a3d495fa5fb09047499326440"})))}static get style(){return'.relative{position:relative}*{box-sizing:border-box}:host{--tw-content:"";position:relative}.static{position:static}.absolute{position:absolute}.-right-4{right:-1rem}.top-1{top:.25rem}.z-\\[2\\]{z-index:2}.m-1{margin:.25rem}.mb-4{margin-bottom:1rem}.flex{display:flex}.table-row{display:table-row}.h-\\[calc\\(100\\%-0\\.5rem\\)\\]{height:calc(100% - .5rem)}.min-h-0{min-height:0}.min-h-14{min-height:3.5rem}.min-w-\\[calc\\(100\\%-0\\.5rem\\)\\]{min-width:calc(100% - .5rem)}.min-w-full{min-width:100%}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.rounded-lg{border-radius:.5rem}.bg-off-white-300{--tw-bg-opacity:1;background-color:rgb(248 247 244/var(--tw-bg-opacity,1))}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.pb-4{padding-bottom:1rem}.font-ambit{font-family:Ambit,sans-serif}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-normal{font-weight:400}.text-storm-400{--tw-text-opacity:1;color:rgb(70 75 84/var(--tw-text-opacity,1))}.text-storm-500{--tw-text-opacity:1;color:rgb(24 30 41/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.empty\\:hidden:empty{display:none}.hover\\:cursor-pointer:hover{cursor:pointer}.hover\\:bg-off-white-300:hover{--tw-bg-opacity:1;background-color:rgb(248 247 244/var(--tw-bg-opacity,1))}.group:hover .group-hover\\:opacity-100{opacity:1}@media (min-width:40rem){.tablet\\:py-4{padding-bottom:1rem;padding-top:1rem}}.dark\\:bg-hurricane-400:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1;background-color:rgb(70 75 84/var(--tw-bg-opacity,1))}.dark\\:text-hurricane-200:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(163 165 169/var(--tw-text-opacity,1))}.dark\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:hover\\:bg-hurricane-400:hover:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1;background-color:rgb(70 75 84/var(--tw-bg-opacity,1))}.dark\\:hover\\:bg-hurricane-600:hover:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1;background-color:rgb(46 52 62/var(--tw-bg-opacity,1))}.dark\\:bg-hurricane-400:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1;background-color:rgb(70 75 84/var(--tw-bg-opacity,1))}.dark\\:text-hurricane-200:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(163 165 169/var(--tw-text-opacity,1))}.dark\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:hover\\:bg-hurricane-400:hover:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1;background-color:rgb(70 75 84/var(--tw-bg-opacity,1))}.dark\\:hover\\:bg-hurricane-600:hover:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1;background-color:rgb(46 52 62/var(--tw-bg-opacity,1))}'}},[769,"p-table-row",{variant:[1],enableHover:[4,"enable-hover"],checked:[4],isLast:[4,"is-last"]}]);function b(){"undefined"!=typeof customElements&&["p-table-row","p-divider"].forEach((e=>{switch(e){case"p-table-row":customElements.get(t(e))||customElements.define(t(e),l);break;case"p-divider":customElements.get(t(e))||c()}}))}b();export{l as T,b as d}
@@ -1 +0,0 @@
1
- import{r as a,h as e}from"./p-yFtRjnrU.js";import{T as s}from"./p-CSySY6aC.js";import"./p-6XOzWrsN.js";const t=class{constructor(e){a(this,e)}header;render(){return e(s,{key:"aabfc291e288f02dcd4968f03899077fb318abf0",class:"flex flex-col gap-2"},this.header?.length>0&&e("p-navigation-title",{key:"507af087c66bdb236bb54af09819fbda57180bf7"},this.header),e("div",{key:"a6206f28cc39183855440bc575404817c9de5e3e",class:"flex flex-col"},e("slot",{key:"56bbabeb6a8884aaa667055ffb082753733d0c6f"})))}};t.style="*{box-sizing:border-box}.static{position:static}.flex{display:flex}.flex-col{flex-direction:column}.gap-2{gap:.5rem}";export{t as p_navigation_section}
@@ -1 +0,0 @@
1
- import{r as t,a as e,d as i,h as s,e as n}from"./p-yFtRjnrU.js";import{f as o,g as h}from"./p-CwQG70_4.js";import{f as a}from"./p-DeWIZIsV.js";import{f as l}from"./p-CWO2YJCh.js";import{c as r}from"./p-xs4N_Y-0.js";import{P as c,a as d,T as u}from"./p-CEaB2BT0.js";import"./p-CBWjHURv.js";import"./p-ChV9xqsO.js";const f=class{constructor(i){t(this,i),this.selectedRowsChange=e(this,"selectedRowsChange",3),this.rowClick=e(this,"rowClick",3),this.rowSelected=e(this,"rowSelected",3),this.rowDeselected=e(this,"rowDeselected",3),this.hasRendered=e(this,"hasRendered",3),this.quickFilter=e(this,"quickFilter",3),this.queryChange=e(this,"queryChange",3),this.filter=e(this,"filter",3),this.action=e(this,"action",3),this.pageChange=e(this,"pageChange",3),this.pageSizeChange=e(this,"pageSizeChange",3),this.export=e(this,"export",3),this.emptyStateActionClick=e(this,"emptyStateActionClick",3)}items;loading=!1;headerLoading=!1;footerLoading=!1;amountOfLoadingRows=6;enableRowSelection=!0;rowSelectionLimit;enableRowClick=!0;selectedRows=[];enableFloatingMenu=!0;floatingMenuAmountSelectedTemplate=t=>o((1===t?this._locales.floating_menu?.amount_selected:this._locales.floating_menu?.amount_selected_plural)?.replace("{{amount}}",t));selectedRowsChange;selectionKey;canSelectKey;rowClick;rowSelected;rowDeselected;hasRendered;enableHeader=!0;quickFilters=[];activeQuickFilterIdentifier;enableSearch=!0;query;enableFilter=!0;enableFilterDesktop=!0;selectedFiltersAmount;filterButtonTemplate;enableAction=!1;actionButtonLoading=!1;actionButtonEnabled=!1;actionButtonIcon="pencil";actionButtonText;actionButtonTemplate;quickFilter;queryChange;filter;action;enableFooter=!0;enablePaginationSize=!0;enablePaginationPages=!0;enableExport=!0;page=1;total;pageChange;pageSize=c;pageSizeOptions=d;pageSizeChange;export;hideOnSinglePage=!0;emptyStateHeader=()=>o(this._locales.empty_state?.no_filter.header);emptyStateContent=()=>o(this._locales.empty_state?.no_filter.content);emptyStateAction=()=>o(this._locales.empty_state?.no_filter.action);enableEmptyStateAction=!0;emptyStateFilteredHeader=()=>o(this._locales.empty_state.filtered.header);emptyStateFilteredContent=()=>o(this._locales.empty_state.filtered.content);emptyStateActionClick;shadow=!0;get _el(){return i(this)}_locales={};_extraHeaders=[];_columns=[];_items=[];_enableRowSelection=this.enableRowSelection;_rowSelectionLimit;_rowActionsFloatingAll=[];_rowActionsFloating=[];_rowActionsRow=[];_footerHidden=!1;_ctrlDown=!1;_hasCustomFilterSlot=!1;_hasCustomActionsSlot=!1;_floatingMenuShown=!1;_resizeTimeout;componentWillLoad(){this._hasCustomFilterSlot=!!this._el.querySelector(':scope > [slot="custom-filter"]'),this._hasCustomActionsSlot=!!this._el.querySelector(':scope > [slot="custom-actions"]'),this._setRowSelectionData(),this._setLocales(),this._parseItems(this.items),this._generateExtraHeaders(),this._generateColumns()}componentDidRender(){this.hasRendered.emit()}render(){return s(n,{key:"ebc99446ab4d71c14d0f18540d5179bd8fcffc29",class:"z-0 flex flex-col"},s("p-table-container",{key:"b2a78f82b943a9d224aace7ad184cc39d581be52"},this.enableHeader&&s("p-table-header",{key:"c07938abb9246bddb497924fe5b76137f40c81cd",actionButtonTemplate:this.actionButtonTemplate,actionIcon:this.actionButtonIcon,actionLoading:this.actionButtonLoading,actionText:this.actionButtonText,activeQuickFilterIdentifier:this.activeQuickFilterIdentifier,canUseAction:this.actionButtonEnabled,class:"mb-8",enableAction:this.enableAction,enableExport:this.enableExport,enableFilter:this.enableFilter,enableFilterDesktop:this.enableFilterDesktop,enableSearch:this.enableSearch,filterButtonTemplate:this.filterButtonTemplate,itemsSelectedAmount:this.selectedRows?.length,loading:this.headerLoading,query:this.query,quickFilters:this.quickFilters,selectedFiltersAmount:this.selectedFiltersAmount,onAction:()=>this.action.emit(),onExport:()=>this.export.emit(),onFilter:()=>this.filter.emit(),onQueryChange:({detail:t})=>this.queryChange.emit(t),onQuickFilter:({detail:t})=>this.quickFilter.emit(t)},this._hasCustomFilterSlot&&s("slot",{key:"b8468885c7950f3606472de651f53e388ef99726",name:"custom-filter",slot:"custom-filter"}),this._hasCustomActionsSlot&&s("slot",{key:"37fe2edc6b7e85fe9eb47a057646b7f233b0986f",name:"custom-actions",slot:"custom-actions"})),this._getExtraHeader(),this._getHeader(),s("div",{key:"ae79834d8e90437452482063a2b4eeef8d7d8c51",class:"flex flex-1 flex-col"},this._getRows(),s("slot",{key:"327fa23d2b07f7453db487b3f142a284817b3045",name:"custom-rows"})),this.enableFloatingMenu&&this._enableRowSelection?s("p-floating-menu-container",{amount:this.selectedRows?.length,amountSelectedTemplate:this.floatingMenuAmountSelectedTemplate,class:a({hasFooter:this.enableFooter&&!this._footerHidden,active:!!this.selectedRows?.length,shown:this._floatingMenuShown}),enableAmountSelected:!!this._rowActionsFloating?.length,usedInTable:!0,onClose:()=>this._selectAllChange(null,!1)},this._rowActionsFloating?.length&&this._rowActionsFloating.map((t=>s("p-floating-menu-item",{disabled:t.disabled,icon:t.icon,iconFlip:t.iconFlip,iconRotate:t.iconRotate,loading:t.loading,slot:"floating-menu-item",onClick:()=>t.disabled||t.loading||!t.action||"single"!==t.type?t.action(this.selectedRows,!0):t.action(this.selectedRows[0],!1)},t.label)))):"",this.enableFooter&&s("p-table-footer",{key:"a88236bba88a694b16d1d3bd119bf67f7dc7fbea",enablePaginationPages:this.enablePaginationPages,enablePaginationSize:this.enablePaginationSize,hideOnSinglePage:this.hideOnSinglePage,loading:this.footerLoading,page:this.page,pageSize:this.pageSize,pageSizeOptions:this.pageSizeOptions,tableHeaderHasAction:this.enableHeader&&this.enableAction&&this.actionButtonEnabled,total:this.total,onHiddenChange:({detail:t})=>this._footerHidden=t,onPageChange:({detail:t})=>this.pageChange.emit(t),onPageSizeChange:({detail:t})=>this.pageSizeChange.emit(t)})))}async _setLocales(){this._locales=await h(this._el)}onTableDefinitionUpdated(){this._generateColumns()}keyDown({key:t}){"Control"===t&&!0!==this._ctrlDown&&(this._ctrlDown=!0)}keyUp({key:t}){"Control"===t&&!1!==this._ctrlDown&&(this._ctrlDown=!1)}visibilityChange(){"hidden"===document.visibilityState&&!1!==this._ctrlDown&&(this._ctrlDown=!1)}_parseItems(t){this._items=t?Array.isArray(t)?t:JSON.parse(t):[]}_setRowSelectionData(){this._resizeTimeout&&clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout((()=>{const t=l(),e=[...this._el.querySelectorAll(":scope > p-table-row-action")];this._rowActionsRow=e.filter((t=>"both"===t.type||"single"===t.type)),this._rowActionsFloatingAll=e.filter((e=>this.enableRowSelection&&("both"===e.type||"multi"===e.type)||t&&"single"===e.type)).map((t=>("single"===t.type&&(t.disabled=this.selectedRows?.length>1),t)));let i=this.rowSelectionLimit;t&&this._rowActionsFloatingAll?.length&&(void 0!==i&&this.enableRowSelection||!this.enableRowSelection)&&(i=1),this._rowSelectionLimit=i;let s=this.enableRowSelection;t&&this._rowActionsFloatingAll?.length&&!s&&(s=!0),this._enableRowSelection=s,this._floatingMenuShown&&this._showFloatingMenu()}),200)}_generateExtraHeaders(){let t=[...this._el.querySelectorAll("p-table-extra-header")];t=this._parseDefinitions(t),this._extraHeaders=t}_generateColumns(){let t=[...this._el.querySelectorAll("p-table-column")];t=this._parseDefinitions(t),this._columns=t}_getExtraHeader(){return this._extraHeaders?.length?s("p-table-row",{isLast:!0,variant:"header-secondary"},this._extraHeaders.map(((t,e)=>s("p-table-cell",{checkboxOffset:0===e&&this._enableRowSelection,definition:t,index:e,variant:"header-secondary"},s("b",null,t.name))))):null}_getHeader(){return s("p-table-row",{variant:"header"},this._columns.map(((t,e)=>s("p-table-cell",{checkbox:0===e||t.hasCheckbox?this._getCheckbox(null,this.loading?"loading":"header"):null,definition:t,index:e,value:t.name,variant:"header"}))))}_getRows(){return this.loading?Array.from({length:this.amountOfLoadingRows},((t,e)=>s("p-table-row",{enableHover:this._enableRowSelection||this.enableRowClick,isLast:e===this.amountOfLoadingRows-1},this._getLoadingColumns(e)))):0===this._items.length?this._getEmptyState():this._items.map(((t,e)=>s("p-table-row",{checked:this._selectionContains(e),enableHover:this._enableRowSelection||this.enableRowClick,isLast:e===this._items.length-1,onClick:t=>this._rowClick(t,e)},this._getRowColumns(t,e),this._getActions(t,e))))}_getActions(t,e){const i=this._rowActionsRow.filter((e=>!e.showFunction||e.showFunction(t)));return i?.length&&!l()?s("p-table-row-actions-container",{checked:this._selectionContains(e),slot:"actions"},i.map((e=>s("p-tooltip",{content:e.label,strategy:"fixed"},s("p-button",{icon:e.icon,iconFlip:e.iconFlip,iconOnly:!0,iconRotate:e.iconRotate,size:"sm",slot:"trigger",variant:"secondary","data-is-action":!0,onClick:()=>"function"==typeof e.action&&e.action?.(t,!1)}))))):null}_getRowColumns(t,e){return this._columns.map(((i,n)=>s("p-table-cell",{checkbox:0===n||i.hasCheckbox?this._getCheckbox(e):null,definition:i,index:n,item:t,rowIndex:e})))}_getLoadingColumns(t){return this._columns.map(((e,i)=>s("p-table-cell",{checkbox:0===i||e.hasCheckbox?this._getCheckbox(t,"loading"):null,definition:e,index:i,rowIndex:t,variant:"loading"})))}_getCheckbox(t,e="default"){if(!this._enableRowSelection||!this.selectionKey&&!this._rowActionsFloating?.length)return;if("loading"===e)return s("p-loader",{class:"h-6 w-6 rounded",variant:"ghost"});if("header"===e)return s("p-checkbox",{checked:this._selectionContainsAll(),class:r({"opacity-0":void 0!==this._rowSelectionLimit}),disabled:void 0!==this._rowSelectionLimit,indeterminate:this._selectionIndeterminate(),onCheckedChange:t=>this._selectAllChange(t)});const i=this._items[t],n=this._selectionContains(t);return s("p-checkbox",{checked:n,class:"flex-shrink-0",disabled:this.canSelectKey&&!i[this.canSelectKey]||void 0!==this._rowSelectionLimit&&!n&&this.selectedRows.length===this._rowSelectionLimit,onCheckedChange:e=>this._checkboxChange(e,t)})}_getEmptyState(){return s("p-empty-state",this.query?.length||this.selectedFiltersAmount?{class:"my-16 self-center",content:this.emptyStateFilteredContent(),header:this.emptyStateFilteredHeader(),illustration:"search"}:{actionIcon:"plus",actionText:this.emptyStateAction(),class:"my-16 self-center",content:this.emptyStateContent(),enableAction:this.enableEmptyStateAction,header:this.emptyStateHeader(),illustration:"table",onAction:()=>this.enableAction&&this.action.emit()})}_selectAllChange(t,e){if(this._enableRowSelection){if(void 0===e?t?.detail??e:e){const t=[];for(let e=0;e<this._items.length;e++){const i=this._items[e];if((!this.canSelectKey||i[this.canSelectKey])&&!this._selectionContains(e)&&(t.push(i),this.rowSelected.emit(i),void 0!==this._rowSelectionLimit&&this.selectedRows.length+t.length===this._rowSelectionLimit))break}return this.selectedRows=[...this.selectedRows,...t],this.selectedRowsChange.emit(this.selectedRows),void(this.enableFloatingMenu&&!this._floatingMenuShown&&this._showFloatingMenu())}for(let t=0;t<this.selectedRows.length;t++){const e=this.selectedRows[t],i=this._items.find((i=>this._getSelectionValue(i,t)===this._getSelectionValue(e,t)));i&&this.rowDeselected.emit(i)}this.selectedRows=[],this.selectedRowsChange.emit(this.selectedRows)}}_checkboxChange({detail:t,target:e},i){if(!this._enableRowSelection)return;if(t&&void 0!==this._rowSelectionLimit&&this.selectedRows.length>=this._rowSelectionLimit)return void(e.checked=!1);const s=this._items[i];if(this.canSelectKey&&!s[this.canSelectKey])return void(e.checked=!1);if(t)return this.selectedRows=[...this.selectedRows,{...s,index:i}],this.selectedRowsChange.emit(this.selectedRows),this.rowSelected.emit(s),void(this.enableFloatingMenu&&!this._floatingMenuShown&&this._showFloatingMenu());const n=this._selectionContains(i,!0),o=[...this.selectedRows];o.splice(n,1),this.selectedRows=o,this.selectedRowsChange.emit(this.selectedRows),this.rowDeselected.emit(s)}_getSelectionValue(t,e){return this.selectionKey&&t?.[this.selectionKey]||e}_selectionContains(t,e=!1){const i=this.selectedRows.findIndex((e=>e.index===t));return e?i:-1!==i}_selectionContainsAll(){let t=!0;if(!this._items?.length)return!1;if(void 0!==this._rowSelectionLimit&&this.selectedRows.length===this._rowSelectionLimit)return!0;for(let e=0;e<this._items?.length;e++)if(!this._selectionContains(e)){t=!1;break}return t}_selectionIndeterminate(){if(!this._items?.length||!this.selectedRows?.length)return!1;if(void 0!==this._rowSelectionLimit&&this.selectedRows.length===this._rowSelectionLimit)return!1;let t=0;for(let e=0;e<this._items?.length;e++)this._selectionContains(e)&&t++;return t>0&&t!==this._items.length}_rowClick(t,e){const i=t.target;if("input"===i.tagName.toLowerCase()||"checkbox"===i.type)return;const s=this._findRow(t.target);if(this._findRowAction(t.target))return;if(this.enableRowClick)return void this.rowClick.emit({item:this._items[e],ctrlDown:this._ctrlDown});if(!this._enableRowSelection)return;const n=s?.querySelector('input[type="checkbox"]');n&&(n.checked=!n.checked,this._checkboxChange(n,e))}_findRow(t){return t?"p-table-row"===t?.tagName?.toLowerCase()?t:this._findRow(t?.parentElement):t}_findRowAction(t){return t?null!==t.dataset.isAction&&"false"!==t.dataset.isAction?t:"p-table-row"===t?.tagName?.toLowerCase()?null:this._findRowAction(t?.parentElement):null}_showFloatingMenu(){let t=this._rowActionsFloatingAll;1===this.rowSelectionLimit&&t.some((t=>("single"===t.type||"both"===t.type)&&t.showFunction))&&(t=t.filter((t=>"multi"===t.type||!t.showFunction||t.showFunction(this.selectedRows[0])))),this._rowActionsFloating=t,this._floatingMenuShown=!0}_parseDefinitions(t){return t.map((t=>this._parseDefinitionSizes(t)))}_parseDefinitionSizes(t){const e=t;let i={default:"full"};"string"!=typeof t.sizes||["auto","hidden","full"].includes(t.sizes)||(t.sizes=JSON.parse(t.sizes));for(const[t,s]of u.entries())i[s]="auto"!==e.sizes&&"hidden"!==e.sizes&&"full"!==e.sizes&&"number"!=typeof e.sizes?e.sizes[s]??i[u[t-1]]:"auto"===e.sizes?"full":e.sizes;return t.parsedSizes=i,t}static get watchers(){return{items:[{_parseItems:0}],enableRowSelection:[{_setRowSelectionData:0}],rowSelectionLimit:[{_setRowSelectionData:0}],selectedRows:[{_setRowSelectionData:0}]}}};f.style="*{box-sizing:border-box}.static{position:static}.fixed{position:fixed}.z-0{z-index:0}.my-16{margin-bottom:4rem;margin-top:4rem}.mb-8{margin-bottom:2rem}.flex{display:flex}.table{display:table}.hidden{display:none}.h-6{height:1.5rem}.w-6{width:1.5rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.resize{resize:both}.flex-col{flex-direction:column}.self-center{align-self:center}.rounded{border-radius:.25rem}.opacity-0{opacity:0}.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)}";export{f as p_table}
@@ -1 +0,0 @@
1
- import{r as t,a as e,h as a}from"./p-yFtRjnrU.js";import{T as r}from"./p-CSySY6aC.js";import{c as i}from"./p-xs4N_Y-0.js";import"./p-6XOzWrsN.js";import"./p-ChV9xqsO.js";const o=class{constructor(a){t(this,a),this.isOpen=e(this,"isOpen",3)}variant="primary";header;open=!1;closeable=!0;openable=!0;isOpen;render(){return a(r,{key:"e8d0a5eca31d3df3444861da1209a1f93fc5a84f"},a("div",{key:"aa3fe2f426aab19964ff5a23108a7a1a203a37b1",class:"flex w-full flex-col"},a("div",{key:"70bb96986d286a5ff6cd5914934bf30ff1e64bb7",class:i("flex cursor-pointer items-center gap-2",{"text-storm-500 dark:text-white":"primary"===this.variant,"text-storm-300 dark:text-hurricane-200":"secondary"===this.variant}),onClick:()=>this._onClick()},a("p-icon",{key:"6bae36a2b8de1d0f761a619b0ebb107baee5d827",class:"flex shrink-0",rotate:this.open?0:-90,variant:"caret"}),a("p",{key:"4a2cf003a82d1f7d868b1ce813f661e2d3743ebb",class:"my-0 shrink-0 whitespace-nowrap text-base font-medium"},this.header),a("p-divider",{key:"45dfcdfdd35139f1c4c63c9b789842d816646287",class:"flex-1"})),this.open&&a("div",{key:"3e05f0710f0e7eb05d5d3844812807dd5501dc0c",class:"mt-4"},a("slot",{key:"5dcc4ab2e8817e19786d80bc3433b905bffde2cc"}))))}_onClick(){!this.closeable&&this.open||(this.openable||this.open)&&(this.open=!this.open,this.isOpen.emit(this.open))}};o.style="*{box-sizing:border-box}.static{position:static}.my-0{margin-bottom:0;margin-top:0}.mt-4{margin-top:1rem}.flex{display:flex}.w-full{width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.gap-2{gap:.5rem}.whitespace-nowrap{white-space:nowrap}.text-base{font-size:1rem;line-height:1.5rem}.font-medium{font-weight:500}.text-hurricane-200{--tw-text-opacity:1;color:rgb(163 165 169/var(--tw-text-opacity,1))}.text-storm-300{--tw-text-opacity:1;color:rgb(116 120 127/var(--tw-text-opacity,1))}.text-storm-500{--tw-text-opacity:1;color:rgb(24 30 41/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:text-hurricane-200:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(163 165 169/var(--tw-text-opacity,1))}.dark\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:text-hurricane-200:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(163 165 169/var(--tw-text-opacity,1))}.dark\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}";export{o as p_accordion}