@paperless/core 1.42.5 → 1.44.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 +28 -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-cc1dbf8c.entry.js +2 -0
- package/dist/build/p-cc1dbf8c.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/p-f9cb528d.entry.js +2 -0
- package/dist/build/p-f9cb528d.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 +27 -0
- package/dist/cjs/p-table-row-action.cjs.entry.js.map +1 -0
- package/dist/cjs/p-table.cjs.entry.js +101 -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 +201 -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 +116 -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 +50 -0
- package/dist/components/p-table-row-action.js.map +1 -0
- package/dist/components/p-table.js +111 -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 +23 -0
- package/dist/esm/p-table-row-action.entry.js.map +1 -0
- package/dist/esm/p-table.entry.js +101 -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-cc1dbf8c.entry.js +2 -0
- package/dist/paperless/p-cc1dbf8c.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/p-f9cb528d.entry.js +2 -0
- package/dist/paperless/p-f9cb528d.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 +47 -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 +107 -4
- package/hydrate/index.js +200 -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,17 @@ 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.loading &&
|
|
21754
|
+
!!a.action &&
|
|
21755
|
+
a.type === 'single'
|
|
21756
|
+
? a.action(this.selectedRows[0], false)
|
|
21757
|
+
: a.action(this.selectedRows, true) }, a.label, ' ', a.loading ? (hAsync("p-loader", null)) : (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
21758
|
}
|
|
21716
21759
|
async _setLocales() {
|
|
21717
21760
|
this._locales = await getLocaleComponentStrings(this._el);
|
|
@@ -21748,6 +21791,44 @@ class Table {
|
|
|
21748
21791
|
}
|
|
21749
21792
|
this._items = JSON.parse(items);
|
|
21750
21793
|
}
|
|
21794
|
+
_setRowSelectionData() {
|
|
21795
|
+
if (this._resizeTimeout) {
|
|
21796
|
+
clearTimeout(this._resizeTimeout);
|
|
21797
|
+
}
|
|
21798
|
+
// We add a timeout here because it's a lot easier on the machine to do these when someone is done
|
|
21799
|
+
// resizing and playing around with their browser
|
|
21800
|
+
this._resizeTimeout = setTimeout(() => {
|
|
21801
|
+
var _a, _b;
|
|
21802
|
+
const mobile = isMobile();
|
|
21803
|
+
// we hack this to any[] to make it work..
|
|
21804
|
+
const actions = Array.from(this._el.querySelectorAll(':scope > p-table-row-action'));
|
|
21805
|
+
this._rowActionsRow = actions.filter((a) => a.type === 'both' || a.type === 'single');
|
|
21806
|
+
this._rowActionsFloating = actions
|
|
21807
|
+
.filter((a) => a.type === 'both' || a.type === 'multi' || mobile)
|
|
21808
|
+
.map((a) => {
|
|
21809
|
+
var _a;
|
|
21810
|
+
if (a.type === 'single') {
|
|
21811
|
+
a.disabled = ((_a = this.selectedRows) === null || _a === void 0 ? void 0 : _a.length) > 1;
|
|
21812
|
+
}
|
|
21813
|
+
return a;
|
|
21814
|
+
});
|
|
21815
|
+
let rowSelectionLimit = this.rowSelectionLimit;
|
|
21816
|
+
if (mobile && // we're mobile
|
|
21817
|
+
((_a = this._rowActionsFloating) === null || _a === void 0 ? void 0 : _a.length) && // we have atleast 1 item in _rowActionsFloating
|
|
21818
|
+
((rowSelectionLimit !== undefined && this.enableRowSelection) ||
|
|
21819
|
+
!this.enableRowSelection)) {
|
|
21820
|
+
rowSelectionLimit = 1;
|
|
21821
|
+
}
|
|
21822
|
+
this._rowSelectionLimit = rowSelectionLimit;
|
|
21823
|
+
let enableRowSelection = this.enableRowSelection;
|
|
21824
|
+
if (mobile && // we're mobile
|
|
21825
|
+
((_b = this._rowActionsFloating) === null || _b === void 0 ? void 0 : _b.length) && // we have atleast 1 item in _rowActionsFloating
|
|
21826
|
+
!enableRowSelection) {
|
|
21827
|
+
enableRowSelection = true;
|
|
21828
|
+
}
|
|
21829
|
+
this._enableRowSelection = enableRowSelection;
|
|
21830
|
+
}, 200);
|
|
21831
|
+
}
|
|
21751
21832
|
_generateColumns() {
|
|
21752
21833
|
const definitions = this._el.querySelectorAll('p-table-column');
|
|
21753
21834
|
const definitionsArray = Array.from(definitions);
|
|
@@ -21763,19 +21844,29 @@ class Table {
|
|
|
21763
21844
|
if (this.loading) {
|
|
21764
21845
|
return Array.from({
|
|
21765
21846
|
length: this.amountOfLoadingRows,
|
|
21766
|
-
}, (_, i) => (hAsync("p-table-row", { enableHover: this.
|
|
21847
|
+
}, (_, i) => (hAsync("p-table-row", { enableHover: this._enableRowSelection || this.enableRowClick }, this._getLoadingColumns(i))));
|
|
21767
21848
|
}
|
|
21768
21849
|
if (!this._items.length) {
|
|
21769
21850
|
return this._getEmptyState();
|
|
21770
21851
|
}
|
|
21771
|
-
return this._items.map((item, index) => (hAsync("p-table-row", { enableHover: this.
|
|
21852
|
+
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
21853
|
}
|
|
21773
21854
|
_getRowColumns(item, index) {
|
|
21774
|
-
|
|
21855
|
+
var _a;
|
|
21856
|
+
const columns = this._columns.map((col, colIndex) => {
|
|
21775
21857
|
return (hAsync("p-table-cell", { definition: col, item: item, checkbox: colIndex === 0 || col.hasCheckbox
|
|
21776
21858
|
? this._getCheckbox(index)
|
|
21777
|
-
: null, index: colIndex, rowIndex: index }));
|
|
21859
|
+
: null, index: colIndex, rowIndex: index, tableHasActions: !!this._rowActionsRow.length && !isMobile() }));
|
|
21778
21860
|
});
|
|
21861
|
+
if (((_a = this._rowActionsRow) === null || _a === void 0 ? void 0 : _a.length) && !isMobile()) {
|
|
21862
|
+
const lastDef = this._columns[this._columns.length - 1];
|
|
21863
|
+
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: () => {
|
|
21864
|
+
var _a;
|
|
21865
|
+
return typeof a.action === 'function' &&
|
|
21866
|
+
((_a = a.action) === null || _a === void 0 ? void 0 : _a.call(a, item, false));
|
|
21867
|
+
} })))))));
|
|
21868
|
+
}
|
|
21869
|
+
return columns;
|
|
21779
21870
|
}
|
|
21780
21871
|
_getLoadingColumns(index) {
|
|
21781
21872
|
return this._columns.map((col, colIndex) => {
|
|
@@ -21785,21 +21876,23 @@ class Table {
|
|
|
21785
21876
|
});
|
|
21786
21877
|
}
|
|
21787
21878
|
_getCheckbox(rowIndex, variant = 'default') {
|
|
21788
|
-
|
|
21879
|
+
var _a;
|
|
21880
|
+
if (!this._enableRowSelection ||
|
|
21881
|
+
(!this.selectionKey && !((_a = this._rowActionsFloating) === null || _a === void 0 ? void 0 : _a.length))) {
|
|
21789
21882
|
return;
|
|
21790
21883
|
}
|
|
21791
21884
|
if (variant === 'loading') {
|
|
21792
21885
|
return hAsync("p-loader", { variant: "ghost", class: "h-6 w-6 rounded" });
|
|
21793
21886
|
}
|
|
21794
21887
|
if (variant === 'header') {
|
|
21795
|
-
return (hAsync("input", { class: `p-input ${this.
|
|
21888
|
+
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
21889
|
}
|
|
21797
21890
|
const item = this._items[rowIndex];
|
|
21798
|
-
const selectionContains = this._selectionContains(
|
|
21891
|
+
const selectionContains = this._selectionContains(rowIndex);
|
|
21799
21892
|
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.
|
|
21893
|
+
(this._rowSelectionLimit !== undefined &&
|
|
21801
21894
|
!selectionContains &&
|
|
21802
|
-
this.selectedRows.length === this.
|
|
21895
|
+
this.selectedRows.length === this._rowSelectionLimit), checked: selectionContains }));
|
|
21803
21896
|
}
|
|
21804
21897
|
_getEmptyState() {
|
|
21805
21898
|
var _a;
|
|
@@ -21810,7 +21903,7 @@ class Table {
|
|
|
21810
21903
|
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
21904
|
}
|
|
21812
21905
|
_selectAllChange($event, forceValue) {
|
|
21813
|
-
if (!this.
|
|
21906
|
+
if (!this._enableRowSelection) {
|
|
21814
21907
|
return;
|
|
21815
21908
|
}
|
|
21816
21909
|
const value = forceValue === undefined
|
|
@@ -21823,14 +21916,14 @@ class Table {
|
|
|
21823
21916
|
if (this.canSelectKey && !row[this.canSelectKey]) {
|
|
21824
21917
|
continue;
|
|
21825
21918
|
}
|
|
21826
|
-
if (this._selectionContains(
|
|
21919
|
+
if (this._selectionContains(i)) {
|
|
21827
21920
|
continue;
|
|
21828
21921
|
}
|
|
21829
21922
|
toAdd.push(row);
|
|
21830
21923
|
this.rowSelected.emit(row);
|
|
21831
|
-
if (this.
|
|
21924
|
+
if (this._rowSelectionLimit !== undefined &&
|
|
21832
21925
|
this.selectedRows.length + toAdd.length ===
|
|
21833
|
-
this.
|
|
21926
|
+
this._rowSelectionLimit) {
|
|
21834
21927
|
break;
|
|
21835
21928
|
}
|
|
21836
21929
|
}
|
|
@@ -21854,13 +21947,13 @@ class Table {
|
|
|
21854
21947
|
this.selectedRowsChange.emit(this.selectedRows);
|
|
21855
21948
|
}
|
|
21856
21949
|
_checkboxChange(target, index) {
|
|
21857
|
-
if (!this.
|
|
21950
|
+
if (!this._enableRowSelection) {
|
|
21858
21951
|
return;
|
|
21859
21952
|
}
|
|
21860
21953
|
const value = this._getCheckedValue(target);
|
|
21861
21954
|
if (value &&
|
|
21862
|
-
this.
|
|
21863
|
-
this.selectedRows.length >= this.
|
|
21955
|
+
this._rowSelectionLimit !== undefined &&
|
|
21956
|
+
this.selectedRows.length >= this._rowSelectionLimit) {
|
|
21864
21957
|
target.checked = false;
|
|
21865
21958
|
return;
|
|
21866
21959
|
}
|
|
@@ -21870,7 +21963,10 @@ class Table {
|
|
|
21870
21963
|
return;
|
|
21871
21964
|
}
|
|
21872
21965
|
if (value) {
|
|
21873
|
-
this.selectedRows = [
|
|
21966
|
+
this.selectedRows = [
|
|
21967
|
+
...this.selectedRows,
|
|
21968
|
+
Object.assign(Object.assign({}, row), { index }),
|
|
21969
|
+
];
|
|
21874
21970
|
this.selectedRowsChange.emit(this.selectedRows);
|
|
21875
21971
|
this.rowSelected.emit(row);
|
|
21876
21972
|
if (this.enableFloatingMenu && !this._floatingMenuShown) {
|
|
@@ -21878,7 +21974,7 @@ class Table {
|
|
|
21878
21974
|
}
|
|
21879
21975
|
return;
|
|
21880
21976
|
}
|
|
21881
|
-
const indexOfToRemove = this._selectionContains(
|
|
21977
|
+
const indexOfToRemove = this._selectionContains(index, true);
|
|
21882
21978
|
// we need to do this, because splice does not trigger the selection setter.
|
|
21883
21979
|
const selection = [...this.selectedRows];
|
|
21884
21980
|
selection.splice(indexOfToRemove, 1);
|
|
@@ -21892,9 +21988,8 @@ class Table {
|
|
|
21892
21988
|
_getSelectionValue(row, index) {
|
|
21893
21989
|
return this.selectionKey ? (row === null || row === void 0 ? void 0 : row[this.selectionKey]) || index : index;
|
|
21894
21990
|
}
|
|
21895
|
-
_selectionContains(
|
|
21896
|
-
const returnValue = this.selectedRows.findIndex((item) =>
|
|
21897
|
-
this._getSelectionValue(item, index));
|
|
21991
|
+
_selectionContains(index, returnIndex = false) {
|
|
21992
|
+
const returnValue = this.selectedRows.findIndex((item) => item.index === index);
|
|
21898
21993
|
return !returnIndex ? returnValue >= 0 : returnValue;
|
|
21899
21994
|
}
|
|
21900
21995
|
_selectionContainsAll() {
|
|
@@ -21903,13 +21998,12 @@ class Table {
|
|
|
21903
21998
|
if (!((_a = this._items) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
21904
21999
|
return false;
|
|
21905
22000
|
}
|
|
21906
|
-
if (this.
|
|
21907
|
-
this.selectedRows.length === this.
|
|
22001
|
+
if (this._rowSelectionLimit !== undefined &&
|
|
22002
|
+
this.selectedRows.length === this._rowSelectionLimit) {
|
|
21908
22003
|
return true;
|
|
21909
22004
|
}
|
|
21910
22005
|
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);
|
|
22006
|
+
const contains = this._selectionContains(i);
|
|
21913
22007
|
if (!contains) {
|
|
21914
22008
|
returnValue = false;
|
|
21915
22009
|
break;
|
|
@@ -21922,14 +22016,13 @@ class Table {
|
|
|
21922
22016
|
if (!((_a = this._items) === null || _a === void 0 ? void 0 : _a.length) || !((_b = this.selectedRows) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
21923
22017
|
return false;
|
|
21924
22018
|
}
|
|
21925
|
-
if (this.
|
|
21926
|
-
this.selectedRows.length === this.
|
|
22019
|
+
if (this._rowSelectionLimit !== undefined &&
|
|
22020
|
+
this.selectedRows.length === this._rowSelectionLimit) {
|
|
21927
22021
|
return false;
|
|
21928
22022
|
}
|
|
21929
22023
|
let containsCount = 0;
|
|
21930
22024
|
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);
|
|
22025
|
+
const contains = this._selectionContains(i);
|
|
21933
22026
|
if (contains) {
|
|
21934
22027
|
containsCount++;
|
|
21935
22028
|
}
|
|
@@ -21955,7 +22048,7 @@ class Table {
|
|
|
21955
22048
|
});
|
|
21956
22049
|
return;
|
|
21957
22050
|
}
|
|
21958
|
-
if (!this.
|
|
22051
|
+
if (!this._enableRowSelection) {
|
|
21959
22052
|
return;
|
|
21960
22053
|
}
|
|
21961
22054
|
const checkbox = row === null || row === void 0 ? void 0 : row.querySelector('input[type="checkbox"]');
|
|
@@ -21991,7 +22084,10 @@ class Table {
|
|
|
21991
22084
|
}
|
|
21992
22085
|
get _el() { return getElement(this); }
|
|
21993
22086
|
static get watchers() { return {
|
|
21994
|
-
"items": ["_parseItems"]
|
|
22087
|
+
"items": ["_parseItems"],
|
|
22088
|
+
"enableRowSelection": ["_setRowSelectionData"],
|
|
22089
|
+
"rowSelectionLimit": ["_setRowSelectionData"],
|
|
22090
|
+
"selectedRows": ["_setRowSelectionData"]
|
|
21995
22091
|
}; }
|
|
21996
22092
|
static get style() { return tableComponentCss; }
|
|
21997
22093
|
static get cmpMeta() { return {
|
|
@@ -22043,9 +22139,13 @@ class Table {
|
|
|
22043
22139
|
"shadow": [4],
|
|
22044
22140
|
"_locales": [32],
|
|
22045
22141
|
"_columns": [32],
|
|
22046
|
-
"_items": [32]
|
|
22142
|
+
"_items": [32],
|
|
22143
|
+
"_enableRowSelection": [32],
|
|
22144
|
+
"_rowSelectionLimit": [32],
|
|
22145
|
+
"_rowActionsFloating": [32],
|
|
22146
|
+
"_rowActionsRow": [32]
|
|
22047
22147
|
},
|
|
22048
|
-
"$listeners$": [[16, "localeChanged", "_setLocales"], [16, "tableDefinitionChanged", "onTableDefinitionUpdated"], [4, "keydown", "keyDown"], [4, "keyup", "keyUp"], [4, "visibilitychange", "visibilityChange"]],
|
|
22148
|
+
"$listeners$": [[16, "localeChanged", "_setLocales"], [16, "tableDefinitionChanged", "onTableDefinitionUpdated"], [4, "keydown", "keyDown"], [4, "keyup", "keyUp"], [4, "visibilitychange", "visibilityChange"], [9, "resize", "_setRowSelectionData"]],
|
|
22049
22149
|
"$lazyBundleId$": "-",
|
|
22050
22150
|
"$attrsToReflect$": [["page", "page"]]
|
|
22051
22151
|
}; }
|
|
@@ -22055,7 +22155,7 @@ function isTableColumnSizesKey(x, k) {
|
|
|
22055
22155
|
return k in x;
|
|
22056
22156
|
}
|
|
22057
22157
|
|
|
22058
|
-
const tableCellComponentCss = ".
|
|
22158
|
+
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
22159
|
|
|
22060
22160
|
class TableCell {
|
|
22061
22161
|
constructor(hostRef) {
|
|
@@ -22066,6 +22166,7 @@ class TableCell {
|
|
|
22066
22166
|
this.definition = undefined;
|
|
22067
22167
|
this.item = undefined;
|
|
22068
22168
|
this.value = undefined;
|
|
22169
|
+
this.tableHasActions = false;
|
|
22069
22170
|
this.checkbox = undefined;
|
|
22070
22171
|
this.template = ({ value, }) => value;
|
|
22071
22172
|
}
|
|
@@ -22084,21 +22185,32 @@ class TableCell {
|
|
|
22084
22185
|
};
|
|
22085
22186
|
}
|
|
22086
22187
|
render() {
|
|
22087
|
-
return (hAsync(Host, { class: Object.assign({ 'p-table-cell': true, [`variant-${this.variant}`]: true }, this._getColumnClasses()) }, this.checkbox, this.
|
|
22188
|
+
return (hAsync(Host, { class: Object.assign({ 'p-table-cell': true, [`variant-${this.variant}`]: true }, this._getColumnClasses()) }, this.checkbox, this._getContent()));
|
|
22189
|
+
}
|
|
22190
|
+
_getContent() {
|
|
22191
|
+
if (this.variant === 'loading') {
|
|
22192
|
+
return (hAsync("p-loader", { variant: "ghost", class: "h-6 w-full flex-1 rounded" }));
|
|
22193
|
+
}
|
|
22194
|
+
if (this.variant === 'actions') {
|
|
22195
|
+
return hAsync("slot", { name: "actions" });
|
|
22196
|
+
}
|
|
22197
|
+
return (hAsync("div", { class: {
|
|
22088
22198
|
flex: true,
|
|
22089
22199
|
'justify-start': this.definition.align === 'start',
|
|
22090
22200
|
'justify-center': this.definition.align === 'center',
|
|
22091
22201
|
'justify-end': this.definition.align === 'end',
|
|
22092
|
-
} }, this.variant === 'header' ? (this.data.value) : this.definition.useSlot ? (hAsync("slot", null)) : (this.template(this.data))))
|
|
22202
|
+
} }, this.variant === 'header' ? (this.data.value) : this.definition.useSlot ? (hAsync("slot", null)) : (this.template(this.data))));
|
|
22093
22203
|
}
|
|
22094
22204
|
_getColumnClasses() {
|
|
22095
22205
|
var _a, _b, _c, _d, _e, _f;
|
|
22096
22206
|
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
|
|
22207
|
+
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 &&
|
|
22208
|
+
this.tableHasActions &&
|
|
22209
|
+
this.variant !== 'actions', 'group-hover:flex': this.variant === 'actions' && this.tableHasActions, hidden: this.variant === 'actions' && this.tableHasActions, flex: this.variant !== 'actions' }, sizes);
|
|
22098
22210
|
}
|
|
22099
22211
|
/*
|
|
22100
22212
|
With this, we shall hack the system in ways no one would ever have thought.
|
|
22101
|
-
|
|
22213
|
+
|
|
22102
22214
|
<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
22215
|
<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
22216
|
<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 +22220,7 @@ class TableCell {
|
|
|
22108
22220
|
<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
22221
|
<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
22222
|
|
|
22111
|
-
|
|
22223
|
+
|
|
22112
22224
|
⠀⠀⠀⠀⠀⣠⣴⣶⣿⣿⠿⣷⣶⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣷⠿⣿⣿⣶⣦⣀⠀⠀⠀⠀⠀
|
|
22113
22225
|
⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣶⣦⣬⡉⠒⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠚⢉⣥⣴⣾⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀
|
|
22114
22226
|
⠀⠀⠀⡾⠿⠛⠛⠛⠛⠿⢿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣿⠿⠿⠛⠛⠛⠛⠿⢧⠀⠀⠀
|
|
@@ -22207,6 +22319,7 @@ class TableCell {
|
|
|
22207
22319
|
"definition": [16],
|
|
22208
22320
|
"item": [8],
|
|
22209
22321
|
"value": [8],
|
|
22322
|
+
"tableHasActions": [4, "table-has-actions"],
|
|
22210
22323
|
"checkbox": [8],
|
|
22211
22324
|
"template": [16]
|
|
22212
22325
|
},
|
|
@@ -23347,7 +23460,7 @@ class TableRow {
|
|
|
23347
23460
|
render() {
|
|
23348
23461
|
return (hAsync(Host, { class: `p-table-row variant-${this.variant} ${this.enableHover &&
|
|
23349
23462
|
this.variant === 'default' &&
|
|
23350
|
-
'enable-hover'}` }, hAsync("div", { class: "content" }, hAsync("slot", null)), this.variant === 'default' && hAsync("p-divider", { class: "m-0" })));
|
|
23463
|
+
'enable-hover'} group` }, hAsync("div", { class: "content" }, hAsync("slot", null)), this.variant === 'default' && hAsync("p-divider", { class: "m-0" })));
|
|
23351
23464
|
}
|
|
23352
23465
|
static get style() { return tableRowComponentCss; }
|
|
23353
23466
|
static get cmpMeta() { return {
|
|
@@ -23363,6 +23476,42 @@ class TableRow {
|
|
|
23363
23476
|
}; }
|
|
23364
23477
|
}
|
|
23365
23478
|
|
|
23479
|
+
class TableRowAction {
|
|
23480
|
+
constructor(hostRef) {
|
|
23481
|
+
registerInstance(this, hostRef);
|
|
23482
|
+
this.type = 'both';
|
|
23483
|
+
this.icon = undefined;
|
|
23484
|
+
this.iconOnly = false;
|
|
23485
|
+
this.iconFlip = undefined;
|
|
23486
|
+
this.iconRotate = undefined;
|
|
23487
|
+
this.label = undefined;
|
|
23488
|
+
this.action = undefined;
|
|
23489
|
+
this.disabled = false;
|
|
23490
|
+
this.loading = false;
|
|
23491
|
+
}
|
|
23492
|
+
render() {
|
|
23493
|
+
return;
|
|
23494
|
+
}
|
|
23495
|
+
static get cmpMeta() { return {
|
|
23496
|
+
"$flags$": 0,
|
|
23497
|
+
"$tagName$": "p-table-row-action",
|
|
23498
|
+
"$members$": {
|
|
23499
|
+
"type": [1537],
|
|
23500
|
+
"icon": [1],
|
|
23501
|
+
"iconOnly": [4, "icon-only"],
|
|
23502
|
+
"iconFlip": [1, "icon-flip"],
|
|
23503
|
+
"iconRotate": [2, "icon-rotate"],
|
|
23504
|
+
"label": [1],
|
|
23505
|
+
"action": [16],
|
|
23506
|
+
"disabled": [4],
|
|
23507
|
+
"loading": [4]
|
|
23508
|
+
},
|
|
23509
|
+
"$listeners$": undefined,
|
|
23510
|
+
"$lazyBundleId$": "-",
|
|
23511
|
+
"$attrsToReflect$": [["type", "type"]]
|
|
23512
|
+
}; }
|
|
23513
|
+
}
|
|
23514
|
+
|
|
23366
23515
|
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
23516
|
|
|
23368
23517
|
class Toast {
|
|
@@ -23651,6 +23800,7 @@ registerComponents([
|
|
|
23651
23800
|
TableFooter,
|
|
23652
23801
|
TableHeader,
|
|
23653
23802
|
TableRow,
|
|
23803
|
+
TableRowAction,
|
|
23654
23804
|
Toast,
|
|
23655
23805
|
ToastContainer,
|
|
23656
23806
|
Tooltip,
|