@paperless/core 0.1.0-alpha.131 → 0.1.0-alpha.133

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 (38) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/build/p-4187338d.entry.js +1 -0
  3. package/dist/build/{p-9d9dcf0c.entry.js → p-7654a36b.entry.js} +1 -1
  4. package/dist/build/paperless.esm.js +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/p-table-container_4.cjs.entry.js +1 -1
  7. package/dist/cjs/p-table.cjs.entry.js +26 -10
  8. package/dist/cjs/paperless.cjs.js +1 -1
  9. package/dist/collection/components/atoms/divider/divider.component.css +1 -1
  10. package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.css +1 -1
  11. package/dist/collection/components/atoms/helper/helper.component.css +1 -1
  12. package/dist/collection/components/atoms/icon/icon.component.css +1 -1
  13. package/dist/collection/components/atoms/modal-backdrop/modal-backdrop.component.css +1 -1
  14. package/dist/collection/components/atoms/modal-body/modal-body.component.css +1 -1
  15. package/dist/collection/components/atoms/modal-container/modal-container.component.css +1 -1
  16. package/dist/collection/components/atoms/modal-footer/modal-footer.component.css +1 -1
  17. package/dist/collection/components/atoms/modal-header/modal-header.component.css +1 -1
  18. package/dist/collection/components/atoms/tooltip/tooltip.component.css +1 -1
  19. package/dist/collection/components/molecules/dropdown/dropdown.component.css +1 -1
  20. package/dist/collection/components/molecules/table-header/table-header.component.js +2 -2
  21. package/dist/collection/components/organisms/table/table.component.js +44 -10
  22. package/dist/components/p-table.js +27 -10
  23. package/dist/components/table-header.component.js +1 -1
  24. package/dist/esm/loader.js +1 -1
  25. package/dist/esm/p-table-container_4.entry.js +1 -1
  26. package/dist/esm/p-table.entry.js +26 -10
  27. package/dist/esm/paperless.js +1 -1
  28. package/dist/index.html +1 -1
  29. package/dist/paperless/p-4187338d.entry.js +1 -0
  30. package/dist/paperless/{p-9d9dcf0c.entry.js → p-7654a36b.entry.js} +1 -1
  31. package/dist/paperless/paperless.esm.js +1 -1
  32. package/dist/sw.js +1 -1
  33. package/dist/sw.js.map +1 -1
  34. package/dist/types/components/organisms/table/table.component.d.ts +4 -0
  35. package/dist/types/components.d.ts +8 -0
  36. package/package.json +1 -1
  37. package/dist/build/p-60f920a3.entry.js +0 -1
  38. package/dist/paperless/p-60f920a3.entry.js +0 -1
@@ -10,6 +10,10 @@ export declare class Table {
10
10
  * Wether to enable selection
11
11
  */
12
12
  enableRowSelection: boolean;
13
+ /**
14
+ * Wether to enable row clicking
15
+ */
16
+ enableRowClick: boolean;
13
17
  /**
14
18
  * The current selection of items
15
19
  */
@@ -608,6 +608,10 @@ export namespace Components {
608
608
  * Wether to enable pagination
609
609
  */
610
610
  "enablePagination": boolean;
611
+ /**
612
+ * Wether to enable row clicking
613
+ */
614
+ "enableRowClick": boolean;
611
615
  /**
612
616
  * Wether to enable selection
613
617
  */
@@ -1839,6 +1843,10 @@ declare namespace LocalJSX {
1839
1843
  * Wether to enable pagination
1840
1844
  */
1841
1845
  "enablePagination"?: boolean;
1846
+ /**
1847
+ * Wether to enable row clicking
1848
+ */
1849
+ "enableRowClick"?: boolean;
1842
1850
  /**
1843
1851
  * Wether to enable selection
1844
1852
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paperless/core",
3
- "version": "0.1.0-alpha.131",
3
+ "version": "0.1.0-alpha.133",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as e,H as o,g as s}from"./p-a81035d0.js";import{o as r}from"./p-09ea2a1a.js";import{d as a,a as n}from"./p-6c60fd3d.js";const h=class{constructor(e){t(this,e),this.selectedRowsChange=i(this,"selectedRowsChange",7),this.rowClick=i(this,"rowClick",7),this.rowSelected=i(this,"rowSelected",7),this.rowDeselected=i(this,"rowDeselected",7),this.quickFilter=i(this,"quickFilter",7),this.queryChange=i(this,"queryChange",7),this.filter=i(this,"filter",7),this.edit=i(this,"edit",7),this.pageChange=i(this,"pageChange",7),this.pageSizeChange=i(this,"pageSizeChange",7),this.export=i(this,"export",7),this.enableRowSelection=!0,this.selectedRows=[],this.quickFilters=[],this.enableSearch=!0,this.enableFilter=!0,this.enableEdit=!0,this.enablePageSize=!0,this.enablePagination=!0,this.enableExport=!0,this.page=1,this.pageSize=a,this.pageSizeOptions=n,this._columns=[],this._items=[]}componentWillLoad(){this._parseItems(this.items)}componentWillRender(){this._generateColumns()}render(){var t,i;return e(o,{class:"p-table"},e("p-table-container",null,e("p-table-header",{quickFilters:this.quickFilters,activeQuickFilterIdentifier:this.activeQuickFilterIdentifier,onQuickFilter:({detail:t})=>this.quickFilter.emit(t),enableSearch:this.enableSearch,query:this.query,onQueryChange:({detail:t})=>this.queryChange.emit(t),enableFilter:this.enableFilter,selectedFiltersAmount:this.selectedFiltersAmount,filterButtonTemplate:this.filterButtonTemplate,onFilter:()=>this.filter.emit(),enableEdit:this.enableEdit,canEdit:!!(null===(t=this.selectedRows)||void 0===t?void 0:t.length),editButtonTemplate:this.editButtonTemplate,onEdit:()=>this.edit.emit(),itemsSelectedAmount:null===(i=this.selectedRows)||void 0===i?void 0:i.length}),this._getHeader(),e("div",{class:"flex flex-col"},this._getRows()),e("p-table-footer",{enablePageSize:this.enablePageSize,pageSize:this.pageSize,pageSizeOptions:this.pageSizeOptions,onPageSizeChange:({detail:t})=>this.pageSizeChange.emit(t),enablePagination:this.enablePagination,page:this.page,total:this.total,onPageChange:({detail:t})=>this.pageChange.emit(t),enableExport:this.enableExport,onExport:()=>this.export.emit()})))}onTableDefinitionUpdated(){this._generateColumns()}_parseItems(t){this._items=t?Array.isArray(t)?t:JSON.parse(t):[]}_generateColumns(){const t=this._el.querySelectorAll("p-table-definition");this._columns=Array.from(t)}_getHeader(){return e("p-table-row",{variant:"header"},this._columns.map(((t,i)=>e("div",{class:this._getColumnClasses(t,!0)},this._getCheckbox(i,null,"header"),e("div",{class:"flex"},t.name)))))}_getRows(){return this._items.map(((t,i)=>e("p-table-row",{enableHover:this.enableRowSelection,onClick:t=>this._rowClick(t,i)},this._getRowColumns(t,i))))}_getRowColumns(t,i){return this._columns.map(((o,s)=>e("div",{class:this._getColumnClasses(o)},this._getCheckbox(s,i),e("div",{class:"flex"},o.template({value:r(t,o.path),item:t,index:i})))))}_getCheckbox(t,i,o="default"){if("header"===o)return this.enableRowSelection&&0===t&&e("input",{class:"p-input",type:"checkbox",onChange:t=>this._selectAllChange(t),checked:this._selectionContainsAll(),indeterminate:this._selectionIndeterminate()});const s=this._items[i];return this.enableRowSelection&&0===t&&e("input",{class:"p-input",type:"checkbox",onChange:t=>this._checkboxChange(null==t?void 0:t.target,i),disabled:this.canSelectKey&&!s[this.canSelectKey],checked:this._selectionContains(s,i)})}_getColumnClasses(t,i=!1){const e=this._getSizes(t);return Object.assign({flex:!0,"gap-4":!0,"items-center":!0,"justify-start":!t.align||"start"===t.align,"justify-center":"center"===t.align,"justify-end":"end"===t.align,"font-semibold":!i&&"th"===t.type,"text-storm-dark":!i&&"th"===t.type},e)}_selectAllChange(t){if(this._getCheckedValue(t.target)){for(let t=0;t<this._items.length;t++){const i=this._items[t];if(this.canSelectKey&&!i[this.canSelectKey])continue;const e=this._getSelectionValue(i,t);this.selectedRows.indexOf(e)>=0||(this.selectedRows=[...this.selectedRows,e],this.rowSelected.emit(i))}this.selectedRowsChange.emit(this.selectedRows)}else{for(let t=0;t<this.selectedRows.length;t++){const i=this.selectedRows[t],e=this._items.find((e=>this._getSelectionValue(e,t)===i));e&&this.rowDeselected.emit(e)}this.selectedRows=[],this.selectedRowsChange.emit(this.selectedRows)}}_checkboxChange(t,i){const e=this._items[i];if(this.canSelectKey&&!e[this.canSelectKey])return void(t.checked=!1);const o=this._getCheckedValue(t),s=this._getSelectionValue(e,i);if(o)return this.selectedRows=[...this.selectedRows,s],this.selectedRowsChange.emit(this.selectedRows),void this.rowSelected.emit(e);const r=this._selectionContains(e,i,!0),a=[...this.selectedRows];a.splice(r,1),this.selectedRows=a,this.selectedRowsChange.emit(this.selectedRows),this.rowDeselected.emit(e)}_getCheckedValue(t){return null==t?void 0:t.checked}_getSelectionValue(t,i){return this.selectionKey&&(null==t?void 0:t[this.selectionKey])||i}_selectionContains(t,i,e=!1){const o=this._getSelectionValue(t,i),s=this.selectedRows.indexOf(o);return e?s:s>=0}_selectionContainsAll(){var t,i;let e=!0;if(!(null===(t=this._items)||void 0===t?void 0:t.length))return!1;for(let t=0;t<(null===(i=this._items)||void 0===i?void 0:i.length);t++)if(!this._selectionContains(this._items[t],t)){e=!1;break}return e}_selectionIndeterminate(){var t,i,e;if(!(null===(t=this._items)||void 0===t?void 0:t.length)||!(null===(i=this.selectedRows)||void 0===i?void 0:i.length))return!1;let o=0;for(let t=0;t<(null===(e=this._items)||void 0===e?void 0:e.length);t++)this._selectionContains(this._items[t],t)&&o++;return o>0}_rowClick(t,i){let e=t.target;if("input"===e.tagName.toLowerCase()||"checkbox"===e.type)return this._checkboxChange(e,i);const o=this._findRow(t.target);e=null==o?void 0:o.querySelector('input[type="checkbox"]'),e&&(e.checked=!e.checked,this._checkboxChange(e,i))}_findRow(t){var i;return t?"p-table-row"===(null===(i=null==t?void 0:t.tagName)||void 0===i?void 0:i.toLowerCase())?t:this._findRow(null==t?void 0:t.parentElement):t}_getSizes({sizes:t}){if("auto"===t)return{"w-auto":!0};if("object"==typeof t){const i={};for(const e of Object.keys(t))"default"!==e?i[`${e}:w-${t[`${e}`]}/12`]=!0:i[`w-${t.default}/12`]=!0;return i}return{[`w-${t}/12`]:!0}}get _el(){return s(this)}static get watchers(){return{items:["_parseItems"]}}};h.style=".visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.m-0{margin:0!important}.ml-1{margin-left:.25rem!important}.block{display:block!important}.flex{display:flex!important}.table{display:table!important}.hidden{display:none!important}.w-1{width:.25rem!important}.w-2{width:.5rem!important}.w-3{width:.75rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-6{width:1.5rem!important}.w-7{width:1.75rem!important}.w-8{width:2rem!important}.w-9{width:2.25rem!important}.w-10{width:2.5rem!important}.w-11{width:2.75rem!important}.w-auto{width:auto!important}.w-full{width:100%!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.gap-4{gap:1rem!important}.justify-self-end{justify-self:end!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-transparent{border-color:transparent!important}.border-t-mystic-dark{--tw-border-opacity:1!important;border-top-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.p-4{padding:1rem!important}.font-semibold{font-weight:600!important}.text-storm-dark{--tw-text-opacity:1!important;color:rgb(39 40 56/var(--tw-text-opacity))!important}.blur{--tw-blur:blur(8px)!important}.blur,.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}*{box-sizing:border-box}p-table{display:flex;flex-direction:column}.w-1\\/12{width:8.333333%!important}.w-2\\/12{width:16.666667%!important}.w-3\\/12{width:25%!important}.w-4\\/12{width:33.333333%!important}.w-5\\/12{width:41.666667%!important}.w-6\\/12{width:50%!important}.w-7\\/12{width:58.333333%!important}.w-8\\/12{width:66.666667%!important}.w-9\\/12{width:75%!important}.w-10\\/12{width:83.333333%!important}.w-11\\/12{width:91.666667%!important}@media (min-width:40rem){.tablet\\:w-1\\/12{width:8.333333%!important}.tablet\\:w-2\\/12{width:16.666667%!important}.tablet\\:w-3\\/12{width:25%!important}.tablet\\:w-4\\/12{width:33.333333%!important}.tablet\\:w-5\\/12{width:41.666667%!important}.tablet\\:w-6\\/12{width:50%!important}.tablet\\:w-7\\/12{width:58.333333%!important}.tablet\\:w-8\\/12{width:66.666667%!important}.tablet\\:w-9\\/12{width:75%!important}.tablet\\:w-10\\/12{width:83.333333%!important}.tablet\\:w-11\\/12{width:91.666667%!important}}@media (min-width:64rem){.desktop-xs\\:w-1\\/12{width:8.333333%!important}.desktop-xs\\:w-2\\/12{width:16.666667%!important}.desktop-xs\\:w-3\\/12{width:25%!important}.desktop-xs\\:w-4\\/12{width:33.333333%!important}.desktop-xs\\:w-5\\/12{width:41.666667%!important}.desktop-xs\\:w-6\\/12{width:50%!important}.desktop-xs\\:w-7\\/12{width:58.333333%!important}.desktop-xs\\:w-8\\/12{width:66.666667%!important}.desktop-xs\\:w-9\\/12{width:75%!important}.desktop-xs\\:w-10\\/12{width:83.333333%!important}.desktop-xs\\:w-11\\/12{width:91.666667%!important}}@media (min-width:80rem){.desktop-sm\\:w-1\\/12{width:8.333333%!important}.desktop-sm\\:w-2\\/12{width:16.666667%!important}.desktop-sm\\:w-3\\/12{width:25%!important}.desktop-sm\\:w-4\\/12{width:33.333333%!important}.desktop-sm\\:w-5\\/12{width:41.666667%!important}.desktop-sm\\:w-6\\/12{width:50%!important}.desktop-sm\\:w-7\\/12{width:58.333333%!important}.desktop-sm\\:w-8\\/12{width:66.666667%!important}.desktop-sm\\:w-9\\/12{width:75%!important}.desktop-sm\\:w-10\\/12{width:83.333333%!important}.desktop-sm\\:w-11\\/12{width:91.666667%!important}}@media (min-width:85.375rem){.desktop\\:w-1\\/12{width:8.333333%!important}.desktop\\:w-2\\/12{width:16.666667%!important}.desktop\\:w-3\\/12{width:25%!important}.desktop\\:w-4\\/12{width:33.333333%!important}.desktop\\:w-5\\/12{width:41.666667%!important}.desktop\\:w-6\\/12{width:50%!important}.desktop\\:w-7\\/12{width:58.333333%!important}.desktop\\:w-8\\/12{width:66.666667%!important}.desktop\\:w-9\\/12{width:75%!important}.desktop\\:w-10\\/12{width:83.333333%!important}.desktop\\:w-11\\/12{width:91.666667%!important}}@media (min-width:90rem){.desktop-lg\\:w-1\\/12{width:8.333333%!important}.desktop-lg\\:w-2\\/12{width:16.666667%!important}.desktop-lg\\:w-3\\/12{width:25%!important}.desktop-lg\\:w-4\\/12{width:33.333333%!important}.desktop-lg\\:w-5\\/12{width:41.666667%!important}.desktop-lg\\:w-6\\/12{width:50%!important}.desktop-lg\\:w-7\\/12{width:58.333333%!important}.desktop-lg\\:w-8\\/12{width:66.666667%!important}.desktop-lg\\:w-9\\/12{width:75%!important}.desktop-lg\\:w-10\\/12{width:83.333333%!important}.desktop-lg\\:w-11\\/12{width:91.666667%!important}}@media (min-width:120rem){.desktop-xl\\:w-1\\/12{width:8.333333%!important}.desktop-xl\\:w-2\\/12{width:16.666667%!important}.desktop-xl\\:w-3\\/12{width:25%!important}.desktop-xl\\:w-4\\/12{width:33.333333%!important}.desktop-xl\\:w-5\\/12{width:41.666667%!important}.desktop-xl\\:w-6\\/12{width:50%!important}.desktop-xl\\:w-7\\/12{width:58.333333%!important}.desktop-xl\\:w-8\\/12{width:66.666667%!important}.desktop-xl\\:w-9\\/12{width:75%!important}.desktop-xl\\:w-10\\/12{width:83.333333%!important}.desktop-xl\\:w-11\\/12{width:91.666667%!important}}@media (min-width:64rem){.desktop-xs\\:flex{display:flex!important}.desktop-xs\\:hidden{display:none!important}.desktop-xs\\:w-auto{width:auto!important}.desktop-xs\\:flex-row{flex-direction:row!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}";export{h as p_table}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as e,H as o,g as s}from"./p-a81035d0.js";import{o as r}from"./p-09ea2a1a.js";import{d as a,a as n}from"./p-6c60fd3d.js";const h=class{constructor(e){t(this,e),this.selectedRowsChange=i(this,"selectedRowsChange",7),this.rowClick=i(this,"rowClick",7),this.rowSelected=i(this,"rowSelected",7),this.rowDeselected=i(this,"rowDeselected",7),this.quickFilter=i(this,"quickFilter",7),this.queryChange=i(this,"queryChange",7),this.filter=i(this,"filter",7),this.edit=i(this,"edit",7),this.pageChange=i(this,"pageChange",7),this.pageSizeChange=i(this,"pageSizeChange",7),this.export=i(this,"export",7),this.enableRowSelection=!0,this.selectedRows=[],this.quickFilters=[],this.enableSearch=!0,this.enableFilter=!0,this.enableEdit=!0,this.enablePageSize=!0,this.enablePagination=!0,this.enableExport=!0,this.page=1,this.pageSize=a,this.pageSizeOptions=n,this._columns=[],this._items=[]}componentWillLoad(){this._parseItems(this.items)}componentWillRender(){this._generateColumns()}render(){var t,i;return e(o,{class:"p-table"},e("p-table-container",null,e("p-table-header",{quickFilters:this.quickFilters,activeQuickFilterIdentifier:this.activeQuickFilterIdentifier,onQuickFilter:({detail:t})=>this.quickFilter.emit(t),enableSearch:this.enableSearch,query:this.query,onQueryChange:({detail:t})=>this.queryChange.emit(t),enableFilter:this.enableFilter,selectedFiltersAmount:this.selectedFiltersAmount,filterButtonTemplate:this.filterButtonTemplate,onFilter:()=>this.filter.emit(),enableEdit:this.enableEdit,canEdit:!!(null===(t=this.selectedRows)||void 0===t?void 0:t.length),editButtonTemplate:this.editButtonTemplate,onEdit:()=>this.edit.emit(),itemsSelectedAmount:null===(i=this.selectedRows)||void 0===i?void 0:i.length}),this._getHeader(),e("div",{class:"flex flex-col"},this._getRows()),e("p-table-footer",{enablePageSize:this.enablePageSize,pageSize:this.pageSize,pageSizeOptions:this.pageSizeOptions,onPageSizeChange:({detail:t})=>this.pageSizeChange.emit(t),enablePagination:this.enablePagination,page:this.page,total:this.total,onPageChange:({detail:t})=>this.pageChange.emit(t),enableExport:this.enableExport,onExport:()=>this.export.emit()})))}onTableDefinitionUpdated(){this._generateColumns()}_parseItems(t){this._items=t?Array.isArray(t)?t:JSON.parse(t):[]}_generateColumns(){const t=this._el.querySelectorAll("p-table-definition");this._columns=Array.from(t)}_getHeader(){return e("p-table-row",{variant:"header"},this._columns.map(((t,i)=>e("div",{class:this._getColumnClasses(t,!0)},this._getCheckbox(i,null,"header"),e("div",{class:"flex"},t.name)))))}_getRows(){return this._items.map(((t,i)=>e("p-table-row",{enableHover:this.enableRowSelection,onClick:t=>this._rowClick(t,i)},this._getRowColumns(t,i))))}_getRowColumns(t,i){return this._columns.map(((o,s)=>e("div",{class:this._getColumnClasses(o)},this._getCheckbox(s,i),e("div",{class:"flex"},o.template({value:r(t,o.path),item:t,index:i})))))}_getCheckbox(t,i,o="default"){if("header"===o)return this.enableRowSelection&&0===t&&e("input",{class:"p-input",type:"checkbox",onChange:t=>this._selectAllChange(t),checked:this._selectionContainsAll(),indeterminate:this._selectionIndeterminate()});const s=this._items[i];return this.enableRowSelection&&0===t&&e("input",{class:"p-input",type:"checkbox",onChange:t=>this._checkboxChange(null==t?void 0:t.target,i),disabled:this.canSelectKey&&!s[this.canSelectKey],checked:this._selectionContains(s,i)})}_getColumnClasses(t,i=!1){const e=this._getSizes(t);return Object.assign({flex:!0,"gap-4":!0,"items-center":!0,"justify-start":!t.align||"start"===t.align,"justify-center":"center"===t.align,"justify-end":"end"===t.align,"font-semibold":!i&&"th"===t.type,"text-storm-dark":!i&&"th"===t.type},e)}_selectAllChange(t){if(this._getCheckedValue(t.target)){for(let t=0;t<this._items.length;t++){const i=this._items[t];if(this.canSelectKey&&!i[this.canSelectKey])continue;const e=this._getSelectionValue(i,t);this.selectedRows.indexOf(e)>=0||(this.selectedRows=[...this.selectedRows,e],this.rowSelected.emit(i))}this.selectedRowsChange.emit(this.selectedRows)}else{for(let t=0;t<this.selectedRows.length;t++){const i=this.selectedRows[t],e=this._items.find((e=>this._getSelectionValue(e,t)===i));e&&this.rowDeselected.emit(e)}this.selectedRows=[],this.selectedRowsChange.emit(this.selectedRows)}}_checkboxChange(t,i){const e=this._items[i];if(this.canSelectKey&&!e[this.canSelectKey])return void(t.checked=!1);const o=this._getCheckedValue(t),s=this._getSelectionValue(e,i);if(o)return this.selectedRows=[...this.selectedRows,s],this.selectedRowsChange.emit(this.selectedRows),void this.rowSelected.emit(e);const r=this._selectionContains(e,i,!0),a=[...this.selectedRows];a.splice(r,1),this.selectedRows=a,this.selectedRowsChange.emit(this.selectedRows),this.rowDeselected.emit(e)}_getCheckedValue(t){return null==t?void 0:t.checked}_getSelectionValue(t,i){return this.selectionKey&&(null==t?void 0:t[this.selectionKey])||i}_selectionContains(t,i,e=!1){const o=this._getSelectionValue(t,i),s=this.selectedRows.indexOf(o);return e?s:s>=0}_selectionContainsAll(){var t,i;let e=!0;if(!(null===(t=this._items)||void 0===t?void 0:t.length))return!1;for(let t=0;t<(null===(i=this._items)||void 0===i?void 0:i.length);t++)if(!this._selectionContains(this._items[t],t)){e=!1;break}return e}_selectionIndeterminate(){var t,i,e;if(!(null===(t=this._items)||void 0===t?void 0:t.length)||!(null===(i=this.selectedRows)||void 0===i?void 0:i.length))return!1;let o=0;for(let t=0;t<(null===(e=this._items)||void 0===e?void 0:e.length);t++)this._selectionContains(this._items[t],t)&&o++;return o>0}_rowClick(t,i){let e=t.target;if("input"===e.tagName.toLowerCase()||"checkbox"===e.type)return this._checkboxChange(e,i);const o=this._findRow(t.target);e=null==o?void 0:o.querySelector('input[type="checkbox"]'),e&&(e.checked=!e.checked,this._checkboxChange(e,i))}_findRow(t){var i;return t?"p-table-row"===(null===(i=null==t?void 0:t.tagName)||void 0===i?void 0:i.toLowerCase())?t:this._findRow(null==t?void 0:t.parentElement):t}_getSizes({sizes:t}){if("auto"===t)return{"w-auto":!0};if("object"==typeof t){const i={};for(const e of Object.keys(t))"default"!==e?i[`${e}:w-${t[`${e}`]}/12`]=!0:i[`w-${t.default}/12`]=!0;return i}return{[`w-${t}/12`]:!0}}get _el(){return s(this)}static get watchers(){return{items:["_parseItems"]}}};h.style=".visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.m-0{margin:0!important}.ml-1{margin-left:.25rem!important}.block{display:block!important}.flex{display:flex!important}.table{display:table!important}.hidden{display:none!important}.w-1{width:.25rem!important}.w-2{width:.5rem!important}.w-3{width:.75rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-6{width:1.5rem!important}.w-7{width:1.75rem!important}.w-8{width:2rem!important}.w-9{width:2.25rem!important}.w-10{width:2.5rem!important}.w-11{width:2.75rem!important}.w-auto{width:auto!important}.w-full{width:100%!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.gap-4{gap:1rem!important}.justify-self-end{justify-self:end!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-transparent{border-color:transparent!important}.border-t-mystic-dark{--tw-border-opacity:1!important;border-top-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.p-4{padding:1rem!important}.font-semibold{font-weight:600!important}.text-storm-dark{--tw-text-opacity:1!important;color:rgb(39 40 56/var(--tw-text-opacity))!important}.blur{--tw-blur:blur(8px)!important}.blur,.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}*{box-sizing:border-box}p-table{display:flex;flex-direction:column}.w-1\\/12{width:8.333333%!important}.w-2\\/12{width:16.666667%!important}.w-3\\/12{width:25%!important}.w-4\\/12{width:33.333333%!important}.w-5\\/12{width:41.666667%!important}.w-6\\/12{width:50%!important}.w-7\\/12{width:58.333333%!important}.w-8\\/12{width:66.666667%!important}.w-9\\/12{width:75%!important}.w-10\\/12{width:83.333333%!important}.w-11\\/12{width:91.666667%!important}@media (min-width:40rem){.tablet\\:w-1\\/12{width:8.333333%!important}.tablet\\:w-2\\/12{width:16.666667%!important}.tablet\\:w-3\\/12{width:25%!important}.tablet\\:w-4\\/12{width:33.333333%!important}.tablet\\:w-5\\/12{width:41.666667%!important}.tablet\\:w-6\\/12{width:50%!important}.tablet\\:w-7\\/12{width:58.333333%!important}.tablet\\:w-8\\/12{width:66.666667%!important}.tablet\\:w-9\\/12{width:75%!important}.tablet\\:w-10\\/12{width:83.333333%!important}.tablet\\:w-11\\/12{width:91.666667%!important}}@media (min-width:64rem){.desktop-xs\\:w-1\\/12{width:8.333333%!important}.desktop-xs\\:w-2\\/12{width:16.666667%!important}.desktop-xs\\:w-3\\/12{width:25%!important}.desktop-xs\\:w-4\\/12{width:33.333333%!important}.desktop-xs\\:w-5\\/12{width:41.666667%!important}.desktop-xs\\:w-6\\/12{width:50%!important}.desktop-xs\\:w-7\\/12{width:58.333333%!important}.desktop-xs\\:w-8\\/12{width:66.666667%!important}.desktop-xs\\:w-9\\/12{width:75%!important}.desktop-xs\\:w-10\\/12{width:83.333333%!important}.desktop-xs\\:w-11\\/12{width:91.666667%!important}}@media (min-width:80rem){.desktop-sm\\:w-1\\/12{width:8.333333%!important}.desktop-sm\\:w-2\\/12{width:16.666667%!important}.desktop-sm\\:w-3\\/12{width:25%!important}.desktop-sm\\:w-4\\/12{width:33.333333%!important}.desktop-sm\\:w-5\\/12{width:41.666667%!important}.desktop-sm\\:w-6\\/12{width:50%!important}.desktop-sm\\:w-7\\/12{width:58.333333%!important}.desktop-sm\\:w-8\\/12{width:66.666667%!important}.desktop-sm\\:w-9\\/12{width:75%!important}.desktop-sm\\:w-10\\/12{width:83.333333%!important}.desktop-sm\\:w-11\\/12{width:91.666667%!important}}@media (min-width:85.375rem){.desktop\\:w-1\\/12{width:8.333333%!important}.desktop\\:w-2\\/12{width:16.666667%!important}.desktop\\:w-3\\/12{width:25%!important}.desktop\\:w-4\\/12{width:33.333333%!important}.desktop\\:w-5\\/12{width:41.666667%!important}.desktop\\:w-6\\/12{width:50%!important}.desktop\\:w-7\\/12{width:58.333333%!important}.desktop\\:w-8\\/12{width:66.666667%!important}.desktop\\:w-9\\/12{width:75%!important}.desktop\\:w-10\\/12{width:83.333333%!important}.desktop\\:w-11\\/12{width:91.666667%!important}}@media (min-width:90rem){.desktop-lg\\:w-1\\/12{width:8.333333%!important}.desktop-lg\\:w-2\\/12{width:16.666667%!important}.desktop-lg\\:w-3\\/12{width:25%!important}.desktop-lg\\:w-4\\/12{width:33.333333%!important}.desktop-lg\\:w-5\\/12{width:41.666667%!important}.desktop-lg\\:w-6\\/12{width:50%!important}.desktop-lg\\:w-7\\/12{width:58.333333%!important}.desktop-lg\\:w-8\\/12{width:66.666667%!important}.desktop-lg\\:w-9\\/12{width:75%!important}.desktop-lg\\:w-10\\/12{width:83.333333%!important}.desktop-lg\\:w-11\\/12{width:91.666667%!important}}@media (min-width:120rem){.desktop-xl\\:w-1\\/12{width:8.333333%!important}.desktop-xl\\:w-2\\/12{width:16.666667%!important}.desktop-xl\\:w-3\\/12{width:25%!important}.desktop-xl\\:w-4\\/12{width:33.333333%!important}.desktop-xl\\:w-5\\/12{width:41.666667%!important}.desktop-xl\\:w-6\\/12{width:50%!important}.desktop-xl\\:w-7\\/12{width:58.333333%!important}.desktop-xl\\:w-8\\/12{width:66.666667%!important}.desktop-xl\\:w-9\\/12{width:75%!important}.desktop-xl\\:w-10\\/12{width:83.333333%!important}.desktop-xl\\:w-11\\/12{width:91.666667%!important}}@media (min-width:64rem){.desktop-xs\\:flex{display:flex!important}.desktop-xs\\:hidden{display:none!important}.desktop-xs\\:w-auto{width:auto!important}.desktop-xs\\:flex-row{flex-direction:row!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}";export{h as p_table}