@paperless/core 1.42.4 → 1.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/dist/build/index.esm.js +1 -1
- package/dist/build/index.esm.js.map +1 -1
- package/dist/build/p-15f63841.js +2 -0
- package/dist/build/p-15f63841.js.map +1 -0
- package/dist/build/p-205dece4.entry.js +2 -0
- package/dist/build/p-205dece4.entry.js.map +1 -0
- package/dist/build/p-5aaf5bc2.entry.js +2 -0
- package/dist/build/p-5aaf5bc2.entry.js.map +1 -0
- package/dist/build/{p-1079ffc6.entry.js → p-e7826192.entry.js} +2 -2
- package/dist/build/p-e7826192.entry.js.map +1 -0
- package/dist/build/paperless.esm.js +1 -1
- package/dist/build/paperless.esm.js.map +1 -1
- package/dist/cjs/index-1fde8b14.js +4 -0
- package/dist/cjs/index.cjs.js +12 -52
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-floating-menu-container_8.cjs.entry.js +21 -8
- package/dist/cjs/p-floating-menu-container_8.cjs.entry.js.map +1 -1
- package/dist/cjs/p-table-row-action.cjs.entry.js +26 -0
- package/dist/cjs/p-table-row-action.cjs.entry.js.map +1 -0
- package/dist/cjs/p-table.cjs.entry.js +100 -38
- package/dist/cjs/p-table.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/cjs/screens-84f01214.js +56 -0
- package/dist/cjs/screens-84f01214.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.css +1 -1
- package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.js +19 -0
- package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.js.map +1 -1
- package/dist/collection/components/helpers/table-row-action/table-row-action.component.js +182 -0
- package/dist/collection/components/helpers/table-row-action/table-row-action.component.js.map +1 -0
- package/dist/collection/components/molecules/table-cell/table-cell.component.css +1 -1
- package/dist/collection/components/molecules/table-cell/table-cell.component.js +37 -7
- package/dist/collection/components/molecules/table-cell/table-cell.component.js.map +1 -1
- package/dist/collection/components/molecules/table-row/table-row.component.js +1 -1
- package/dist/collection/components/molecules/table-row/table-row.component.js.map +1 -1
- package/dist/collection/components/organisms/table/table.component.css +1 -1
- package/dist/collection/components/organisms/table/table.component.js +115 -38
- package/dist/collection/components/organisms/table/table.component.js.map +1 -1
- package/dist/components/floating-menu-item.component.js +4 -2
- package/dist/components/floating-menu-item.component.js.map +1 -1
- package/dist/components/index.js +3 -42
- package/dist/components/index.js.map +1 -1
- package/dist/components/p-table-row-action.d.ts +11 -0
- package/dist/components/p-table-row-action.js +48 -0
- package/dist/components/p-table-row-action.js.map +1 -0
- package/dist/components/p-table.js +110 -41
- package/dist/components/p-table.js.map +1 -1
- package/dist/components/screens.js +44 -0
- package/dist/components/screens.js.map +1 -0
- package/dist/components/table-cell.component.js +19 -6
- package/dist/components/table-cell.component.js.map +1 -1
- package/dist/components/table-row.component.js +1 -1
- package/dist/components/table-row.component.js.map +1 -1
- package/dist/esm/index-7b917f6b.js +4 -0
- package/dist/esm/index.js +3 -42
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-floating-menu-container_8.entry.js +21 -8
- package/dist/esm/p-floating-menu-container_8.entry.js.map +1 -1
- package/dist/esm/p-table-row-action.entry.js +22 -0
- package/dist/esm/p-table-row-action.entry.js.map +1 -0
- package/dist/esm/p-table.entry.js +100 -38
- package/dist/esm/p-table.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/esm/screens-64bd8af0.js +44 -0
- package/dist/esm/screens-64bd8af0.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/paperless/index.esm.js +1 -1
- package/dist/paperless/index.esm.js.map +1 -1
- package/dist/paperless/p-15f63841.js +2 -0
- package/dist/paperless/p-15f63841.js.map +1 -0
- package/dist/paperless/p-205dece4.entry.js +2 -0
- package/dist/paperless/p-205dece4.entry.js.map +1 -0
- package/dist/paperless/p-5aaf5bc2.entry.js +2 -0
- package/dist/paperless/p-5aaf5bc2.entry.js.map +1 -0
- package/dist/paperless/{p-1079ffc6.entry.js → p-e7826192.entry.js} +2 -2
- package/dist/paperless/p-e7826192.entry.js.map +1 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/paperless/paperless.esm.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/atoms/floating-menu-item/floating-menu-item.component.d.ts +4 -0
- package/dist/types/components/helpers/table-row-action/table-row-action.component.d.ts +43 -0
- package/dist/types/components/molecules/table-cell/table-cell.component.d.ts +6 -1
- package/dist/types/components/organisms/table/table.component.d.ts +6 -1
- package/dist/types/components.d.ts +99 -4
- package/hydrate/index.js +197 -50
- package/package.json +1 -1
- package/dist/build/p-1079ffc6.entry.js.map +0 -1
- package/dist/build/p-a9ebacc8.entry.js +0 -2
- package/dist/build/p-a9ebacc8.entry.js.map +0 -1
- package/dist/paperless/p-1079ffc6.entry.js.map +0 -1
- package/dist/paperless/p-a9ebacc8.entry.js +0 -2
- package/dist/paperless/p-a9ebacc8.entry.js.map +0 -1
package/hydrate/index.js
CHANGED
|
@@ -17852,6 +17852,38 @@ const objectGetByPath = (obj, path, defaultValue = undefined) => {
|
|
|
17852
17852
|
return result === undefined || result === obj ? defaultValue : result;
|
|
17853
17853
|
};
|
|
17854
17854
|
|
|
17855
|
+
var screens = {
|
|
17856
|
+
tablet: '40rem',
|
|
17857
|
+
'desktop-xs': '64rem',
|
|
17858
|
+
'desktop-sm': '80rem',
|
|
17859
|
+
desktop: '85.375rem',
|
|
17860
|
+
'desktop-lg': '90rem',
|
|
17861
|
+
'desktop-xl': '120rem',
|
|
17862
|
+
// layout sizes
|
|
17863
|
+
'layout-1280': '80rem',
|
|
17864
|
+
'layout-1440': '90rem',
|
|
17865
|
+
'layout-1536': '96rem',
|
|
17866
|
+
'layout-1680': '105rem',
|
|
17867
|
+
'layout-1920': '120rem',
|
|
17868
|
+
'layout-2560': '160rem',
|
|
17869
|
+
};
|
|
17870
|
+
|
|
17871
|
+
const getScreenSize = (size) => screens[size];
|
|
17872
|
+
const getScreenSizeInRem = (size) => {
|
|
17873
|
+
const screen = getScreenSize(size);
|
|
17874
|
+
return parseInt(screen.replace('rem', ''), 10);
|
|
17875
|
+
};
|
|
17876
|
+
const getScreenSizeInPixels = (size) => {
|
|
17877
|
+
const rem = getScreenSizeInRem(size);
|
|
17878
|
+
return rem * 16;
|
|
17879
|
+
};
|
|
17880
|
+
const isSmallerThanScreen = (size) => {
|
|
17881
|
+
const pixels = getScreenSizeInPixels(size);
|
|
17882
|
+
return window.innerWidth < pixels;
|
|
17883
|
+
};
|
|
17884
|
+
const isTouchDevice = () => !!window.matchMedia('(pointer: coarse)').matches;
|
|
17885
|
+
const isMobile = () => isTouchDevice() || isSmallerThanScreen('tablet');
|
|
17886
|
+
|
|
17855
17887
|
const datepickerComponentCss = ".flex{display:flex!important}*{box-sizing:border-box}:host{display:flex;flex-direction:column}:host input.read-only{text-overflow:ellipsis}.static{position:static!important}.cursor-pointer{cursor:pointer!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}";
|
|
17856
17888
|
|
|
17857
17889
|
class Datepicker {
|
|
@@ -19737,12 +19769,13 @@ class FloatingMenuContainer {
|
|
|
19737
19769
|
}; }
|
|
19738
19770
|
}
|
|
19739
19771
|
|
|
19740
|
-
const floatingMenuItemComponentCss = "/*!@.flex*/.flex.sc-p-floating-menu-item{display:flex!important}/*!@.h-6*/.h-6.sc-p-floating-menu-item{height:1.5rem!important}/*!@.cursor-pointer*/.cursor-pointer.sc-p-floating-menu-item{cursor:pointer!important}/*!@.items-center*/.items-center.sc-p-floating-menu-item{align-items:center!important}/*!@.gap-2*/.gap-2.sc-p-floating-menu-item{gap:.5rem!important}/*!@.whitespace-nowrap*/.whitespace-nowrap.sc-p-floating-menu-item{white-space:nowrap!important}/*!@.text-sm*/.text-sm.sc-p-floating-menu-item{font-size:.875rem!important;line-height:1.25rem!important}/*!@**/*.sc-p-floating-menu-item{box-sizing:border-box}/*!@:host*/.sc-p-floating-menu-item-h{--tw-text-opacity:1;align-items:center;color:rgb(152 154 183/var(--tw-text-opacity));display:flex;font-size:.875rem;gap:.5rem;height:1.5rem;line-height:1.25rem;white-space:nowrap}/*!@:host([hover])*/[hover].sc-p-floating-menu-item-h{cursor:pointer;font-weight:600}/*!@:host([hover]:hover)*/[hover].sc-p-floating-menu-item-h:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}/*!@.static*/.static.sc-p-floating-menu-item{position:static!important}";
|
|
19772
|
+
const floatingMenuItemComponentCss = "/*!@.flex*/.flex.sc-p-floating-menu-item{display:flex!important}/*!@.h-6*/.h-6.sc-p-floating-menu-item{height:1.5rem!important}/*!@.cursor-pointer*/.cursor-pointer.sc-p-floating-menu-item{cursor:pointer!important}/*!@.items-center*/.items-center.sc-p-floating-menu-item{align-items:center!important}/*!@.gap-2*/.gap-2.sc-p-floating-menu-item{gap:.5rem!important}/*!@.whitespace-nowrap*/.whitespace-nowrap.sc-p-floating-menu-item{white-space:nowrap!important}/*!@.text-sm*/.text-sm.sc-p-floating-menu-item{font-size:.875rem!important;line-height:1.25rem!important}/*!@.opacity-40*/.opacity-40.sc-p-floating-menu-item{opacity:.4!important}/*!@**/*.sc-p-floating-menu-item{box-sizing:border-box}/*!@:host*/.sc-p-floating-menu-item-h{--tw-text-opacity:1;align-items:center;color:rgb(152 154 183/var(--tw-text-opacity));display:flex;font-size:.875rem;gap:.5rem;height:1.5rem;line-height:1.25rem;white-space:nowrap}/*!@:host([hover])*/[hover].sc-p-floating-menu-item-h{cursor:pointer;font-weight:600}/*!@:host([disabled=true]),:host([disabled])*/[disabled=true].sc-p-floating-menu-item-h,[disabled].sc-p-floating-menu-item-h{opacity:.4;pointer-events:none}/*!@:host([hover]:hover:not([disabled]))*/[hover].sc-p-floating-menu-item-h:hover:not([disabled]){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}/*!@.static*/.static.sc-p-floating-menu-item{position:static!important}";
|
|
19741
19773
|
|
|
19742
19774
|
class FloatingMenuItem {
|
|
19743
19775
|
constructor(hostRef) {
|
|
19744
19776
|
registerInstance(this, hostRef);
|
|
19745
19777
|
this.hover = true;
|
|
19778
|
+
this.disabled = false;
|
|
19746
19779
|
}
|
|
19747
19780
|
render() {
|
|
19748
19781
|
return (hAsync(Host, { class: "p-floating-menu-item" }, hAsync("slot", null)));
|
|
@@ -19752,11 +19785,12 @@ class FloatingMenuItem {
|
|
|
19752
19785
|
"$flags$": 9,
|
|
19753
19786
|
"$tagName$": "p-floating-menu-item",
|
|
19754
19787
|
"$members$": {
|
|
19755
|
-
"hover": [516]
|
|
19788
|
+
"hover": [516],
|
|
19789
|
+
"disabled": [516]
|
|
19756
19790
|
},
|
|
19757
19791
|
"$listeners$": undefined,
|
|
19758
19792
|
"$lazyBundleId$": "-",
|
|
19759
|
-
"$attrsToReflect$": [["hover", "hover"]]
|
|
19793
|
+
"$attrsToReflect$": [["hover", "hover"], ["disabled", "disabled"]]
|
|
19760
19794
|
}; }
|
|
19761
19795
|
}
|
|
19762
19796
|
|
|
@@ -21599,7 +21633,7 @@ class TabItem {
|
|
|
21599
21633
|
}; }
|
|
21600
21634
|
}
|
|
21601
21635
|
|
|
21602
|
-
const tableComponentCss = ".fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.bottom-4{bottom:1rem!important}.left-1\\/2{left:50%!important}.flex{display:flex!important}.hidden{display:none!important}.flex-shrink{flex-shrink:1!important}.-translate-x-1\\/2{--tw-translate-x:-50%!important}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}*{box-sizing:border-box}p-table{display:flex;flex-direction:column;position:relative}p-table .p-input[type=checkbox]{flex-shrink:0}p-table p-table-container{position:relative}p-table p-table-container p-floating-menu-container{--tw-translate-x:-50%;animation:floatingMenuContainerIn .3s ease forwards!important;bottom:1rem;left:50%;position:fixed;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:40rem){p-table p-table-container p-floating-menu-container{bottom:4rem;position:absolute}}p-table p-table-container p-floating-menu-container:not(.shown){display:none}p-table p-table-container p-floating-menu-container.inactive{animation:floatingMenuContainerOut .3s ease forwards!important}p-table p-table-container p-floating-menu-container .hide-mobile{display:none}@media (min-width:40rem){p-table p-table-container p-floating-menu-container .hide-mobile{display:block}}@keyframes floatingMenuContainerOut{0%{display:flex;opacity:1;transform:translateY(0) translateX(-50%)}99%{display:flex;opacity:0;transform:translateY(100%) translateX(-50%)}to{display:none;opacity:0;transform:translateY(100%) translateX(-50%)}}@keyframes floatingMenuContainerIn{0%{display:none;opacity:0;transform:translateY(100%) translateX(-50%)}1%{display:flex;opacity:0;transform:translateY(100%) translateX(-50%)}to{display:flex;opacity:1;transform:translateY(0) translateX(-50%)}}@media (min-width:40rem){.tablet\\:block{display:block!important}}.static{position:static!important}.mx-0{margin-left:0!important;margin-right:0!important}.mb-14{margin-bottom:3.5rem!important}.mb-6{margin-bottom:1.5rem!important}.table{display:table!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.max-w-\\[20rem\\]{max-width:20rem!important}.flex-1{flex:1 1 0%!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.self-center{align-self:center!important}.rounded{border-radius:.25rem!important}.py-24{padding-bottom:6rem!important;padding-top:6rem!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-storm{--tw-text-opacity:1!important;color:rgb(81 83 107/var(--tw-text-opacity))!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.opacity-0{opacity:0!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}";
|
|
21636
|
+
const tableComponentCss = ".fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.bottom-4{bottom:1rem!important}.left-1\\/2{left:50%!important}.flex{display:flex!important}.hidden{display:none!important}.flex-shrink{flex-shrink:1!important}.-translate-x-1\\/2{--tw-translate-x:-50%!important}.-translate-x-1\\/2,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}*{box-sizing:border-box}p-table{display:flex;flex-direction:column;position:relative}p-table .p-input[type=checkbox]{flex-shrink:0}p-table p-table-container{position:relative}p-table p-table-container p-floating-menu-container{--tw-translate-x:-50%;animation:floatingMenuContainerIn .3s ease forwards!important;bottom:1rem;left:50%;position:fixed;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:40rem){p-table p-table-container p-floating-menu-container{bottom:4rem;position:absolute}}p-table p-table-container p-floating-menu-container:not(.shown){display:none}p-table p-table-container p-floating-menu-container.inactive{animation:floatingMenuContainerOut .3s ease forwards!important}p-table p-table-container p-floating-menu-container .hide-mobile{display:none}@media (min-width:40rem){p-table p-table-container p-floating-menu-container .hide-mobile{display:block}}@keyframes floatingMenuContainerOut{0%{display:flex;opacity:1;transform:translateY(0) translateX(-50%)}99%{display:flex;opacity:0;transform:translateY(100%) translateX(-50%)}to{display:none;opacity:0;transform:translateY(100%) translateX(-50%)}}@keyframes floatingMenuContainerIn{0%{display:none;opacity:0;transform:translateY(100%) translateX(-50%)}1%{display:flex;opacity:0;transform:translateY(100%) translateX(-50%)}to{display:flex;opacity:1;transform:translateY(0) translateX(-50%)}}@media (min-width:40rem){.tablet\\:block{display:block!important}}.static{position:static!important}.mx-0{margin-left:0!important;margin-right:0!important}.mb-14{margin-bottom:3.5rem!important}.mb-6{margin-bottom:1.5rem!important}.ml-auto{margin-left:auto!important}.table{display:table!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.max-w-\\[20rem\\]{max-width:20rem!important}.flex-1{flex:1 1 0%!important}.cursor-pointer{cursor:pointer!important}.resize{resize:both!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.self-center{align-self:center!important}.rounded{border-radius:.25rem!important}.py-24{padding-bottom:6rem!important;padding-top:6rem!important}.text-center{text-align:center!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-storm{--tw-text-opacity:1!important;color:rgb(81 83 107/var(--tw-text-opacity))!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.opacity-0{opacity:0!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}";
|
|
21603
21637
|
|
|
21604
21638
|
class Table {
|
|
21605
21639
|
constructor(hostRef) {
|
|
@@ -21619,7 +21653,6 @@ class Table {
|
|
|
21619
21653
|
this.emptyStateActionClick = createEvent(this, "emptyStateActionClick", 3);
|
|
21620
21654
|
this._ctrlDown = false;
|
|
21621
21655
|
this._hasCustomFilterSlot = false;
|
|
21622
|
-
this._hasFloatingMenuItems = false;
|
|
21623
21656
|
this._floatingMenuShown = false;
|
|
21624
21657
|
this.items = undefined;
|
|
21625
21658
|
this.loading = false;
|
|
@@ -21672,10 +21705,14 @@ class Table {
|
|
|
21672
21705
|
this._locales = {};
|
|
21673
21706
|
this._columns = [];
|
|
21674
21707
|
this._items = [];
|
|
21708
|
+
this._enableRowSelection = this.enableRowSelection;
|
|
21709
|
+
this._rowSelectionLimit = undefined;
|
|
21710
|
+
this._rowActionsFloating = [];
|
|
21711
|
+
this._rowActionsRow = [];
|
|
21675
21712
|
}
|
|
21676
21713
|
componentWillLoad() {
|
|
21677
21714
|
this._hasCustomFilterSlot = !!this._el.querySelector(':scope > [slot="custom-filter"]');
|
|
21678
|
-
this.
|
|
21715
|
+
this._setRowSelectionData();
|
|
21679
21716
|
this._setLocales();
|
|
21680
21717
|
this._parseItems(this.items);
|
|
21681
21718
|
this._generateColumns();
|
|
@@ -21684,7 +21721,7 @@ class Table {
|
|
|
21684
21721
|
this.hasRendered.emit();
|
|
21685
21722
|
}
|
|
21686
21723
|
render() {
|
|
21687
|
-
var _a, _b, _c;
|
|
21724
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
21688
21725
|
return (hAsync(Host, { class: "p-table" }, hAsync("p-table-container", { shadow: this.shadow }, this.enableHeader && (hAsync("p-table-header", {
|
|
21689
21726
|
// quick filters
|
|
21690
21727
|
quickFilters: this.quickFilters, activeQuickFilterIdentifier: this.activeQuickFilterIdentifier, onQuickFilter: ({ detail }) => this.quickFilter.emit(detail),
|
|
@@ -21707,11 +21744,16 @@ class Table {
|
|
|
21707
21744
|
enableExport: this.enableExport, onExport: () => this.export.emit(),
|
|
21708
21745
|
//loading
|
|
21709
21746
|
loading: this.footerLoading
|
|
21710
|
-
})), this.enableFloatingMenu && this.
|
|
21747
|
+
})), this.enableFloatingMenu && this._enableRowSelection ? (hAsync("p-floating-menu-container", { usedInTable: true, class: `${((_b = this.selectedRows) === null || _b === void 0 ? void 0 : _b.length) ? '' : 'inactive'} ${this._floatingMenuShown ? 'shown' : ''}` }, hAsync("p-floating-menu-item", { hover: false, slot: "floating-menu-item", class: ((_c = this._rowActionsFloating) === null || _c === void 0 ? void 0 : _c.length)
|
|
21711
21748
|
? 'hide-mobile'
|
|
21712
|
-
: '' }, this.floatingMenuAmountSelectedTemplate((
|
|
21749
|
+
: '' }, this.floatingMenuAmountSelectedTemplate((_d = this.selectedRows) === null || _d === void 0 ? void 0 : _d.length)), hAsync("p-divider", { class: `mx-0 text-storm ${((_e = this._rowActionsFloating) === null || _e === void 0 ? void 0 : _e.length)
|
|
21713
21750
|
? 'hide-mobile'
|
|
21714
|
-
: ''}`, variant: "vertical", slot: "floating-menu-item" }),
|
|
21751
|
+
: ''}`, variant: "vertical", slot: "floating-menu-item" }), ((_f = this._rowActionsFloating) === null || _f === void 0 ? void 0 : _f.length) &&
|
|
21752
|
+
this._rowActionsFloating.map((a) => (hAsync("p-floating-menu-item", { slot: "floating-menu-item", disabled: a.disabled, onClick: () => !a.disabled &&
|
|
21753
|
+
!!a.action &&
|
|
21754
|
+
a.type === 'single'
|
|
21755
|
+
? a.action(this.selectedRows[0], false)
|
|
21756
|
+
: a.action(this.selectedRows, true) }, a.label, ' ', hAsync("p-icon", { variant: a.icon, rotate: a.iconRotate, flip: a.iconFlip })))), ((_g = this._rowActionsFloating) === null || _g === void 0 ? void 0 : _g.length) && (hAsync("p-divider", { class: "mx-0 text-storm", variant: "vertical", slot: "floating-menu-item" })), hAsync("p-floating-menu-item", { slot: "floating-menu-item", onClick: () => this._selectAllChange(null, false) }, hAsync("p-icon", { variant: "negative" })))) : (''))));
|
|
21715
21757
|
}
|
|
21716
21758
|
async _setLocales() {
|
|
21717
21759
|
this._locales = await getLocaleComponentStrings(this._el);
|
|
@@ -21748,6 +21790,44 @@ class Table {
|
|
|
21748
21790
|
}
|
|
21749
21791
|
this._items = JSON.parse(items);
|
|
21750
21792
|
}
|
|
21793
|
+
_setRowSelectionData() {
|
|
21794
|
+
if (this._resizeTimeout) {
|
|
21795
|
+
clearTimeout(this._resizeTimeout);
|
|
21796
|
+
}
|
|
21797
|
+
// We add a timeout here because it's a lot easier on the machine to do these when someone is done
|
|
21798
|
+
// resizing and playing around with their browser
|
|
21799
|
+
this._resizeTimeout = setTimeout(() => {
|
|
21800
|
+
var _a, _b;
|
|
21801
|
+
const mobile = isMobile();
|
|
21802
|
+
// we hack this to any[] to make it work..
|
|
21803
|
+
const actions = Array.from(this._el.querySelectorAll(':scope > p-table-row-action'));
|
|
21804
|
+
this._rowActionsRow = actions.filter((a) => a.type === 'both' || a.type === 'single');
|
|
21805
|
+
this._rowActionsFloating = actions
|
|
21806
|
+
.filter((a) => a.type === 'both' || a.type === 'multi' || mobile)
|
|
21807
|
+
.map((a) => {
|
|
21808
|
+
var _a;
|
|
21809
|
+
if (a.type === 'single') {
|
|
21810
|
+
a.disabled = ((_a = this.selectedRows) === null || _a === void 0 ? void 0 : _a.length) > 1;
|
|
21811
|
+
}
|
|
21812
|
+
return a;
|
|
21813
|
+
});
|
|
21814
|
+
let rowSelectionLimit = this.rowSelectionLimit;
|
|
21815
|
+
if (mobile && // we're mobile
|
|
21816
|
+
((_a = this._rowActionsFloating) === null || _a === void 0 ? void 0 : _a.length) && // we have atleast 1 item in _rowActionsFloating
|
|
21817
|
+
((rowSelectionLimit !== undefined && this.enableRowSelection) ||
|
|
21818
|
+
!this.enableRowSelection)) {
|
|
21819
|
+
rowSelectionLimit = 1;
|
|
21820
|
+
}
|
|
21821
|
+
this._rowSelectionLimit = rowSelectionLimit;
|
|
21822
|
+
let enableRowSelection = this.enableRowSelection;
|
|
21823
|
+
if (mobile && // we're mobile
|
|
21824
|
+
((_b = this._rowActionsFloating) === null || _b === void 0 ? void 0 : _b.length) && // we have atleast 1 item in _rowActionsFloating
|
|
21825
|
+
!enableRowSelection) {
|
|
21826
|
+
enableRowSelection = true;
|
|
21827
|
+
}
|
|
21828
|
+
this._enableRowSelection = enableRowSelection;
|
|
21829
|
+
}, 200);
|
|
21830
|
+
}
|
|
21751
21831
|
_generateColumns() {
|
|
21752
21832
|
const definitions = this._el.querySelectorAll('p-table-column');
|
|
21753
21833
|
const definitionsArray = Array.from(definitions);
|
|
@@ -21763,19 +21843,29 @@ class Table {
|
|
|
21763
21843
|
if (this.loading) {
|
|
21764
21844
|
return Array.from({
|
|
21765
21845
|
length: this.amountOfLoadingRows,
|
|
21766
|
-
}, (_, i) => (hAsync("p-table-row", { enableHover: this.
|
|
21846
|
+
}, (_, i) => (hAsync("p-table-row", { enableHover: this._enableRowSelection || this.enableRowClick }, this._getLoadingColumns(i))));
|
|
21767
21847
|
}
|
|
21768
21848
|
if (!this._items.length) {
|
|
21769
21849
|
return this._getEmptyState();
|
|
21770
21850
|
}
|
|
21771
|
-
return this._items.map((item, index) => (hAsync("p-table-row", { enableHover: this.
|
|
21851
|
+
return this._items.map((item, index) => (hAsync("p-table-row", { enableHover: this._enableRowSelection || this.enableRowClick, onClick: (ev) => this._rowClick(ev, index) }, this._getRowColumns(item, index))));
|
|
21772
21852
|
}
|
|
21773
21853
|
_getRowColumns(item, index) {
|
|
21774
|
-
|
|
21854
|
+
var _a;
|
|
21855
|
+
const columns = this._columns.map((col, colIndex) => {
|
|
21775
21856
|
return (hAsync("p-table-cell", { definition: col, item: item, checkbox: colIndex === 0 || col.hasCheckbox
|
|
21776
21857
|
? this._getCheckbox(index)
|
|
21777
|
-
: null, index: colIndex, rowIndex: index }));
|
|
21858
|
+
: null, index: colIndex, rowIndex: index, tableHasActions: !!this._rowActionsRow.length && !isMobile() }));
|
|
21778
21859
|
});
|
|
21860
|
+
if (((_a = this._rowActionsRow) === null || _a === void 0 ? void 0 : _a.length) && !isMobile()) {
|
|
21861
|
+
const lastDef = this._columns[this._columns.length - 1];
|
|
21862
|
+
columns.push(hAsync("p-table-cell", { variant: "actions", definition: lastDef, item: item, index: this._columns.length - 1, rowIndex: index, tableHasActions: !!this._rowActionsRow.length }, hAsync("div", { slot: "actions", class: "flex ml-auto gap-2 items-center" }, this._rowActionsRow.map((a) => (hAsync("p-tooltip", { content: a.label }, hAsync("p-button", { "data-is-action": true, variant: "secondary", slot: "trigger", icon: a.icon, iconRotate: a.iconRotate, iconFlip: a.iconFlip, iconOnly: true, size: "small", onClick: () => {
|
|
21863
|
+
var _a;
|
|
21864
|
+
return typeof a.action === 'function' &&
|
|
21865
|
+
((_a = a.action) === null || _a === void 0 ? void 0 : _a.call(a, item, false));
|
|
21866
|
+
} })))))));
|
|
21867
|
+
}
|
|
21868
|
+
return columns;
|
|
21779
21869
|
}
|
|
21780
21870
|
_getLoadingColumns(index) {
|
|
21781
21871
|
return this._columns.map((col, colIndex) => {
|
|
@@ -21785,21 +21875,23 @@ class Table {
|
|
|
21785
21875
|
});
|
|
21786
21876
|
}
|
|
21787
21877
|
_getCheckbox(rowIndex, variant = 'default') {
|
|
21788
|
-
|
|
21878
|
+
var _a;
|
|
21879
|
+
if (!this._enableRowSelection ||
|
|
21880
|
+
(!this.selectionKey && !((_a = this._rowActionsFloating) === null || _a === void 0 ? void 0 : _a.length))) {
|
|
21789
21881
|
return;
|
|
21790
21882
|
}
|
|
21791
21883
|
if (variant === 'loading') {
|
|
21792
21884
|
return hAsync("p-loader", { variant: "ghost", class: "h-6 w-6 rounded" });
|
|
21793
21885
|
}
|
|
21794
21886
|
if (variant === 'header') {
|
|
21795
|
-
return (hAsync("input", { class: `p-input ${this.
|
|
21887
|
+
return (hAsync("input", { class: `p-input ${this._rowSelectionLimit !== undefined && 'opacity-0'}`, type: "checkbox", onChange: (ev) => this._selectAllChange(ev), checked: this._selectionContainsAll(), indeterminate: this._selectionIndeterminate(), disabled: this._rowSelectionLimit !== undefined }));
|
|
21796
21888
|
}
|
|
21797
21889
|
const item = this._items[rowIndex];
|
|
21798
|
-
const selectionContains = this._selectionContains(
|
|
21890
|
+
const selectionContains = this._selectionContains(rowIndex);
|
|
21799
21891
|
return (hAsync("input", { class: "p-input", type: "checkbox", onChange: (ev) => this._checkboxChange(ev === null || ev === void 0 ? void 0 : ev.target, rowIndex), disabled: (this.canSelectKey && !item[this.canSelectKey]) ||
|
|
21800
|
-
(this.
|
|
21892
|
+
(this._rowSelectionLimit !== undefined &&
|
|
21801
21893
|
!selectionContains &&
|
|
21802
|
-
this.selectedRows.length === this.
|
|
21894
|
+
this.selectedRows.length === this._rowSelectionLimit), checked: selectionContains }));
|
|
21803
21895
|
}
|
|
21804
21896
|
_getEmptyState() {
|
|
21805
21897
|
var _a;
|
|
@@ -21810,7 +21902,7 @@ class Table {
|
|
|
21810
21902
|
this.emptyStateActionClick.emit(null) }, hAsync("p-illustration", { variant: "empty-state-add", class: "mb-6" }), hAsync("p", { class: "text-storm-default font-semibold" }, this.emptyStateHeader()), hAsync("p", { class: "mb-6 text-sm text-storm-medium" }, this.emptyStateContent()), this.enableEmptyStateAction && (hAsync("p-button", { variant: "secondary", icon: "plus", size: "small" }, this.emptyStateAction()))));
|
|
21811
21903
|
}
|
|
21812
21904
|
_selectAllChange($event, forceValue) {
|
|
21813
|
-
if (!this.
|
|
21905
|
+
if (!this._enableRowSelection) {
|
|
21814
21906
|
return;
|
|
21815
21907
|
}
|
|
21816
21908
|
const value = forceValue === undefined
|
|
@@ -21823,14 +21915,14 @@ class Table {
|
|
|
21823
21915
|
if (this.canSelectKey && !row[this.canSelectKey]) {
|
|
21824
21916
|
continue;
|
|
21825
21917
|
}
|
|
21826
|
-
if (this._selectionContains(
|
|
21918
|
+
if (this._selectionContains(i)) {
|
|
21827
21919
|
continue;
|
|
21828
21920
|
}
|
|
21829
21921
|
toAdd.push(row);
|
|
21830
21922
|
this.rowSelected.emit(row);
|
|
21831
|
-
if (this.
|
|
21923
|
+
if (this._rowSelectionLimit !== undefined &&
|
|
21832
21924
|
this.selectedRows.length + toAdd.length ===
|
|
21833
|
-
this.
|
|
21925
|
+
this._rowSelectionLimit) {
|
|
21834
21926
|
break;
|
|
21835
21927
|
}
|
|
21836
21928
|
}
|
|
@@ -21854,13 +21946,13 @@ class Table {
|
|
|
21854
21946
|
this.selectedRowsChange.emit(this.selectedRows);
|
|
21855
21947
|
}
|
|
21856
21948
|
_checkboxChange(target, index) {
|
|
21857
|
-
if (!this.
|
|
21949
|
+
if (!this._enableRowSelection) {
|
|
21858
21950
|
return;
|
|
21859
21951
|
}
|
|
21860
21952
|
const value = this._getCheckedValue(target);
|
|
21861
21953
|
if (value &&
|
|
21862
|
-
this.
|
|
21863
|
-
this.selectedRows.length >= this.
|
|
21954
|
+
this._rowSelectionLimit !== undefined &&
|
|
21955
|
+
this.selectedRows.length >= this._rowSelectionLimit) {
|
|
21864
21956
|
target.checked = false;
|
|
21865
21957
|
return;
|
|
21866
21958
|
}
|
|
@@ -21870,7 +21962,10 @@ class Table {
|
|
|
21870
21962
|
return;
|
|
21871
21963
|
}
|
|
21872
21964
|
if (value) {
|
|
21873
|
-
this.selectedRows = [
|
|
21965
|
+
this.selectedRows = [
|
|
21966
|
+
...this.selectedRows,
|
|
21967
|
+
Object.assign(Object.assign({}, row), { index }),
|
|
21968
|
+
];
|
|
21874
21969
|
this.selectedRowsChange.emit(this.selectedRows);
|
|
21875
21970
|
this.rowSelected.emit(row);
|
|
21876
21971
|
if (this.enableFloatingMenu && !this._floatingMenuShown) {
|
|
@@ -21878,7 +21973,7 @@ class Table {
|
|
|
21878
21973
|
}
|
|
21879
21974
|
return;
|
|
21880
21975
|
}
|
|
21881
|
-
const indexOfToRemove = this._selectionContains(
|
|
21976
|
+
const indexOfToRemove = this._selectionContains(index, true);
|
|
21882
21977
|
// we need to do this, because splice does not trigger the selection setter.
|
|
21883
21978
|
const selection = [...this.selectedRows];
|
|
21884
21979
|
selection.splice(indexOfToRemove, 1);
|
|
@@ -21892,9 +21987,8 @@ class Table {
|
|
|
21892
21987
|
_getSelectionValue(row, index) {
|
|
21893
21988
|
return this.selectionKey ? (row === null || row === void 0 ? void 0 : row[this.selectionKey]) || index : index;
|
|
21894
21989
|
}
|
|
21895
|
-
_selectionContains(
|
|
21896
|
-
const returnValue = this.selectedRows.findIndex((item) =>
|
|
21897
|
-
this._getSelectionValue(item, index));
|
|
21990
|
+
_selectionContains(index, returnIndex = false) {
|
|
21991
|
+
const returnValue = this.selectedRows.findIndex((item) => item.index === index);
|
|
21898
21992
|
return !returnIndex ? returnValue >= 0 : returnValue;
|
|
21899
21993
|
}
|
|
21900
21994
|
_selectionContainsAll() {
|
|
@@ -21903,13 +21997,12 @@ class Table {
|
|
|
21903
21997
|
if (!((_a = this._items) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
21904
21998
|
return false;
|
|
21905
21999
|
}
|
|
21906
|
-
if (this.
|
|
21907
|
-
this.selectedRows.length === this.
|
|
22000
|
+
if (this._rowSelectionLimit !== undefined &&
|
|
22001
|
+
this.selectedRows.length === this._rowSelectionLimit) {
|
|
21908
22002
|
return true;
|
|
21909
22003
|
}
|
|
21910
22004
|
for (let i = 0; i < ((_b = this._items) === null || _b === void 0 ? void 0 : _b.length); i++) {
|
|
21911
|
-
const
|
|
21912
|
-
const contains = this._selectionContains(item, i);
|
|
22005
|
+
const contains = this._selectionContains(i);
|
|
21913
22006
|
if (!contains) {
|
|
21914
22007
|
returnValue = false;
|
|
21915
22008
|
break;
|
|
@@ -21922,14 +22015,13 @@ class Table {
|
|
|
21922
22015
|
if (!((_a = this._items) === null || _a === void 0 ? void 0 : _a.length) || !((_b = this.selectedRows) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
21923
22016
|
return false;
|
|
21924
22017
|
}
|
|
21925
|
-
if (this.
|
|
21926
|
-
this.selectedRows.length === this.
|
|
22018
|
+
if (this._rowSelectionLimit !== undefined &&
|
|
22019
|
+
this.selectedRows.length === this._rowSelectionLimit) {
|
|
21927
22020
|
return false;
|
|
21928
22021
|
}
|
|
21929
22022
|
let containsCount = 0;
|
|
21930
22023
|
for (let i = 0; i < ((_c = this._items) === null || _c === void 0 ? void 0 : _c.length); i++) {
|
|
21931
|
-
const
|
|
21932
|
-
const contains = this._selectionContains(item, i);
|
|
22024
|
+
const contains = this._selectionContains(i);
|
|
21933
22025
|
if (contains) {
|
|
21934
22026
|
containsCount++;
|
|
21935
22027
|
}
|
|
@@ -21955,7 +22047,7 @@ class Table {
|
|
|
21955
22047
|
});
|
|
21956
22048
|
return;
|
|
21957
22049
|
}
|
|
21958
|
-
if (!this.
|
|
22050
|
+
if (!this._enableRowSelection) {
|
|
21959
22051
|
return;
|
|
21960
22052
|
}
|
|
21961
22053
|
const checkbox = row === null || row === void 0 ? void 0 : row.querySelector('input[type="checkbox"]');
|
|
@@ -21991,7 +22083,10 @@ class Table {
|
|
|
21991
22083
|
}
|
|
21992
22084
|
get _el() { return getElement(this); }
|
|
21993
22085
|
static get watchers() { return {
|
|
21994
|
-
"items": ["_parseItems"]
|
|
22086
|
+
"items": ["_parseItems"],
|
|
22087
|
+
"enableRowSelection": ["_setRowSelectionData"],
|
|
22088
|
+
"rowSelectionLimit": ["_setRowSelectionData"],
|
|
22089
|
+
"selectedRows": ["_setRowSelectionData"]
|
|
21995
22090
|
}; }
|
|
21996
22091
|
static get style() { return tableComponentCss; }
|
|
21997
22092
|
static get cmpMeta() { return {
|
|
@@ -22043,9 +22138,13 @@ class Table {
|
|
|
22043
22138
|
"shadow": [4],
|
|
22044
22139
|
"_locales": [32],
|
|
22045
22140
|
"_columns": [32],
|
|
22046
|
-
"_items": [32]
|
|
22141
|
+
"_items": [32],
|
|
22142
|
+
"_enableRowSelection": [32],
|
|
22143
|
+
"_rowSelectionLimit": [32],
|
|
22144
|
+
"_rowActionsFloating": [32],
|
|
22145
|
+
"_rowActionsRow": [32]
|
|
22047
22146
|
},
|
|
22048
|
-
"$listeners$": [[16, "localeChanged", "_setLocales"], [16, "tableDefinitionChanged", "onTableDefinitionUpdated"], [4, "keydown", "keyDown"], [4, "keyup", "keyUp"], [4, "visibilitychange", "visibilityChange"]],
|
|
22147
|
+
"$listeners$": [[16, "localeChanged", "_setLocales"], [16, "tableDefinitionChanged", "onTableDefinitionUpdated"], [4, "keydown", "keyDown"], [4, "keyup", "keyUp"], [4, "visibilitychange", "visibilityChange"], [9, "resize", "_setRowSelectionData"]],
|
|
22049
22148
|
"$lazyBundleId$": "-",
|
|
22050
22149
|
"$attrsToReflect$": [["page", "page"]]
|
|
22051
22150
|
}; }
|
|
@@ -22055,7 +22154,7 @@ function isTableColumnSizesKey(x, k) {
|
|
|
22055
22154
|
return k in x;
|
|
22056
22155
|
}
|
|
22057
22156
|
|
|
22058
|
-
const tableCellComponentCss = ".
|
|
22157
|
+
const tableCellComponentCss = ".gap-4{gap:1rem!important}*{box-sizing:border-box}p-table-cell{align-items:center;gap:1rem}.static{position:static!important}.flex{display:flex!important}.table-cell{display:table-cell!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.w-1\\/12{width:8.333333%!important}.w-10\\/12{width:83.333333%!important}.w-11\\/12{width:91.666667%!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-auto{width:auto!important}.w-full{width:100%!important}.flex-1{flex:1 1 0%!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.rounded{border-radius:.25rem!important}.pr-4{padding-right: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}.group:hover .group-hover\\:flex{display:flex!important}.group:hover .group-hover\\:hidden{display:none!important}@media (min-width:40rem){.tablet\\:w-1\\/12{width:8.333333%!important}.tablet\\:w-10\\/12{width:83.333333%!important}.tablet\\:w-11\\/12{width:91.666667%!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}}@media (min-width:64rem){.desktop-xs\\:w-1\\/12{width:8.333333%!important}.desktop-xs\\:w-10\\/12{width:83.333333%!important}.desktop-xs\\:w-11\\/12{width:91.666667%!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}}@media (min-width:80rem){.desktop-sm\\:w-1\\/12{width:8.333333%!important}.desktop-sm\\:w-10\\/12{width:83.333333%!important}.desktop-sm\\:w-11\\/12{width:91.666667%!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}}@media (min-width:85.375rem){.desktop\\:w-1\\/12{width:8.333333%!important}.desktop\\:w-10\\/12{width:83.333333%!important}.desktop\\:w-11\\/12{width:91.666667%!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}}@media (min-width:90rem){.desktop-lg\\:w-1\\/12{width:8.333333%!important}.desktop-lg\\:w-10\\/12{width:83.333333%!important}.desktop-lg\\:w-11\\/12{width:91.666667%!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}}@media (min-width:120rem){.desktop-xl\\:w-1\\/12{width:8.333333%!important}.desktop-xl\\:w-10\\/12{width:83.333333%!important}.desktop-xl\\:w-11\\/12{width:91.666667%!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}}";
|
|
22059
22158
|
|
|
22060
22159
|
class TableCell {
|
|
22061
22160
|
constructor(hostRef) {
|
|
@@ -22066,6 +22165,7 @@ class TableCell {
|
|
|
22066
22165
|
this.definition = undefined;
|
|
22067
22166
|
this.item = undefined;
|
|
22068
22167
|
this.value = undefined;
|
|
22168
|
+
this.tableHasActions = false;
|
|
22069
22169
|
this.checkbox = undefined;
|
|
22070
22170
|
this.template = ({ value, }) => value;
|
|
22071
22171
|
}
|
|
@@ -22084,21 +22184,32 @@ class TableCell {
|
|
|
22084
22184
|
};
|
|
22085
22185
|
}
|
|
22086
22186
|
render() {
|
|
22087
|
-
return (hAsync(Host, { class: Object.assign({ 'p-table-cell': true, [`variant-${this.variant}`]: true }, this._getColumnClasses()) }, this.checkbox, this.
|
|
22187
|
+
return (hAsync(Host, { class: Object.assign({ 'p-table-cell': true, [`variant-${this.variant}`]: true }, this._getColumnClasses()) }, this.checkbox, this._getContent()));
|
|
22188
|
+
}
|
|
22189
|
+
_getContent() {
|
|
22190
|
+
if (this.variant === 'loading') {
|
|
22191
|
+
return (hAsync("p-loader", { variant: "ghost", class: "h-6 w-full flex-1 rounded" }));
|
|
22192
|
+
}
|
|
22193
|
+
if (this.variant === 'actions') {
|
|
22194
|
+
return hAsync("slot", { name: "actions" });
|
|
22195
|
+
}
|
|
22196
|
+
return (hAsync("div", { class: {
|
|
22088
22197
|
flex: true,
|
|
22089
22198
|
'justify-start': this.definition.align === 'start',
|
|
22090
22199
|
'justify-center': this.definition.align === 'center',
|
|
22091
22200
|
'justify-end': this.definition.align === 'end',
|
|
22092
|
-
} }, this.variant === 'header' ? (this.data.value) : this.definition.useSlot ? (hAsync("slot", null)) : (this.template(this.data))))
|
|
22201
|
+
} }, this.variant === 'header' ? (this.data.value) : this.definition.useSlot ? (hAsync("slot", null)) : (this.template(this.data))));
|
|
22093
22202
|
}
|
|
22094
22203
|
_getColumnClasses() {
|
|
22095
22204
|
var _a, _b, _c, _d, _e, _f;
|
|
22096
22205
|
const sizes = this.definition ? this._getSizes(this.definition) : {};
|
|
22097
|
-
return Object.assign({ 'justify-start': !((_a = this.definition) === null || _a === void 0 ? void 0 : _a.align) || ((_b = this.definition) === null || _b === void 0 ? void 0 : _b.align) === 'start', 'justify-center': ((_c = this.definition) === null || _c === void 0 ? void 0 : _c.align) === 'center', 'justify-end': ((_d = this.definition) === null || _d === void 0 ? void 0 : _d.align) === 'end', 'font-semibold': this.variant !== 'header' && ((_e = this.definition) === null || _e === void 0 ? void 0 : _e.type) === 'th', 'text-storm-dark': this.variant !== 'header' && ((_f = this.definition) === null || _f === void 0 ? void 0 : _f.type) === 'th', 'pr-4': this.definition.isLast === false
|
|
22206
|
+
return Object.assign({ 'justify-start': !((_a = this.definition) === null || _a === void 0 ? void 0 : _a.align) || ((_b = this.definition) === null || _b === void 0 ? void 0 : _b.align) === 'start', 'justify-center': ((_c = this.definition) === null || _c === void 0 ? void 0 : _c.align) === 'center', 'justify-end': ((_d = this.definition) === null || _d === void 0 ? void 0 : _d.align) === 'end', 'font-semibold': this.variant !== 'header' && ((_e = this.definition) === null || _e === void 0 ? void 0 : _e.type) === 'th', 'text-storm-dark': this.variant !== 'header' && ((_f = this.definition) === null || _f === void 0 ? void 0 : _f.type) === 'th', 'pr-4': this.definition.isLast === false, 'group-hover:hidden': this.definition.isLast &&
|
|
22207
|
+
this.tableHasActions &&
|
|
22208
|
+
this.variant !== 'actions', 'group-hover:flex': this.variant === 'actions' && this.tableHasActions, hidden: this.variant === 'actions' && this.tableHasActions, flex: this.variant !== 'actions' }, sizes);
|
|
22098
22209
|
}
|
|
22099
22210
|
/*
|
|
22100
22211
|
With this, we shall hack the system in ways no one would ever have thought.
|
|
22101
|
-
|
|
22212
|
+
|
|
22102
22213
|
<div class="w-1/12 w-2/12 w-3/12 w-4/12 w-5/12 w-6/12 w-7/12 w-8/12 w-9/12 w-10/12 w-11/12 w-12/12"></div>
|
|
22103
22214
|
<div class="tablet:w-1/12 tablet:w-2/12 tablet:w-3/12 tablet:w-4/12 tablet:w-5/12 tablet:w-6/12 tablet:w-7/12 tablet:w-8/12 tablet:w-9/12 tablet:w-10/12 tablet:w-11/12 tablet:w-12/12"></div>
|
|
22104
22215
|
<div class="desktop-xs:w-1/12 desktop-xs:w-2/12 desktop-xs:w-3/12 desktop-xs:w-4/12 desktop-xs:w-5/12 desktop-xs:w-6/12 desktop-xs:w-7/12 desktop-xs:w-8/12 desktop-xs:w-9/12 desktop-xs:w-10/12 desktop-xs:w-11/12 desktop-xs:w-12/12"></div>
|
|
@@ -22108,7 +22219,7 @@ class TableCell {
|
|
|
22108
22219
|
<div class="desktop-lg:w-1/12 desktop-lg:w-2/12 desktop-lg:w-3/12 desktop-lg:w-4/12 desktop-lg:w-5/12 desktop-lg:w-6/12 desktop-lg:w-7/12 desktop-lg:w-8/12 desktop-lg:w-9/12 desktop-lg:w-10/12 desktop-lg:w-11/12 desktop-lg:w-12/12"></div>
|
|
22109
22220
|
<div class="desktop-xl:w-1/12 desktop-xl:w-2/12 desktop-xl:w-3/12 desktop-xl:w-4/12 desktop-xl:w-5/12 desktop-xl:w-6/12 desktop-xl:w-7/12 desktop-xl:w-8/12 desktop-xl:w-9/12 desktop-xl:w-10/12 desktop-xl:w-11/12 desktop-xl:w-12/12"></div>
|
|
22110
22221
|
|
|
22111
|
-
|
|
22222
|
+
|
|
22112
22223
|
⠀⠀⠀⠀⠀⣠⣴⣶⣿⣿⠿⣷⣶⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣷⠿⣿⣿⣶⣦⣀⠀⠀⠀⠀⠀
|
|
22113
22224
|
⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣶⣦⣬⡉⠒⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠚⢉⣥⣴⣾⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀
|
|
22114
22225
|
⠀⠀⠀⡾⠿⠛⠛⠛⠛⠿⢿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣿⠿⠿⠛⠛⠛⠛⠿⢧⠀⠀⠀
|
|
@@ -22207,6 +22318,7 @@ class TableCell {
|
|
|
22207
22318
|
"definition": [16],
|
|
22208
22319
|
"item": [8],
|
|
22209
22320
|
"value": [8],
|
|
22321
|
+
"tableHasActions": [4, "table-has-actions"],
|
|
22210
22322
|
"checkbox": [8],
|
|
22211
22323
|
"template": [16]
|
|
22212
22324
|
},
|
|
@@ -23347,7 +23459,7 @@ class TableRow {
|
|
|
23347
23459
|
render() {
|
|
23348
23460
|
return (hAsync(Host, { class: `p-table-row variant-${this.variant} ${this.enableHover &&
|
|
23349
23461
|
this.variant === 'default' &&
|
|
23350
|
-
'enable-hover'}` }, hAsync("div", { class: "content" }, hAsync("slot", null)), this.variant === 'default' && hAsync("p-divider", { class: "m-0" })));
|
|
23462
|
+
'enable-hover'} group` }, hAsync("div", { class: "content" }, hAsync("slot", null)), this.variant === 'default' && hAsync("p-divider", { class: "m-0" })));
|
|
23351
23463
|
}
|
|
23352
23464
|
static get style() { return tableRowComponentCss; }
|
|
23353
23465
|
static get cmpMeta() { return {
|
|
@@ -23363,6 +23475,40 @@ class TableRow {
|
|
|
23363
23475
|
}; }
|
|
23364
23476
|
}
|
|
23365
23477
|
|
|
23478
|
+
class TableRowAction {
|
|
23479
|
+
constructor(hostRef) {
|
|
23480
|
+
registerInstance(this, hostRef);
|
|
23481
|
+
this.type = 'both';
|
|
23482
|
+
this.icon = undefined;
|
|
23483
|
+
this.iconOnly = false;
|
|
23484
|
+
this.iconFlip = undefined;
|
|
23485
|
+
this.iconRotate = undefined;
|
|
23486
|
+
this.label = undefined;
|
|
23487
|
+
this.action = undefined;
|
|
23488
|
+
this.disabled = false;
|
|
23489
|
+
}
|
|
23490
|
+
render() {
|
|
23491
|
+
return;
|
|
23492
|
+
}
|
|
23493
|
+
static get cmpMeta() { return {
|
|
23494
|
+
"$flags$": 0,
|
|
23495
|
+
"$tagName$": "p-table-row-action",
|
|
23496
|
+
"$members$": {
|
|
23497
|
+
"type": [1537],
|
|
23498
|
+
"icon": [1],
|
|
23499
|
+
"iconOnly": [4, "icon-only"],
|
|
23500
|
+
"iconFlip": [1, "icon-flip"],
|
|
23501
|
+
"iconRotate": [2, "icon-rotate"],
|
|
23502
|
+
"label": [1],
|
|
23503
|
+
"action": [16],
|
|
23504
|
+
"disabled": [4]
|
|
23505
|
+
},
|
|
23506
|
+
"$listeners$": undefined,
|
|
23507
|
+
"$lazyBundleId$": "-",
|
|
23508
|
+
"$attrsToReflect$": [["type", "type"]]
|
|
23509
|
+
}; }
|
|
23510
|
+
}
|
|
23511
|
+
|
|
23366
23512
|
const toastComponentCss = "/*!@.flex*/.flex.sc-p-toast{display:flex!important}/*!@.w-full*/.w-full.sc-p-toast{width:100%!important}/*!@.items-center*/.items-center.sc-p-toast{align-items:center!important}/*!@.justify-between*/.justify-between.sc-p-toast{justify-content:space-between!important}/*!@.overflow-hidden*/.overflow-hidden.sc-p-toast{overflow:hidden!important}/*!@.text-ellipsis*/.text-ellipsis.sc-p-toast{text-overflow:ellipsis!important}/*!@.rounded*/.rounded.sc-p-toast{border-radius:.25rem!important}/*!@.border-l-4*/.border-l-4.sc-p-toast{border-left-width:4px!important}/*!@.border-solid*/.border-solid.sc-p-toast{border-style:solid!important}/*!@.border-l-negative*/.border-l-negative.sc-p-toast{--tw-border-opacity:1!important;border-left-color:rgb(185 30 40/var(--tw-border-opacity))!important}/*!@.border-l-positive*/.border-l-positive.sc-p-toast{--tw-border-opacity:1!important;border-left-color:rgb(40 209 124/var(--tw-border-opacity))!important}/*!@.border-l-unbiased*/.border-l-unbiased.sc-p-toast{--tw-border-opacity:1!important;border-left-color:rgb(255 199 45/var(--tw-border-opacity))!important}/*!@.bg-white*/.bg-white.sc-p-toast{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}/*!@.p-4*/.p-4.sc-p-toast{padding:1rem!important}/*!@.shadow-4*/.shadow-4.sc-p-toast{--tw-shadow:0px 0.3125rem 1rem rgba(0,24,98,.08),0px 0.0625rem 0.1875rem rgba(0,24,98,.13)!important;--tw-shadow-colored:0px 0.3125rem 1rem var(--tw-shadow-color),0px 0.0625rem 0.1875rem var(--tw-shadow-color)!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important}/*!@**/*.sc-p-toast{box-sizing:border-box}/*!@:host*/.sc-p-toast-h{--tw-bg-opacity:1;--tw-shadow:0px 0.3125rem 1rem rgba(0,24,98,.08),0px 0.0625rem 0.1875rem rgba(0,24,98,.13)!important;--tw-shadow-colored:0px 0.3125rem 1rem var(--tw-shadow-color),0px 0.0625rem 0.1875rem var(--tw-shadow-color)!important;align-items:center;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-left-width:4px!important;border-radius:.25rem;border-style:solid!important;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)!important;box-sizing:border-box;display:flex;gap:.5rem;justify-content:space-between;padding:1rem 1rem 1rem 1.25rem;width:100%}/*!@:host p*/.sc-p-toast-h p.sc-p-toast{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}/*!@:host(.variant-positive)*/.variant-positive.sc-p-toast-h{--tw-border-opacity:1!important;border-left-color:rgb(40 209 124/var(--tw-border-opacity))!important}/*!@:host(.variant-unbiased)*/.variant-unbiased.sc-p-toast-h{--tw-border-opacity:1!important;border-left-color:rgb(255 199 45/var(--tw-border-opacity))!important}/*!@:host(.variant-negative)*/.variant-negative.sc-p-toast-h{--tw-border-opacity:1!important;border-left-color:rgb(185 30 40/var(--tw-border-opacity))!important}/*!@.static*/.static.sc-p-toast{position:static!important}/*!@.min-w-0*/.min-w-0.sc-p-toast{min-width:0!important}/*!@.flex-shrink-0*/.flex-shrink-0.sc-p-toast{flex-shrink:0!important}/*!@.flex-col*/.flex-col.sc-p-toast{flex-direction:column!important}/*!@.text-sm*/.text-sm.sc-p-toast{font-size:.875rem!important;line-height:1.25rem!important}/*!@.font-semibold*/.font-semibold.sc-p-toast{font-weight:600!important}/*!@.text-storm*/.text-storm.sc-p-toast{--tw-text-opacity:1!important;color:rgb(81 83 107/var(--tw-text-opacity))!important}/*!@.text-storm-medium*/.text-storm-medium.sc-p-toast{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}";
|
|
23367
23513
|
|
|
23368
23514
|
class Toast {
|
|
@@ -23651,6 +23797,7 @@ registerComponents([
|
|
|
23651
23797
|
TableFooter,
|
|
23652
23798
|
TableHeader,
|
|
23653
23799
|
TableRow,
|
|
23800
|
+
TableRowAction,
|
|
23654
23801
|
Toast,
|
|
23655
23802
|
ToastContainer,
|
|
23656
23803
|
Tooltip,
|