@paperless/core 1.15.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/assets/i18n/table.i18n.en.json +4 -0
- package/dist/assets/i18n/table.i18n.nl.json +4 -0
- package/dist/build/p-2327d2ad.entry.js +2 -0
- package/dist/build/p-2327d2ad.entry.js.map +1 -0
- package/dist/build/{p-502ff028.entry.js → p-4ea9ac89.entry.js} +2 -2
- package/dist/build/p-4ea9ac89.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 +2 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{p-illustration_6.cjs.entry.js → p-floating-menu-container_8.cjs.entry.js} +42 -14
- package/dist/cjs/p-floating-menu-container_8.cjs.entry.js.map +1 -0
- package/dist/cjs/p-table.cjs.entry.js +33 -14
- package/dist/cjs/p-table.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/components/atoms/floating-menu-container/floating-menu-container.component.css +1 -1
- package/dist/collection/components/atoms/floating-menu-container/floating-menu-container.component.js +26 -1
- package/dist/collection/components/atoms/floating-menu-container/floating-menu-container.component.js.map +1 -1
- package/dist/collection/components/atoms/floating-menu-item/floating-menu-item.component.css +1 -1
- package/dist/collection/components/molecules/table-header/table-header.component.js +33 -33
- package/dist/collection/components/molecules/table-header/table-header.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 +107 -30
- package/dist/collection/components/organisms/table/table.component.js.map +1 -1
- package/dist/collection/tailwind/z-index.js +1 -0
- package/dist/components/floating-menu-container.component.js +35 -0
- package/dist/components/floating-menu-container.component.js.map +1 -0
- package/dist/components/floating-menu-item.component.js +35 -0
- package/dist/components/floating-menu-item.component.js.map +1 -0
- package/dist/components/p-floating-menu-container.js +1 -28
- package/dist/components/p-floating-menu-container.js.map +1 -1
- package/dist/components/p-floating-menu-item.js +1 -31
- package/dist/components/p-floating-menu-item.js.map +1 -1
- package/dist/components/p-table.js +63 -29
- package/dist/components/p-table.js.map +1 -1
- package/dist/components/table-header.component.js +19 -19
- package/dist/components/table-header.component.js.map +1 -1
- package/dist/esm/index-7b917f6b.js +2 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{p-illustration_6.entry.js → p-floating-menu-container_8.entry.js} +41 -15
- package/dist/esm/p-floating-menu-container_8.entry.js.map +1 -0
- package/dist/esm/p-table.entry.js +33 -14
- package/dist/esm/p-table.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/p-2327d2ad.entry.js +2 -0
- package/dist/paperless/p-2327d2ad.entry.js.map +1 -0
- package/dist/paperless/{p-502ff028.entry.js → p-4ea9ac89.entry.js} +2 -2
- package/dist/paperless/p-4ea9ac89.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/tailwind/z-index.js +1 -0
- package/dist/types/components/atoms/floating-menu-container/floating-menu-container.component.d.ts +4 -0
- package/dist/types/components/molecules/table-header/table-header.component.d.ts +15 -15
- package/dist/types/components/organisms/table/table.component.d.ts +26 -12
- package/dist/types/components.d.ts +98 -66
- package/hydrate/index.js +67 -42
- package/package.json +1 -1
- package/dist/build/p-502ff028.entry.js.map +0 -1
- package/dist/build/p-b59e29d7.entry.js +0 -2
- package/dist/build/p-b59e29d7.entry.js.map +0 -1
- package/dist/build/p-d8149bb7.entry.js +0 -2
- package/dist/build/p-d8149bb7.entry.js.map +0 -1
- package/dist/build/p-d8e5bef2.entry.js +0 -2
- package/dist/build/p-d8e5bef2.entry.js.map +0 -1
- package/dist/cjs/p-floating-menu-container.cjs.entry.js +0 -21
- package/dist/cjs/p-floating-menu-container.cjs.entry.js.map +0 -1
- package/dist/cjs/p-floating-menu-item.cjs.entry.js +0 -22
- package/dist/cjs/p-floating-menu-item.cjs.entry.js.map +0 -1
- package/dist/cjs/p-illustration_6.cjs.entry.js.map +0 -1
- package/dist/esm/p-floating-menu-container.entry.js +0 -17
- package/dist/esm/p-floating-menu-container.entry.js.map +0 -1
- package/dist/esm/p-floating-menu-item.entry.js +0 -18
- package/dist/esm/p-floating-menu-item.entry.js.map +0 -1
- package/dist/esm/p-illustration_6.entry.js.map +0 -1
- package/dist/paperless/p-502ff028.entry.js.map +0 -1
- package/dist/paperless/p-b59e29d7.entry.js +0 -2
- package/dist/paperless/p-b59e29d7.entry.js.map +0 -1
- package/dist/paperless/p-d8149bb7.entry.js +0 -2
- package/dist/paperless/p-d8149bb7.entry.js.map +0 -1
- package/dist/paperless/p-d8e5bef2.entry.js +0 -2
- package/dist/paperless/p-d8e5bef2.entry.js.map +0 -1
package/hydrate/index.js
CHANGED
|
@@ -19679,27 +19679,30 @@ class DropdownMenuItem {
|
|
|
19679
19679
|
}; }
|
|
19680
19680
|
}
|
|
19681
19681
|
|
|
19682
|
-
const floatingMenuContainerComponentCss = "/*!@.flex*/.flex.sc-p-floating-menu-container{display:flex!important}/*!@.h-12*/.h-12.sc-p-floating-menu-container{height:3rem!important}/*!@.items-center*/.items-center.sc-p-floating-menu-container{align-items:center!important}/*!@.gap-4*/.gap-4.sc-p-floating-menu-container{gap:1rem!important}/*!@.rounded-xxlarge*/.rounded-xxlarge.sc-p-floating-menu-container{border-radius:.75rem!important}/*!@.bg-storm-dark*/.bg-storm-dark.sc-p-floating-menu-container{--tw-bg-opacity:1!important;background-color:rgb(39 40 56/var(--tw-bg-opacity))!important}/*!@.px-4*/.px-4.sc-p-floating-menu-container{padding-left:1rem!important;padding-right:1rem!important}/*!@.py-3*/.py-3.sc-p-floating-menu-container{padding-bottom:.75rem!important;padding-top:.75rem!important}/*!@.text-storm-vague*/.text-storm-vague.sc-p-floating-menu-container{--tw-text-opacity:1!important;color:rgb(152 154 183/var(--tw-text-opacity))!important}/*!@**/*.sc-p-floating-menu-container{box-sizing:border-box}/*!@:host*/.sc-p-floating-menu-container-h{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-shadow:0px 0.0625rem 0.1125rem rgba(0,0,0,.65);--tw-shadow-colored:0px 0.0625rem 0.1125rem var(--tw-shadow-color);align-items:center;background-color:rgb(39 40 56/var(--tw-bg-opacity));border-radius:.75rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgb(152 154 183/var(--tw-text-opacity));display:flex;gap:1rem;height:3rem;padding:.75rem 1rem}/*!@.static*/.static.sc-p-floating-menu-container{position:static!important}";
|
|
19682
|
+
const floatingMenuContainerComponentCss = "/*!@.z-floating-menu*/.z-floating-menu.sc-p-floating-menu-container{z-index:190!important}/*!@.flex*/.flex.sc-p-floating-menu-container{display:flex!important}/*!@.h-12*/.h-12.sc-p-floating-menu-container{height:3rem!important}/*!@.items-center*/.items-center.sc-p-floating-menu-container{align-items:center!important}/*!@.gap-4*/.gap-4.sc-p-floating-menu-container{gap:1rem!important}/*!@.rounded-xxlarge*/.rounded-xxlarge.sc-p-floating-menu-container{border-radius:.75rem!important}/*!@.bg-storm-dark*/.bg-storm-dark.sc-p-floating-menu-container{--tw-bg-opacity:1!important;background-color:rgb(39 40 56/var(--tw-bg-opacity))!important}/*!@.px-4*/.px-4.sc-p-floating-menu-container{padding-left:1rem!important;padding-right:1rem!important}/*!@.py-3*/.py-3.sc-p-floating-menu-container{padding-bottom:.75rem!important;padding-top:.75rem!important}/*!@.text-storm-vague*/.text-storm-vague.sc-p-floating-menu-container{--tw-text-opacity:1!important;color:rgb(152 154 183/var(--tw-text-opacity))!important}/*!@**/*.sc-p-floating-menu-container{box-sizing:border-box}/*!@:host*/.sc-p-floating-menu-container-h{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-shadow:0px 0.0625rem 0.1125rem rgba(0,0,0,.65);--tw-shadow-colored:0px 0.0625rem 0.1125rem var(--tw-shadow-color);align-items:center;background-color:rgb(39 40 56/var(--tw-bg-opacity));border-radius:.75rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);color:rgb(152 154 183/var(--tw-text-opacity));display:flex;gap:1rem;height:3rem;padding:.75rem 1rem;z-index:190}/*!@.static*/.static.sc-p-floating-menu-container{position:static!important}";
|
|
19683
19683
|
|
|
19684
19684
|
class FloatingMenuContainer {
|
|
19685
19685
|
constructor(hostRef) {
|
|
19686
19686
|
registerInstance(this, hostRef);
|
|
19687
|
+
this.usedInTable = false;
|
|
19687
19688
|
}
|
|
19688
19689
|
render() {
|
|
19689
|
-
return (hAsync(Host, { class: "p-floating-menu-container" }, hAsync("slot", null)));
|
|
19690
|
+
return (hAsync(Host, { class: "p-floating-menu-container" }, this.usedInTable ? (hAsync("slot", { name: "floating-menu-item" })) : (hAsync("slot", null))));
|
|
19690
19691
|
}
|
|
19691
19692
|
static get style() { return floatingMenuContainerComponentCss; }
|
|
19692
19693
|
static get cmpMeta() { return {
|
|
19693
19694
|
"$flags$": 9,
|
|
19694
19695
|
"$tagName$": "p-floating-menu-container",
|
|
19695
|
-
"$members$":
|
|
19696
|
+
"$members$": {
|
|
19697
|
+
"usedInTable": [4, "used-in-table"]
|
|
19698
|
+
},
|
|
19696
19699
|
"$listeners$": undefined,
|
|
19697
19700
|
"$lazyBundleId$": "-",
|
|
19698
19701
|
"$attrsToReflect$": []
|
|
19699
19702
|
}; }
|
|
19700
19703
|
}
|
|
19701
19704
|
|
|
19702
|
-
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}/*!@.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}/*!@:host(
|
|
19705
|
+
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}";
|
|
19703
19706
|
|
|
19704
19707
|
class FloatingMenuItem {
|
|
19705
19708
|
constructor(hostRef) {
|
|
@@ -21369,7 +21372,7 @@ class TabItem {
|
|
|
21369
21372
|
}; }
|
|
21370
21373
|
}
|
|
21371
21374
|
|
|
21372
|
-
const tableComponentCss = ".flex{display:flex!important}.flex-shrink{flex-shrink:1!important}*{box-sizing:border-box}p-table{display:flex;flex-direction:column}p-table .p-input[type=checkbox]{flex-shrink:0}.static{position:static!important}.mb-14{margin-bottom:3.5rem!important}.mb-6{margin-bottom:1.5rem!important}.table{display:table!important}.
|
|
21375
|
+
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.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%{opacity:1;transform:translateY(0) translateX(-50%)}to{opacity:0;transform:translateY(100%) translateX(-50%)}}@keyframes floatingMenuContainerIn{0%{opacity:0;transform:translateY(100%) translateX(-50%)}to{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}.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}.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}";
|
|
21373
21376
|
|
|
21374
21377
|
class Table {
|
|
21375
21378
|
constructor(hostRef) {
|
|
@@ -21382,13 +21385,14 @@ class Table {
|
|
|
21382
21385
|
this.quickFilter = createEvent(this, "quickFilter", 3);
|
|
21383
21386
|
this.queryChange = createEvent(this, "queryChange", 3);
|
|
21384
21387
|
this.filter = createEvent(this, "filter", 3);
|
|
21385
|
-
this.
|
|
21388
|
+
this.action = createEvent(this, "action", 3);
|
|
21386
21389
|
this.pageChange = createEvent(this, "pageChange", 3);
|
|
21387
21390
|
this.pageSizeChange = createEvent(this, "pageSizeChange", 3);
|
|
21388
21391
|
this.export = createEvent(this, "export", 3);
|
|
21389
21392
|
this.emptyStateActionClick = createEvent(this, "emptyStateActionClick", 3);
|
|
21390
21393
|
this._ctrlDown = false;
|
|
21391
21394
|
this._hasCustomFilterSlot = false;
|
|
21395
|
+
this._hasFloatingMenuItems = false;
|
|
21392
21396
|
this.items = undefined;
|
|
21393
21397
|
this.loading = false;
|
|
21394
21398
|
this.headerLoading = false;
|
|
@@ -21397,6 +21401,13 @@ class Table {
|
|
|
21397
21401
|
this.enableRowSelection = true;
|
|
21398
21402
|
this.enableRowClick = true;
|
|
21399
21403
|
this.selectedRows = [];
|
|
21404
|
+
this.enableFloatingMenu = true;
|
|
21405
|
+
this.floatingMenuAmountSelectedTemplate = (amount) => {
|
|
21406
|
+
var _a, _b, _c;
|
|
21407
|
+
return formatTranslation((_c = (amount === 1
|
|
21408
|
+
? (_a = this._locales.floating_menu) === null || _a === void 0 ? void 0 : _a.amount_selected
|
|
21409
|
+
: (_b = this._locales.floating_menu) === null || _b === void 0 ? void 0 : _b.amount_selected_plural)) === null || _c === void 0 ? void 0 : _c.replace('{{amount}}', amount));
|
|
21410
|
+
};
|
|
21400
21411
|
this.selectionKey = undefined;
|
|
21401
21412
|
this.canSelectKey = undefined;
|
|
21402
21413
|
this.enableHeader = true;
|
|
@@ -21407,11 +21418,12 @@ class Table {
|
|
|
21407
21418
|
this.enableFilter = true;
|
|
21408
21419
|
this.selectedFiltersAmount = undefined;
|
|
21409
21420
|
this.filterButtonTemplate = undefined;
|
|
21410
|
-
this.
|
|
21411
|
-
this.
|
|
21412
|
-
this.
|
|
21413
|
-
this.
|
|
21414
|
-
this.
|
|
21421
|
+
this.enableAction = false;
|
|
21422
|
+
this.actionButtonLoading = false;
|
|
21423
|
+
this.actionButtonEnabled = false;
|
|
21424
|
+
this.actionButtonIcon = 'pencil';
|
|
21425
|
+
this.actionButtonText = undefined;
|
|
21426
|
+
this.actionButtonTemplate = undefined;
|
|
21415
21427
|
this.enableFooter = true;
|
|
21416
21428
|
this.enablePageSize = true;
|
|
21417
21429
|
this.enablePagination = true;
|
|
@@ -21433,6 +21445,10 @@ class Table {
|
|
|
21433
21445
|
}
|
|
21434
21446
|
componentWillLoad() {
|
|
21435
21447
|
this._hasCustomFilterSlot = !!this._el.querySelector(':scope > [slot="custom-filter"]');
|
|
21448
|
+
this._hasFloatingMenuItems = !!this._el.querySelectorAll(':scope > [slot="floating-menu-item"]').length;
|
|
21449
|
+
if (this.enableRowSelection) {
|
|
21450
|
+
console.log(this._hasFloatingMenuItems, this._el.querySelectorAll(':scope > [slot="floating-menu-item"]'));
|
|
21451
|
+
}
|
|
21436
21452
|
this._setLocales();
|
|
21437
21453
|
this._parseItems(this.items);
|
|
21438
21454
|
this._generateColumns();
|
|
@@ -21441,7 +21457,7 @@ class Table {
|
|
|
21441
21457
|
this.hasRendered.emit();
|
|
21442
21458
|
}
|
|
21443
21459
|
render() {
|
|
21444
|
-
var _a, _b;
|
|
21460
|
+
var _a, _b, _c;
|
|
21445
21461
|
return (hAsync(Host, { class: "p-table" }, hAsync("p-table-container", null, this.enableHeader && (hAsync("p-table-header", {
|
|
21446
21462
|
// quick filters
|
|
21447
21463
|
quickFilters: this.quickFilters, activeQuickFilterIdentifier: this.activeQuickFilterIdentifier, onQuickFilter: ({ detail }) => this.quickFilter.emit(detail),
|
|
@@ -21449,8 +21465,8 @@ class Table {
|
|
|
21449
21465
|
enableSearch: this.enableSearch, query: this.query, onQueryChange: ({ detail }) => this.queryChange.emit(detail),
|
|
21450
21466
|
// filter button
|
|
21451
21467
|
enableFilter: this.enableFilter, selectedFiltersAmount: this.selectedFiltersAmount, filterButtonTemplate: this.filterButtonTemplate, onFilter: () => this.filter.emit(),
|
|
21452
|
-
//
|
|
21453
|
-
|
|
21468
|
+
// action button
|
|
21469
|
+
enableAction: this.enableAction, actionIcon: this.actionButtonIcon, actionText: this.actionButtonText, actionLoading: this.actionButtonLoading, canUseAction: this.actionButtonEnabled, actionButtonTemplate: this.actionButtonTemplate, onAction: () => this.action.emit(), itemsSelectedAmount: (_a = this.selectedRows) === null || _a === void 0 ? void 0 : _a.length,
|
|
21454
21470
|
//loading
|
|
21455
21471
|
loading: this.headerLoading
|
|
21456
21472
|
}, this._hasCustomFilterSlot && (hAsync("slot", { name: "custom-filter", slot: "custom-filter" })))), this._getHeader(), hAsync("div", { class: "flex flex-col" }, this._getRows()), this.enableFooter && (hAsync("p-table-footer", {
|
|
@@ -21464,7 +21480,11 @@ class Table {
|
|
|
21464
21480
|
enableExport: this.enableExport, onExport: () => this.export.emit(),
|
|
21465
21481
|
//loading
|
|
21466
21482
|
loading: this.footerLoading
|
|
21467
|
-
}))))
|
|
21483
|
+
})), this.enableFloatingMenu ? (hAsync("p-floating-menu-container", { usedInTable: true, class: ((_b = this.selectedRows) === null || _b === void 0 ? void 0 : _b.length) ? '' : 'inactive' }, hAsync("p-floating-menu-item", { hover: false, slot: "floating-menu-item", class: this._hasFloatingMenuItems
|
|
21484
|
+
? 'hide-mobile'
|
|
21485
|
+
: '' }, this.floatingMenuAmountSelectedTemplate((_c = this.selectedRows) === null || _c === void 0 ? void 0 : _c.length)), hAsync("p-divider", { class: `mx-0 text-storm ${this._hasFloatingMenuItems
|
|
21486
|
+
? 'hide-mobile'
|
|
21487
|
+
: ''}`, variant: "vertical", slot: "floating-menu-item" }), this._hasFloatingMenuItems && (hAsync("slot", { name: "floating-menu-item" })), this._hasFloatingMenuItems && (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" })))) : (''))));
|
|
21468
21488
|
}
|
|
21469
21489
|
async _setLocales() {
|
|
21470
21490
|
this._locales = await getLocaleComponentStrings(this._el);
|
|
@@ -21509,7 +21529,7 @@ class Table {
|
|
|
21509
21529
|
}
|
|
21510
21530
|
_getHeader() {
|
|
21511
21531
|
return (hAsync("p-table-row", { variant: "header" }, this._columns.map((col, index) => (hAsync("p-table-cell", { definition: col, value: col.name, variant: "header", checkbox: index === 0 || col.hasCheckbox
|
|
21512
|
-
? this._getCheckbox(null, 'loading')
|
|
21532
|
+
? this._getCheckbox(null, this.loading ? 'loading' : 'header')
|
|
21513
21533
|
: null, index: index })))));
|
|
21514
21534
|
}
|
|
21515
21535
|
_getRows() {
|
|
@@ -21558,11 +21578,13 @@ class Table {
|
|
|
21558
21578
|
return (hAsync("div", { class: `flex max-w-[20rem] flex-col items-center self-center py-24 text-center ${this.enableEmptyStateAction && 'cursor-pointer'}`, onClick: () => this.enableEmptyStateAction &&
|
|
21559
21579
|
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()))));
|
|
21560
21580
|
}
|
|
21561
|
-
_selectAllChange($event) {
|
|
21581
|
+
_selectAllChange($event, forceValue) {
|
|
21562
21582
|
if (!this.enableRowSelection) {
|
|
21563
21583
|
return;
|
|
21564
21584
|
}
|
|
21565
|
-
const value =
|
|
21585
|
+
const value = forceValue === undefined
|
|
21586
|
+
? this._getCheckedValue($event.target)
|
|
21587
|
+
: forceValue;
|
|
21566
21588
|
if (value) {
|
|
21567
21589
|
const toAdd = [];
|
|
21568
21590
|
for (let i = 0; i < this._items.length; i++) {
|
|
@@ -21728,6 +21750,8 @@ class Table {
|
|
|
21728
21750
|
"enableRowSelection": [4, "enable-row-selection"],
|
|
21729
21751
|
"enableRowClick": [4, "enable-row-click"],
|
|
21730
21752
|
"selectedRows": [16],
|
|
21753
|
+
"enableFloatingMenu": [4, "enable-floating-menu"],
|
|
21754
|
+
"floatingMenuAmountSelectedTemplate": [16],
|
|
21731
21755
|
"selectionKey": [1, "selection-key"],
|
|
21732
21756
|
"canSelectKey": [1, "can-select-key"],
|
|
21733
21757
|
"enableHeader": [4, "enable-header"],
|
|
@@ -21738,11 +21762,12 @@ class Table {
|
|
|
21738
21762
|
"enableFilter": [4, "enable-filter"],
|
|
21739
21763
|
"selectedFiltersAmount": [2, "selected-filters-amount"],
|
|
21740
21764
|
"filterButtonTemplate": [16],
|
|
21741
|
-
"
|
|
21742
|
-
"
|
|
21743
|
-
"
|
|
21744
|
-
"
|
|
21745
|
-
"
|
|
21765
|
+
"enableAction": [4, "enable-action"],
|
|
21766
|
+
"actionButtonLoading": [4, "action-button-loading"],
|
|
21767
|
+
"actionButtonEnabled": [4, "action-button-enabled"],
|
|
21768
|
+
"actionButtonIcon": [1, "action-button-icon"],
|
|
21769
|
+
"actionButtonText": [1, "action-button-text"],
|
|
21770
|
+
"actionButtonTemplate": [16],
|
|
21746
21771
|
"enableFooter": [4, "enable-footer"],
|
|
21747
21772
|
"enablePageSize": [4, "enable-page-size"],
|
|
21748
21773
|
"enablePagination": [4, "enable-pagination"],
|
|
@@ -22954,10 +22979,10 @@ class TableHeader {
|
|
|
22954
22979
|
this.quickFilter = createEvent(this, "quickFilter", 3);
|
|
22955
22980
|
this.queryChange = createEvent(this, "queryChange", 3);
|
|
22956
22981
|
this.filter = createEvent(this, "filter", 3);
|
|
22957
|
-
this.
|
|
22982
|
+
this.action = createEvent(this, "action", 3);
|
|
22958
22983
|
this._defaultFilterButtonTemplate = () => formatTranslation(this._locales.filter);
|
|
22959
|
-
this.
|
|
22960
|
-
? this.
|
|
22984
|
+
this._defaultActionButtonTemplate = (amount) => this.actionText
|
|
22985
|
+
? this.actionText
|
|
22961
22986
|
: formatTranslation(amount === 0
|
|
22962
22987
|
? this._locales.edit
|
|
22963
22988
|
: amount === 1
|
|
@@ -22974,12 +22999,12 @@ class TableHeader {
|
|
|
22974
22999
|
this.enableFilter = true;
|
|
22975
23000
|
this.selectedFiltersAmount = undefined;
|
|
22976
23001
|
this.filterButtonTemplate = this._defaultFilterButtonTemplate;
|
|
22977
|
-
this.
|
|
22978
|
-
this.
|
|
22979
|
-
this.
|
|
22980
|
-
this.
|
|
22981
|
-
this.
|
|
22982
|
-
this.
|
|
23002
|
+
this.enableAction = true;
|
|
23003
|
+
this.actionLoading = false;
|
|
23004
|
+
this.actionIcon = 'pencil';
|
|
23005
|
+
this.actionText = undefined;
|
|
23006
|
+
this.canUseAction = false;
|
|
23007
|
+
this.actionButtonTemplate = this._defaultActionButtonTemplate;
|
|
22983
23008
|
this._locales = {};
|
|
22984
23009
|
}
|
|
22985
23010
|
componentWillLoad() {
|
|
@@ -23006,15 +23031,15 @@ class TableHeader {
|
|
|
23006
23031
|
? this.filterButtonTemplate()
|
|
23007
23032
|
: this._defaultFilterButtonTemplate(), this.selectedFiltersAmount &&
|
|
23008
23033
|
this._getLabel(this.selectedFiltersAmount), mobileTotal > 0 &&
|
|
23009
|
-
this._getLabel(mobileTotal, 'mobile'))), this.
|
|
23034
|
+
this._getLabel(mobileTotal, 'mobile'))), this.enableAction && this._buttonTemplate()), this.enableAction && this.canUseAction && (hAsync("div", { class: "fixed bottom-0 left-0 block w-full border border-solid border-transparent border-t-mystic-dark bg-white p-4 desktop-xs:hidden" }, this._buttonTemplate(true)))));
|
|
23010
23035
|
}
|
|
23011
23036
|
async _setLocales() {
|
|
23012
23037
|
this._locales = await getLocaleComponentStrings(this._el);
|
|
23013
23038
|
}
|
|
23014
23039
|
_buttonTemplate(mobile = false) {
|
|
23015
|
-
return (hAsync("p-button", { class: mobile ? 'w-full' : 'hidden desktop-xs:flex', icon: this.
|
|
23016
|
-
? this.
|
|
23017
|
-
: this.
|
|
23040
|
+
return (hAsync("p-button", { class: mobile ? 'w-full' : 'hidden desktop-xs:flex', icon: this.actionIcon, size: "small", disabled: !this.canUseAction, onClick: () => this.action.emit(), loading: this.actionLoading }, this.actionButtonTemplate
|
|
23041
|
+
? this.actionButtonTemplate(mobile ? this.itemsSelectedAmount : 0)
|
|
23042
|
+
: this._defaultActionButtonTemplate(mobile ? this.itemsSelectedAmount : 0)));
|
|
23018
23043
|
}
|
|
23019
23044
|
_getLabel(amount, variant = 'default') {
|
|
23020
23045
|
return (hAsync("p-label", { size: "small", variant: "negative", behavior: "text", class: `ml-1 ${variant === 'default'
|
|
@@ -23036,12 +23061,12 @@ class TableHeader {
|
|
|
23036
23061
|
"enableFilter": [4, "enable-filter"],
|
|
23037
23062
|
"selectedFiltersAmount": [2, "selected-filters-amount"],
|
|
23038
23063
|
"filterButtonTemplate": [16],
|
|
23039
|
-
"
|
|
23040
|
-
"
|
|
23041
|
-
"
|
|
23042
|
-
"
|
|
23043
|
-
"
|
|
23044
|
-
"
|
|
23064
|
+
"enableAction": [4, "enable-action"],
|
|
23065
|
+
"actionLoading": [4, "action-loading"],
|
|
23066
|
+
"actionIcon": [1, "action-icon"],
|
|
23067
|
+
"actionText": [1, "action-text"],
|
|
23068
|
+
"canUseAction": [1028, "can-use-action"],
|
|
23069
|
+
"actionButtonTemplate": [16],
|
|
23045
23070
|
"_locales": [32]
|
|
23046
23071
|
},
|
|
23047
23072
|
"$listeners$": [[16, "localeChanged", "_setLocales"]],
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["illustrations","emptyState","emptyStateSearch","emptyStateOverview","emptyStateAdd","departments","expenses","functions","questions","sickLeave","timeOff","upgradeToHr","email","Illustration","render","illustration","this","variant","h","Host","class","innerHTML","tableCellComponentCss","TableCell","value","data","_a","objectGetByPath","item","definition","path","index","rowIndex","Object","assign","_getColumnClasses","checkbox","flex","align","useSlot","template","sizes","_getSizes","_b","_c","_d","_e","type","_f","isLast","hidden","classes","previousSize","size","isTableColumnSizesKey","default","currentValue","previousValue","tableContainerComponentCss","TableContainer","tableFooterComponentCss","TableFooter","defaultSize","defaultSizeOptions","componentWillLoad","_setLocales","hidePageSizeSelect","hideOnSinglePage","total","pageSizeOptions","enablePageSize","enablePagination","enableExport","loading","pageSize","sizeOptions","onSizeChange","detail","_changePageSize","page","onPageChange","pageChange","emit","icon","onClick","export","formatTranslation","_locales","getLocaleComponentStrings","_el","s","pageSizeChange","isFunction","createErrorClass","createImpl","_super","instance","Error","call","stack","ctorFunc","prototype","create","constructor","UnsubscriptionError","UnsubscriptionErrorImpl","errors","message","length","map","err","i","toString","join","name","arrRemove","arr","indexOf","splice","Subscription","initialTeardown","closed","_parentage","_finalizers","unsubscribe","Array","isArray","parent","remove","initialFinalizer","e","finalizer","execFinalizer","push","add","teardown","_hasParent","_addParent","includes","_removeParent","EMPTY","empty","EMPTY_SUBSCRIPTION","isSubscription","config","onUnhandledError","onStoppedNotification","Promise","undefined","useDeprecatedSynchronousErrorHandling","useDeprecatedNextContext","timeoutProvider","setTimeout","handler","timeout","args","delegate","clearTimeout","handle","reportUnhandledError","noop","COMPLETE_NOTIFICATION","createNotification","errorNotification","error","nextNotification","kind","errorContext","cb","Subscriber","destination","super","isStopped","EMPTY_OBSERVER","next","complete","SafeSubscriber","handleStoppedNotification","_next","_error","_complete","_bind","Function","bind","fn","thisArg","ConsumerObserver","partialObserver","handleUnhandledError","observerOrNext","context","defaultErrorHandler","notification","subscriber","observable","Symbol","identity","x","pipeFromArray","fns","piped","input","reduce","prev","Observable","subscribe","_subscribe","lift","operator","source","isSubscriber","_trySubscribe","sink","forEach","promiseCtor","getPromiseCtor","resolve","reject","Symbol_observable","pipe","operations","toPromise","isObserver","hasLift","operate","init","liftedSource","TypeError","createOperatorSubscriber","onNext","onComplete","onError","onFinalize","OperatorSubscriber","shouldUnsubscribe","ObjectUnsubscribedError","ObjectUnsubscribedErrorImpl","Subject","currentObservers","observers","hasError","thrownError","subject","AnonymousSubject","_throwIfClosed","from","observer","shift","observed","_checkFinalizedStatuses","_innerSubscribe","asObservable","dateTimestampProvider","now","Date","Action","scheduler","work","schedule","state","delay","intervalProvider","setInterval","clearInterval","AsyncAction","pending","id","recycleAsyncId","requestAsyncId","_id","flush","_scheduler","execute","_execute","_delay","errored","errorValue","actions","Scheduler","schedulerActionCtor","AsyncScheduler","SchedulerAction","_active","action","asyncScheduler","debounceTime","dueTime","activeTask","lastValue","lastTime","emitWhenIdle","targetTime","distinctUntilChanged","comparator","keySelector","defaultCompare","previousKey","first","currentKey","a","b","tableHeaderComponentCss","TableHeader","_defaultFilterButtonTemplate","filter","_defaultEditButtonTemplate","amount","editText","edit","edit_single","edit_plural","_queryObserver","_hasCustomFilterSlot","querySelector","componentDidLoad","queryChange","activeQuickFilter","quickFilters","find","f","identifier","activeQuickFilterIdentifier","mobileTotal","selectedFiltersAmount","active","quickFilter","text","count","enableSearch","slot","placeholder","query","onInput","ev","target","enableFilter","filterButtonTemplate","_getLabel","enableEdit","_buttonTemplate","canEdit","mobile","editIcon","disabled","editLoading","editButtonTemplate","itemsSelectedAmount","behavior","tableRowComponentCss","TableRow","enableHover"],"sources":["src/utils/illustrations.ts","src/components/atoms/illustration/illustration.component.tsx","src/components/molecules/table-cell/table-cell.component.scss?tag=p-table-cell","src/components/molecules/table-cell/table-cell.component.tsx","src/components/atoms/table-container/table-container.component.scss?tag=p-table-container&encapsulation=shadow","src/components/atoms/table-container/table-container.component.tsx","src/components/molecules/table-footer/table-footer.component.scss?tag=p-table-footer&encapsulation=shadow","src/components/molecules/table-footer/table-footer.component.tsx","../../node_modules/rxjs/dist/esm/internal/util/isFunction.js","../../node_modules/rxjs/dist/esm/internal/util/createErrorClass.js","../../node_modules/rxjs/dist/esm/internal/util/UnsubscriptionError.js","../../node_modules/rxjs/dist/esm/internal/util/arrRemove.js","../../node_modules/rxjs/dist/esm/internal/Subscription.js","../../node_modules/rxjs/dist/esm/internal/config.js","../../node_modules/rxjs/dist/esm/internal/scheduler/timeoutProvider.js","../../node_modules/rxjs/dist/esm/internal/util/reportUnhandledError.js","../../node_modules/rxjs/dist/esm/internal/util/noop.js","../../node_modules/rxjs/dist/esm/internal/NotificationFactories.js","../../node_modules/rxjs/dist/esm/internal/util/errorContext.js","../../node_modules/rxjs/dist/esm/internal/Subscriber.js","../../node_modules/rxjs/dist/esm/internal/symbol/observable.js","../../node_modules/rxjs/dist/esm/internal/util/identity.js","../../node_modules/rxjs/dist/esm/internal/util/pipe.js","../../node_modules/rxjs/dist/esm/internal/Observable.js","../../node_modules/rxjs/dist/esm/internal/util/lift.js","../../node_modules/rxjs/dist/esm/internal/operators/OperatorSubscriber.js","../../node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js","../../node_modules/rxjs/dist/esm/internal/Subject.js","../../node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js","../../node_modules/rxjs/dist/esm/internal/scheduler/Action.js","../../node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js","../../node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js","../../node_modules/rxjs/dist/esm/internal/Scheduler.js","../../node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js","../../node_modules/rxjs/dist/esm/internal/scheduler/async.js","../../node_modules/rxjs/dist/esm/internal/operators/debounceTime.js","../../node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js","src/components/molecules/table-header/table-header.component.scss?tag=p-table-header&encapsulation=shadow","src/components/molecules/table-header/table-header.component.tsx","src/components/molecules/table-row/table-row.component.scss?tag=p-table-row&encapsulation=shadow","src/components/molecules/table-row/table-row.component.tsx"],"sourcesContent":["import emptyState from '../assets/illustrations/default-empty-state.svg';\nimport departments from '../assets/illustrations/departments.svg';\nimport email from '../assets/illustrations/e-mail.svg';\nimport emptyStateAdd from '../assets/illustrations/empty-state-add.svg';\nimport emptyStateOverview from '../assets/illustrations/empty-state-overview.svg';\nimport emptyStateSearch from '../assets/illustrations/empty-state-search.svg';\nimport expenses from '../assets/illustrations/expenses.svg';\nimport functions from '../assets/illustrations/functions.svg';\nimport questions from '../assets/illustrations/questions.svg';\nimport sickLeave from '../assets/illustrations/sick-leave.svg';\nimport timeOff from '../assets/illustrations/time-off.svg';\nimport upgradeToHr from '../assets/illustrations/upgrade-to-hr.svg';\n\nexport default {\n 'empty-state': emptyState,\n 'empty-state-search': emptyStateSearch,\n 'empty-state-overview': emptyStateOverview,\n 'empty-state-add': emptyStateAdd,\n departments,\n expenses,\n functions,\n questions,\n 'sick-leave': sickLeave,\n 'time-off': timeOff,\n 'upgrade-to-hr': upgradeToHr,\n 'e-mail': email,\n};\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport illustrations from '../../../utils/illustrations';\n\nexport type IllustrationVariant = keyof typeof illustrations;\n\n@Component({\n tag: 'p-illustration',\n // shadow: true,\n})\nexport class Illustration {\n /**\n * The icon the be displayed\n */\n @Prop() variant!: IllustrationVariant;\n\n render() {\n const illustration = illustrations[this.variant];\n\n return <Host class=\"p-illustration block\" innerHTML={illustration}></Host>;\n }\n}\n","p-table-cell {\n @apply flex gap-4 items-center;\n\n // TODO: Remove this\n // @import '../../../style/form/checkbox';\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport {\n isTableColumnSizesKey,\n TableColumnSizes,\n TableColumnSizesKey,\n TableDefinitionData,\n TableDefinitionTemplateFunc,\n} from '../../../types';\nimport { objectGetByPath } from '../../../utils';\nimport { TableColumn } from '../../helpers/table-column/table-column.component';\n\n@Component({\n tag: 'p-table-cell',\n styleUrl: 'table-cell.component.scss',\n})\nexport class TableCell {\n /**\n * The variant of the column\n */\n @Prop() variant: 'default' | 'loading' | 'header' = 'default';\n\n /**\n * The index of the column\n */\n @Prop() index: number;\n\n /**\n * The index of the row\n */\n @Prop() rowIndex: number;\n\n /**\n * The definition of the table column\n */\n @Prop() definition?: TableColumn;\n\n /**\n * The item in question\n */\n @Prop() item: any;\n\n /**\n * The value of the column\n */\n @Prop() value: any;\n\n /**\n * The checkbox to show\n */\n @Prop() checkbox: any;\n\n /**\n * The template to show\n */\n @Prop() template: TableDefinitionTemplateFunc = ({\n value,\n }: TableDefinitionData) => value;\n\n get data(): TableDefinitionData | { value: string } {\n if (this.variant === 'header') {\n return {\n value: this.value,\n };\n }\n\n return {\n value:\n this.value ?? objectGetByPath(this.item, this.definition.path),\n item: this.item,\n index: this.index,\n rowIndex: this.rowIndex,\n };\n }\n\n render() {\n return (\n <Host\n class={{\n 'p-table-cell': true,\n [`variant-${this.variant}`]: true,\n ...this._getColumnClasses(),\n }}\n >\n {this.checkbox}\n\n {this.variant === 'loading' ? (\n <p-loader\n variant=\"ghost\"\n class=\"h-6 w-full flex-1 rounded\"\n />\n ) : (\n <div\n class={{\n flex: true,\n 'justify-start': this.definition.align === 'start',\n 'justify-center':\n this.definition.align === 'center',\n 'justify-end': this.definition.align === 'end',\n }}\n >\n {this.variant === 'header' ? (\n this.data.value\n ) : this.definition.useSlot ? (\n <slot />\n ) : (\n this.template(this.data as TableDefinitionData)\n )}\n </div>\n )}\n </Host>\n );\n }\n\n private _getColumnClasses() {\n const sizes = this.definition ? this._getSizes(this.definition) : {};\n return {\n 'justify-start':\n !this.definition?.align || this.definition?.align === 'start',\n 'justify-center': this.definition?.align === 'center',\n 'justify-end': this.definition?.align === 'end',\n 'font-semibold':\n this.variant !== 'header' && this.definition?.type === 'th',\n 'text-storm-dark':\n this.variant !== 'header' && this.definition?.type === 'th',\n 'pr-4': this.definition.isLast === false,\n ...sizes,\n };\n }\n\n /* \n With this, we shall hack the system in ways no one would ever have thought.\n \n <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>\n <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>\n <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>\n <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>\n <div class=\"desktop-sm:w-1/12 desktop-sm:w-2/12 desktop-sm:w-3/12 desktop-sm:w-4/12 desktop-sm:w-5/12 desktop-sm:w-6/12 desktop-sm:w-7/12 desktop-sm:w-8/12 desktop-sm:w-9/12 desktop-sm:w-10/12 desktop-sm:w-11/12 desktop-sm:w-12/12\"></div>\n <div class=\"desktop:w-1/12 desktop:w-2/12 desktop:w-3/12 desktop:w-4/12 desktop:w-5/12 desktop:w-6/12 desktop:w-7/12 desktop:w-8/12 desktop:w-9/12 desktop:w-10/12 desktop:w-11/12 desktop:w-12/12\"></div>\n <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>\n <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>\n\n \n ⠀⠀⠀⠀⠀⣠⣴⣶⣿⣿⠿⣷⣶⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣷⠿⣿⣿⣶⣦⣀⠀⠀⠀⠀⠀\n ⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣶⣦⣬⡉⠒⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠚⢉⣥⣴⣾⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀\n ⠀⠀⠀⡾⠿⠛⠛⠛⠛⠿⢿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣿⠿⠿⠛⠛⠛⠛⠿⢧⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠻⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⡿⠟⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⣠⣤⠶⠶⠶⠰⠦⣤⣀⠀⠙⣷⠀⠀⠀⠀⠀⠀⠀⢠⡿⠋⢀⣀⣤⢴⠆⠲⠶⠶⣤⣄⠀⠀⠀⠀⠀⠀⠀\n ⠀⠘⣆⠀⠀⢠⣾⣫⣶⣾⣿⣿⣿⣿⣷⣯⣿⣦⠈⠃⡇⠀⠀⠀⠀⢸⠘⢁⣶⣿⣵⣾⣿⣿⣿⣿⣷⣦⣝⣷⡄⠀⠀⡰⠂⠀\n ⠀⠀⣨⣷⣶⣿⣧⣛⣛⠿⠿⣿⢿⣿⣿⣛⣿⡿⠀⠀⡇⠀⠀⠀⠀⢸⠀⠈⢿⣟⣛⠿⢿⡿⢿⢿⢿⣛⣫⣼⡿⣶⣾⣅⡀⠀\n ⢀⡼⠋⠁⠀⠀⠈⠉⠛⠛⠻⠟⠸⠛⠋⠉⠁⠀⠀⢸⡇⠀⠀⠄⠀⢸⡄⠀⠀⠈⠉⠙⠛⠃⠻⠛⠛⠛⠉⠁⠀⠀⠈⠙⢧⡀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⡇⢠⠀⠀⠀⢸⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⡇⠀⠀⠀⠀⢸⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⠟⠁⣿⠇⠀⠀⠀⠀⢸⡇⠙⢿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠰⣄⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⠖⡾⠁⠀⠀⣿⠀⠀⠀⠀⠀⠘⣿⠀⠀⠙⡇⢸⣷⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⣰⠄⠀\n ⠀⠀⢻⣷⡦⣤⣤⣤⡴⠶⠿⠛⠉⠁⠀⢳⠀⢠⡀⢿⣀⠀⠀⠀⠀⣠⡟⢀⣀⢠⠇⠀⠈⠙⠛⠷⠶⢦⣤⣤⣤⢴⣾⡏⠀⠀\n ⠀⠀⠈⣿⣧⠙⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⢊⣙⠛⠒⠒⢛⣋⡚⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⡿⠁⣾⡿⠀⠀⠀\n ⠀⠀⠀⠘⣿⣇⠈⢿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⡿⢿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⡟⠁⣼⡿⠁⠀⠀⠀\n ⠀⠀⠀⠀⠘⣿⣦⠀⠻⣿⣷⣦⣤⣤⣶⣶⣶⣿⣿⣿⣿⠏⠀⠀⠻⣿⣿⣿⣿⣶⣶⣶⣦⣤⣴⣿⣿⠏⢀⣼⡿⠁⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠘⢿⣷⣄⠙⠻⠿⠿⠿⠿⠿⢿⣿⣿⣿⣁⣀⣀⣀⣀⣙⣿⣿⣿⠿⠿⠿⠿⠿⠿⠟⠁⣠⣿⡿⠁⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠈⠻⣯⠙⢦⣀⠀⠀⠀⠀⠀⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠀⠀⠀⠀⠀⣠⠴⢋⣾⠟⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠙⢧⡀⠈⠉⠒⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠐⠒⠉⠁⢀⡾⠃⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠳⣄⠀⠀⠀⠀⠀⠀⠀⠀⠻⣿⣿⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⣠⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢦⡀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⢀⡴⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\n */\n private _getSizes({ sizes }: TableColumn) {\n if (sizes === 'auto' || !sizes) {\n return {\n 'w-auto': true,\n };\n }\n\n if (sizes === 'hidden') {\n return {\n hidden: true,\n };\n }\n\n if (typeof sizes === 'object') {\n sizes = sizes as TableColumnSizes;\n const classes: any = {};\n let previousSize: TableColumnSizesKey | undefined;\n\n for (let size in sizes) {\n if (!isTableColumnSizesKey(sizes, size)) {\n continue;\n }\n\n if (size === 'default') {\n if (sizes.default === 'hidden') {\n classes['hidden'] = true;\n previousSize = size;\n continue;\n }\n\n classes[`w-${sizes.default}/12`] = true;\n previousSize = size;\n continue;\n }\n\n const currentValue = sizes[size];\n const previousValue = previousSize ? sizes[previousSize] : null;\n if (\n currentValue !== 'hidden' &&\n previousValue &&\n previousValue === 'hidden'\n ) {\n classes[`${size}:flex`] = true;\n }\n\n if (currentValue === 'hidden') {\n classes[`${size}:hidden`] = true;\n previousSize = size;\n continue;\n }\n\n if (currentValue === 12 || currentValue === 'full') {\n classes[`${size}:w-full`] = true;\n }\n\n classes[`${size}:w-${currentValue}/12`] = true;\n previousSize = size;\n }\n\n return classes;\n }\n\n if (sizes === 12 || sizes === 'full') {\n return {\n 'w-full': true,\n };\n }\n\n // is a number.\n return {\n [`w-${sizes}/12`]: true,\n };\n }\n}\n",":host {\n @apply flex flex-col w-full;\n @apply bg-white rounded-large;\n @apply shadow-4 #{!important};\n}\n","import { Component, h, Host } from '@stencil/core';\n\n@Component({\n tag: 'p-table-container',\n styleUrl: 'table-container.component.scss',\n shadow: true,\n})\nexport class TableContainer {\n render() {\n return (\n <Host class=\"p-table-container\">\n <slot />\n </Host>\n );\n }\n}\n",":host {\n @apply grid grid-cols-1 gap-4;\n @apply w-full;\n @apply p-6;\n\n > p-pagination {\n @apply flex justify-self-center col-start-1;\n }\n\n > p-loader {\n @apply col-start-1;\n }\n\n @screen desktop-xs {\n @apply grid-cols-3;\n grid-template-areas: 'page-size pagination export';\n\n > p-page-size-select {\n @apply col-start-1;\n }\n\n > p-pagination {\n @apply col-start-2;\n }\n\n > p-loader {\n @apply col-start-2;\n }\n\n > p-button {\n @apply justify-self-end col-start-3;\n }\n }\n}\n\n:host(.page-size-disabled.export-disabled) {\n @apply grid-cols-1;\n\n > p-pagination {\n @apply col-start-1;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State\n} from '@stencil/core';\nimport {\n formatTranslation,\n getLocaleComponentStrings\n} from '../../../utils/localization';\nimport { defaultSize, defaultSizeOptions } from '../page-size-select/constants';\n\n@Component({\n tag: 'p-table-footer',\n styleUrl: 'table-footer.component.scss',\n shadow: true,\n})\nexport class TableFooter {\n /**\n * Wether to enable page size select\n */\n @Prop() enablePageSize: boolean = true;\n\n /**\n * Wether to enable pagination\n */\n @Prop() enablePagination: boolean = true;\n\n /**\n * Wether to enable export\n */\n @Prop() enableExport: boolean = true;\n\n /**\n * Wether we want to show loading state\n */\n @Prop() loading: boolean = false;\n\n /**\n * The current page\n */\n @Prop({ mutable: true, reflect: true }) page: number = 1;\n\n /**\n * The total amount of items\n */\n @Prop() total!: number;\n\n /**\n * Event whenever the page changes\n */\n @Event({\n bubbles: false\n }) pageChange: EventEmitter<number>;\n\n /**\n * The amount of items per page\n */\n @Prop() pageSize: number = defaultSize;\n\n /**\n * The options for the page size\n */\n @Prop() pageSizeOptions: number[] = defaultSizeOptions;\n\n /**\n * Event whenever the page changes\n */\n @Event({\n bubbles: false\n }) pageSizeChange: EventEmitter<number>;\n\n /**\n * Event whenever the page changes\n */\n @Event({\n bubbles: false\n }) export: EventEmitter<number>;\n\n /**\n * Wether to hide when there is only 1 page available\n */\n @Prop() hideOnSinglePage: boolean = true;\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n /**\n * Locales used for this component\n */\n @State() private _locales: any = {};\n\n componentWillLoad() {\n this._setLocales();\n }\n\n render() {\n const hidePageSizeSelect =\n this.hideOnSinglePage && this.total < this.pageSizeOptions?.[0];\n return (\n <Host\n class={`p-table-footer ${\n !this.enablePageSize && 'page-size-disabled'\n } ${!this.enablePagination && 'pagination-disabled'} ${\n !this.enableExport && 'export-disabled'\n }`}\n >\n {!this.loading &&\n this.enablePagination &&\n this.enablePageSize && (\n <p-page-size-select\n class={\n !hidePageSizeSelect && 'hidden desktop-xs:flex'\n }\n hidden={hidePageSizeSelect}\n size={this.pageSize}\n sizeOptions={this.pageSizeOptions}\n onSizeChange={({ detail }) =>\n this._changePageSize(detail)\n }\n />\n )}\n\n {this.loading && (\n <p-loader\n variant=\"ghost\"\n class=\"rounded w-full h-8\"\n ></p-loader>\n )}\n\n {!this.loading && this.enablePagination && (\n <p-pagination\n pageSize={this.pageSize}\n total={this.total}\n page={this.page}\n hideOnSinglePage={this.hideOnSinglePage}\n onPageChange={({ detail }) =>\n this.pageChange.emit(detail)\n }\n />\n )}\n {!this.loading && this.enableExport && (\n <p-button\n class=\"hidden desktop-xs:flex\"\n variant=\"secondary\"\n size=\"small\"\n icon=\"download\"\n onClick={() => this.export.emit()}\n >\n {formatTranslation(this._locales.export)}\n </p-button>\n )}\n </Host>\n );\n }\n\n @Listen('localeChanged', { target: 'body' })\n private async _setLocales(): Promise<void> {\n this._locales = await getLocaleComponentStrings(this._el);\n }\n\n private _changePageSize(s?: number) {\n if (!s) {\n return;\n }\n\n this.pageSize = s;\n this.pageSizeChange.emit(this.pageSize);\n }\n}\n","export function isFunction(value) {\n return typeof value === 'function';\n}\n//# sourceMappingURL=isFunction.js.map","export function createErrorClass(createImpl) {\n const _super = (instance) => {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n const ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n//# sourceMappingURL=createErrorClass.js.map","import { createErrorClass } from './createErrorClass';\nexport const UnsubscriptionError = createErrorClass((_super) => function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? `${errors.length} errors occurred during unsubscription:\n${errors.map((err, i) => `${i + 1}) ${err.toString()}`).join('\\n ')}`\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n});\n//# sourceMappingURL=UnsubscriptionError.js.map","export function arrRemove(arr, item) {\n if (arr) {\n const index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n//# sourceMappingURL=arrRemove.js.map","import { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nexport class Subscription {\n constructor(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n unsubscribe() {\n let errors;\n if (!this.closed) {\n this.closed = true;\n const { _parentage } = this;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n for (const parent of _parentage) {\n parent.remove(this);\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n const { initialTeardown: initialFinalizer } = this;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n const { _finalizers } = this;\n if (_finalizers) {\n this._finalizers = null;\n for (const finalizer of _finalizers) {\n try {\n execFinalizer(finalizer);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = [...errors, ...err.errors];\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n }\n add(teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n }\n _hasParent(parent) {\n const { _parentage } = this;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n }\n _addParent(parent) {\n const { _parentage } = this;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n }\n _removeParent(parent) {\n const { _parentage } = this;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n }\n remove(teardown) {\n const { _finalizers } = this;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n }\n}\nSubscription.EMPTY = (() => {\n const empty = new Subscription();\n empty.closed = true;\n return empty;\n})();\nexport const EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n }\n else {\n finalizer.unsubscribe();\n }\n}\n//# sourceMappingURL=Subscription.js.map","export const config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n//# sourceMappingURL=config.js.map","export const timeoutProvider = {\n setTimeout(handler, timeout, ...args) {\n const { delegate } = timeoutProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout(handler, timeout, ...args);\n }\n return setTimeout(handler, timeout, ...args);\n },\n clearTimeout(handle) {\n const { delegate } = timeoutProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=timeoutProvider.js.map","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(() => {\n const { onUnhandledError } = config;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n//# sourceMappingURL=reportUnhandledError.js.map","export function noop() { }\n//# sourceMappingURL=noop.js.map","export const COMPLETE_NOTIFICATION = (() => createNotification('C', undefined, undefined))();\nexport function errorNotification(error) {\n return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n return {\n kind,\n value,\n error,\n };\n}\n//# sourceMappingURL=NotificationFactories.js.map","import { config } from '../config';\nlet context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n const isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n const { errorThrown, error } = context;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n//# sourceMappingURL=errorContext.js.map","import { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nexport class Subscriber extends Subscription {\n constructor(destination) {\n super();\n this.isStopped = false;\n if (destination) {\n this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(this);\n }\n }\n else {\n this.destination = EMPTY_OBSERVER;\n }\n }\n static create(next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n }\n next(value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n }\n error(err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n }\n complete() {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n }\n unsubscribe() {\n if (!this.closed) {\n this.isStopped = true;\n super.unsubscribe();\n this.destination = null;\n }\n }\n _next(value) {\n this.destination.next(value);\n }\n _error(err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n _complete() {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n }\n}\nconst _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nclass ConsumerObserver {\n constructor(partialObserver) {\n this.partialObserver = partialObserver;\n }\n next(value) {\n const { partialObserver } = this;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n error(err) {\n const { partialObserver } = this;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n else {\n handleUnhandledError(err);\n }\n }\n complete() {\n const { partialObserver } = this;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n }\n}\nexport class SafeSubscriber extends Subscriber {\n constructor(observerOrNext, error, complete) {\n super();\n let partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined,\n };\n }\n else {\n let context;\n if (this && config.useDeprecatedNextContext) {\n context = Object.create(observerOrNext);\n context.unsubscribe = () => this.unsubscribe();\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context),\n error: observerOrNext.error && bind(observerOrNext.error, context),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context),\n };\n }\n else {\n partialObserver = observerOrNext;\n }\n }\n this.destination = new ConsumerObserver(partialObserver);\n }\n}\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n }\n else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n const { onStoppedNotification } = config;\n onStoppedNotification && timeoutProvider.setTimeout(() => onStoppedNotification(notification, subscriber));\n}\nexport const EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n//# sourceMappingURL=Subscriber.js.map","export const observable = (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')();\n//# sourceMappingURL=observable.js.map","export function identity(x) {\n return x;\n}\n//# sourceMappingURL=identity.js.map","import { identity } from './identity';\nexport function pipe(...fns) {\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce((prev, fn) => fn(prev), input);\n };\n}\n//# sourceMappingURL=pipe.js.map","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nexport class Observable {\n constructor(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n lift(operator) {\n const observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n }\n subscribe(observerOrNext, error, complete) {\n const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(() => {\n const { operator, source } = this;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n this._subscribe(subscriber)\n :\n this._trySubscribe(subscriber));\n });\n return subscriber;\n }\n _trySubscribe(sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n }\n forEach(next, promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n const subscriber = new SafeSubscriber({\n next: (value) => {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n this.subscribe(subscriber);\n });\n }\n _subscribe(subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n }\n [Symbol_observable]() {\n return this;\n }\n pipe(...operations) {\n return pipeFromArray(operations)(this);\n }\n toPromise(promiseCtor) {\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor((resolve, reject) => {\n let value;\n this.subscribe((x) => (value = x), (err) => reject(err), () => resolve(value));\n });\n }\n}\nObservable.create = (subscribe) => {\n return new Observable(subscribe);\n};\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n//# sourceMappingURL=Observable.js.map","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n return (source) => {\n if (hasLift(source)) {\n return source.lift(function (liftedSource) {\n try {\n return init(liftedSource, this);\n }\n catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n//# sourceMappingURL=lift.js.map","import { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nexport class OperatorSubscriber extends Subscriber {\n constructor(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n super(destination);\n this.onFinalize = onFinalize;\n this.shouldUnsubscribe = shouldUnsubscribe;\n this._next = onNext\n ? function (value) {\n try {\n onNext(value);\n }\n catch (err) {\n destination.error(err);\n }\n }\n : super._next;\n this._error = onError\n ? function (err) {\n try {\n onError(err);\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : super._error;\n this._complete = onComplete\n ? function () {\n try {\n onComplete();\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : super._complete;\n }\n unsubscribe() {\n var _a;\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n const { closed } = this;\n super.unsubscribe();\n !closed && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n }\n }\n}\n//# sourceMappingURL=OperatorSubscriber.js.map","import { createErrorClass } from './createErrorClass';\nexport const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nexport class Subject extends Observable {\n constructor() {\n super();\n this.closed = false;\n this.currentObservers = null;\n this.observers = [];\n this.isStopped = false;\n this.hasError = false;\n this.thrownError = null;\n }\n lift(operator) {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n }\n _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n next(value) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n error(err) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n }\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n }\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n }\n get observed() {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n }\n _trySubscribe(subscriber) {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n _innerSubscribe(subscriber) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n _checkFinalizedStatuses(subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n }\n asObservable() {\n const observable = new Observable();\n observable.source = this;\n return observable;\n }\n}\nSubject.create = (destination, source) => {\n return new AnonymousSubject(destination, source);\n};\nexport class AnonymousSubject extends Subject {\n constructor(destination, source) {\n super();\n this.destination = destination;\n this.source = source;\n }\n next(value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n }\n error(err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n }\n complete() {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n _subscribe(subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n }\n}\n//# sourceMappingURL=Subject.js.map","export const dateTimestampProvider = {\n now() {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n//# sourceMappingURL=dateTimestampProvider.js.map","import { Subscription } from '../Subscription';\nexport class Action extends Subscription {\n constructor(scheduler, work) {\n super();\n }\n schedule(state, delay = 0) {\n return this;\n }\n}\n//# sourceMappingURL=Action.js.map","export const intervalProvider = {\n setInterval(handler, timeout, ...args) {\n const { delegate } = intervalProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=intervalProvider.js.map","import { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nexport class AsyncAction extends Action {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n this.pending = false;\n }\n schedule(state, delay = 0) {\n var _a;\n if (this.closed) {\n return this;\n }\n this.state = state;\n const id = this.id;\n const scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);\n return this;\n }\n requestAsyncId(scheduler, _id, delay = 0) {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n recycleAsyncId(_scheduler, id, delay = 0) {\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n return undefined;\n }\n execute(state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n _execute(state, _delay) {\n let errored = false;\n let errorValue;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n this.work = this.state = this.scheduler = null;\n this.pending = false;\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n super.unsubscribe();\n }\n }\n}\n//# sourceMappingURL=AsyncAction.js.map","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class Scheduler {\n constructor(schedulerActionCtor, now = Scheduler.now) {\n this.schedulerActionCtor = schedulerActionCtor;\n this.now = now;\n }\n schedule(work, delay = 0, state) {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\nScheduler.now = dateTimestampProvider.now;\n//# sourceMappingURL=Scheduler.js.map","import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n constructor(SchedulerAction, now = Scheduler.now) {\n super(SchedulerAction, now);\n this.actions = [];\n this._active = false;\n }\n flush(action) {\n const { actions } = this;\n if (this._active) {\n actions.push(action);\n return;\n }\n let error;\n this._active = true;\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()));\n this._active = false;\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n//# sourceMappingURL=AsyncScheduler.js.map","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\nexport const async = asyncScheduler;\n//# sourceMappingURL=async.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function debounceTime(dueTime, scheduler = asyncScheduler) {\n return operate((source, subscriber) => {\n let activeTask = null;\n let lastValue = null;\n let lastTime = null;\n const emit = () => {\n if (activeTask) {\n activeTask.unsubscribe();\n activeTask = null;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n function emitWhenIdle() {\n const targetTime = lastTime + dueTime;\n const now = scheduler.now();\n if (now < targetTime) {\n activeTask = this.schedule(undefined, targetTime - now);\n subscriber.add(activeTask);\n return;\n }\n emit();\n }\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n lastValue = value;\n lastTime = scheduler.now();\n if (!activeTask) {\n activeTask = scheduler.schedule(emitWhenIdle, dueTime);\n subscriber.add(activeTask);\n }\n }, () => {\n emit();\n subscriber.complete();\n }, undefined, () => {\n lastValue = activeTask = null;\n }));\n });\n}\n//# sourceMappingURL=debounceTime.js.map","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector = identity) {\n comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n return operate((source, subscriber) => {\n let previousKey;\n let first = true;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const currentKey = keySelector(value);\n if (first || !comparator(previousKey, currentKey)) {\n first = false;\n previousKey = currentKey;\n subscriber.next(value);\n }\n }));\n });\n}\nfunction defaultCompare(a, b) {\n return a === b;\n}\n//# sourceMappingURL=distinctUntilChanged.js.map",":host {\n @apply flex flex-col gap-4;\n @apply w-full;\n @apply p-4 desktop-xs:p-6;\n\n @screen desktop-xs {\n @apply grid grid-cols-2;\n }\n\n > div.left-side {\n @apply col-start-1 justify-self-start;\n }\n\n > div.right-side {\n @apply col-start-2;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n} from '@stencil/core';\nimport { debounceTime, distinctUntilChanged, Subject } from 'rxjs';\nimport { IconVariant } from '../../../components';\nimport { QuickFilter } from '../../../types/table';\nimport {\n formatTranslation,\n getLocaleComponentStrings,\n} from '../../../utils/localization';\n\nexport type templateFunc = () => string;\nexport type buttonTemplateFunc = (amount: number) => string;\n\n@Component({\n tag: 'p-table-header',\n styleUrl: 'table-header.component.scss',\n shadow: true,\n})\nexport class TableHeader {\n private _defaultFilterButtonTemplate: templateFunc = () =>\n formatTranslation(this._locales.filter);\n private _defaultEditButtonTemplate: buttonTemplateFunc = (amount: number) =>\n this.editText\n ? this.editText\n : formatTranslation(\n amount === 0\n ? this._locales.edit\n : amount === 1\n ? this._locales.edit_single\n : this._locales.edit_plural,\n { amount }\n );\n\n /**\n * Quick filters to show\n */\n @Prop() quickFilters: QuickFilter[] = [];\n\n /**\n * Active quick filter identifier\n */\n @Prop() activeQuickFilterIdentifier: string;\n\n /**\n * Wether we want to show loading state\n */\n @Prop() loading: boolean = false;\n\n /**\n * Wether to show the search input\n */\n @Prop() enableSearch: boolean = true;\n\n /**\n * The amount of items that are selected\n */\n @Prop() itemsSelectedAmount: number = 0;\n\n /**\n * The query to show in the search bar\n */\n @Prop({ mutable: true }) query: string;\n\n /**\n * Wether to show the filter button\n */\n @Prop() enableFilter: boolean = true;\n\n /**\n * The amount of filters being selected\n */\n @Prop() selectedFiltersAmount: number;\n\n /**\n * The template for the filter button text\n */\n @Prop() filterButtonTemplate: templateFunc =\n this._defaultFilterButtonTemplate;\n\n /**\n * Wether to show the edit button\n */\n @Prop() enableEdit: boolean = true;\n\n /**\n * Wether the edit button is loading\n */\n @Prop() editLoading: boolean = false;\n\n /**\n * The edit button icon\n */\n @Prop() editIcon: IconVariant = 'pencil';\n\n /**\n * The edit button text if changed\n */\n @Prop() editText: string;\n\n /**\n * Wether to enable the edit button\n */\n @Prop({ mutable: true }) canEdit: boolean = false;\n\n /**\n * The template for the edit button text\n */\n @Prop() editButtonTemplate: buttonTemplateFunc =\n this._defaultEditButtonTemplate;\n\n /**\n * Event when one of the quick filters is clicked\n */\n @Event({\n bubbles: false,\n })\n quickFilter: EventEmitter<QuickFilter>;\n\n /**\n * Event when the query changes\n */\n @Event({\n bubbles: false,\n })\n queryChange: EventEmitter<string>;\n\n /**\n * Event when the filter button is clicked\n */\n @Event({\n bubbles: false,\n })\n filter: EventEmitter<null>;\n\n /**\n * Event when the edit button is clicked\n */\n @Event({\n bubbles: false,\n })\n edit: EventEmitter<null>;\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n /**\n * Locales used for this component\n */\n @State() private _locales: any = {};\n\n private _queryObserver = new Subject<string>();\n private _hasCustomFilterSlot = false;\n\n componentWillLoad() {\n this._hasCustomFilterSlot = !!this._el.querySelector(\n ':scope > [slot=\"custom-filter\"]'\n );\n\n this._setLocales();\n }\n\n componentDidLoad() {\n this._queryObserver\n .pipe(debounceTime(300), distinctUntilChanged())\n .subscribe((value) => this.queryChange.emit(value));\n }\n\n render() {\n const activeQuickFilter = this.quickFilters.find(\n (f) => f.identifier === this.activeQuickFilterIdentifier\n );\n const mobileTotal =\n (this.selectedFiltersAmount || 0) +\n (activeQuickFilter?.default ? 0 : 1);\n\n return (\n <Host class=\"p-table-header\">\n {this.loading && (\n <p-loader\n variant=\"ghost\"\n class=\"hidden h-8 w-3/4 rounded desktop-xs:flex\"\n ></p-loader>\n )}\n\n {!this.loading &&\n (this._hasCustomFilterSlot ||\n this.quickFilters.length > 0) && (\n <div class=\"left-side flex flex-col justify-start gap-4 desktop-xs:flex-row\">\n {this._hasCustomFilterSlot && (\n <slot name=\"custom-filter\" />\n )}\n\n {this.quickFilters.length > 0 && (\n <p-segment-container class=\"hidden desktop-xs:flex\">\n {this.quickFilters.map((item) => (\n <p-segment-item\n active={\n item.identifier ===\n this.activeQuickFilterIdentifier\n }\n onClick={() =>\n this.quickFilter.emit(item)\n }\n >\n {typeof item.text === 'string'\n ? item.text\n : item.text()}{' '}\n {item?.count >= 0\n ? `(${item.count})`\n : ''}\n </p-segment-item>\n ))}\n </p-segment-container>\n )}\n </div>\n )}\n\n <div class=\"right-side flex flex-col justify-end gap-4 desktop-xs:flex-row\">\n {this.enableSearch && (\n <p-input-group\n icon=\"search\"\n size=\"small\"\n class=\"desktop-xs:w-48\"\n >\n <input\n type=\"text\"\n slot=\"input\"\n placeholder=\"Zoeken...\"\n value={this.query}\n onInput={(ev) =>\n this._queryObserver.next(\n (ev.target as HTMLInputElement).value\n )\n }\n />\n </p-input-group>\n )}\n\n {this.enableFilter && (\n <p-button\n icon=\"filter\"\n variant=\"secondary\"\n size=\"small\"\n class=\"w-full desktop-xs:w-auto\"\n onClick={() => this.filter.emit()}\n >\n {this.filterButtonTemplate\n ? this.filterButtonTemplate()\n : this._defaultFilterButtonTemplate()}\n {this.selectedFiltersAmount &&\n this._getLabel(this.selectedFiltersAmount)}\n {mobileTotal > 0 &&\n this._getLabel(mobileTotal, 'mobile')}\n </p-button>\n )}\n\n {this.enableEdit && this._buttonTemplate()}\n </div>\n\n {this.enableEdit && this.canEdit && (\n <div class=\"fixed bottom-0 left-0 block w-full border border-solid border-transparent border-t-mystic-dark bg-white p-4 desktop-xs:hidden\">\n {this._buttonTemplate(true)}\n </div>\n )}\n </Host>\n );\n }\n\n @Listen('localeChanged', { target: 'body' })\n private async _setLocales(): Promise<void> {\n this._locales = await getLocaleComponentStrings(this._el);\n }\n\n private _buttonTemplate(mobile = false) {\n return (\n <p-button\n class={mobile ? 'w-full' : 'hidden desktop-xs:flex'}\n icon={this.editIcon}\n size=\"small\"\n disabled={!this.canEdit}\n onClick={() => this.edit.emit()}\n loading={this.editLoading}\n >\n {this.editButtonTemplate\n ? this.editButtonTemplate(\n mobile ? this.itemsSelectedAmount : 0\n )\n : this._defaultEditButtonTemplate(\n mobile ? this.itemsSelectedAmount : 0\n )}\n </p-button>\n );\n }\n\n private _getLabel(amount, variant: 'mobile' | 'default' = 'default') {\n return (\n <p-label\n size=\"small\"\n variant=\"negative\"\n behavior=\"text\"\n class={`ml-1 ${\n variant === 'default'\n ? 'hidden desktop-xs:flex'\n : 'flex desktop-xs:hidden'\n }`}\n >\n {amount}\n </p-label>\n );\n }\n}\n",":host {\n @apply flex w-full flex-col;\n @apply text-sm text-storm-medium;\n @apply px-6;\n\n .content {\n @apply flex min-h-[3.875rem] w-full flex-nowrap items-center justify-between py-2 tablet:h-18 tablet:py-6;\n }\n}\n\n:host(.variant-header) {\n @apply bg-mystic-light;\n @apply text-xs font-semibold uppercase text-storm-vague;\n @apply border-x-0 border-y border-solid border-y-mystic-dark #{!important};\n\n .content {\n @apply min-h-0 py-2 tablet:h-auto;\n }\n}\n\n:host(.enable-hover:hover) {\n @apply cursor-pointer bg-indigo-light;\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n tag: 'p-table-row',\n styleUrl: 'table-row.component.scss',\n shadow: true,\n})\nexport class TableRow {\n /**\n * Variant of the header\n */\n @Prop() variant: 'default' | 'header' = 'default';\n\n /**\n * Enable hover\n */\n @Prop() enableHover: boolean = true;\n\n render() {\n return (\n <Host\n class={`p-table-row variant-${this.variant} ${\n this.enableHover &&\n this.variant === 'default' &&\n 'enable-hover'\n }`}\n >\n <div class=\"content\">\n <slot />\n </div>\n\n {this.variant === 'default' && <p-divider class=\"m-0\" />}\n </Host>\n );\n }\n}\n"],"mappings":"4qyNAaA,MAAAA,EAAe,CACX,cAAeC,EACf,qBAAsBC,EACtB,uBAAwBC,EACxB,kBAAmBC,EACnBC,cACAC,WACAC,YACAC,YACA,aAAcC,EACd,WAAYC,EACZ,gBAAiBC,EACjB,SAAU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vU,KAAKoU,QAChBhQ,QAAS,IAAMpE,KAAKoS,KAAKlO,OACzBT,QAASzD,KAAKwU,aAEbxU,KAAKyU,mBACAzU,KAAKyU,mBACDJ,EAASrU,KAAK0U,oBAAsB,GAExC1U,KAAKiS,2BACDoC,EAASrU,KAAK0U,oBAAsB,G,CAMlD,SAAAT,CAAU/B,EAAQjS,EAAgC,WACtD,OACIC,EAAA,WACImC,KAAK,QACLpC,QAAQ,WACR0U,SAAS,OACTvU,MAAO,QACHH,IAAY,UACN,yBACA,4BAGTiS,E,wCC7TjB,MAAM0C,GAAuB,w5E,MCOhBC,GAAQ,M,sCAIuB,U,iBAKT,I,CAE/B,MAAA/U,GACI,OACII,EAACC,EAAI,CACDC,MAAO,uBAAuBJ,KAAKC,WAC/BD,KAAK8U,aACL9U,KAAKC,UAAY,WACjB,kBAGJC,EAAA,OAAKE,MAAM,WACPF,EAAA,cAGHF,KAAKC,UAAY,WAAaC,EAAA,aAAWE,MAAM,Q"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as n}from"./p-e4d5e7a7.js";import{f as r,g as h}from"./p-33fa21e3.js";import{d as o,a}from"./p-da7b6f2c.js";const l=".flex{display:flex!important}.flex-shrink{flex-shrink:1!important}*{box-sizing:border-box}p-table{display:flex;flex-direction:column}p-table .p-input[type=checkbox]{flex-shrink:0}.static{position:static!important}.mb-14{margin-bottom:3.5rem!important}.mb-6{margin-bottom:1.5rem!important}.table{display:table!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.max-w-\\[20rem\\]{max-width:20rem!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-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!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}";const d=class{constructor(e){t(this,e);this.selectedRowsChange=i(this,"selectedRowsChange",3);this.rowClick=i(this,"rowClick",3);this.rowSelected=i(this,"rowSelected",3);this.rowDeselected=i(this,"rowDeselected",3);this.hasRendered=i(this,"hasRendered",3);this.quickFilter=i(this,"quickFilter",3);this.queryChange=i(this,"queryChange",3);this.filter=i(this,"filter",3);this.edit=i(this,"edit",3);this.pageChange=i(this,"pageChange",3);this.pageSizeChange=i(this,"pageSizeChange",3);this.export=i(this,"export",3);this.emptyStateActionClick=i(this,"emptyStateActionClick",3);this._ctrlDown=false;this._hasCustomFilterSlot=false;this.items=undefined;this.loading=false;this.headerLoading=false;this.footerLoading=false;this.amountOfLoadingRows=6;this.enableRowSelection=true;this.enableRowClick=true;this.selectedRows=[];this.selectionKey=undefined;this.canSelectKey=undefined;this.enableHeader=true;this.quickFilters=[];this.activeQuickFilterIdentifier=undefined;this.enableSearch=true;this.query=undefined;this.enableFilter=true;this.selectedFiltersAmount=undefined;this.filterButtonTemplate=undefined;this.enableEdit=true;this.editButtonLoading=false;this.editButtonIcon="pencil";this.editButtonText=undefined;this.editButtonTemplate=undefined;this.enableFooter=true;this.enablePageSize=true;this.enablePagination=true;this.enableExport=true;this.page=1;this.total=undefined;this.pageSize=o;this.pageSizeOptions=a;this.hideOnSinglePage=true;this.emptyStateHeader=()=>{var t;return r((t=this._locales.empty_state)===null||t===void 0?void 0:t.no_filter.header)};this.emptyStateContent=()=>{var t;return r((t=this._locales.empty_state)===null||t===void 0?void 0:t.no_filter.content)};this.emptyStateAction=()=>{var t;return r((t=this._locales.empty_state)===null||t===void 0?void 0:t.no_filter.action)};this.enableEmptyStateAction=true;this.emptyStateFilteredHeader=()=>r(this._locales.empty_state.filtered.header);this.emptyStateFilteredContent=()=>r(this._locales.empty_state.filtered.content);this._locales={};this._columns=[];this._items=[]}componentWillLoad(){this._hasCustomFilterSlot=!!this._el.querySelector(':scope > [slot="custom-filter"]');this._setLocales();this._parseItems(this.items);this._generateColumns()}componentDidRender(){this.hasRendered.emit()}render(){var t,i;return e(s,{class:"p-table"},e("p-table-container",null,this.enableHeader&&e("p-table-header",{quickFilters:this.quickFilters,activeQuickFilterIdentifier:this.activeQuickFilterIdentifier,onQuickFilter:({detail:t})=>this.quickFilter.emit(t),enableSearch:this.enableSearch,query:this.query,onQueryChange:({detail:t})=>this.queryChange.emit(t),enableFilter:this.enableFilter,selectedFiltersAmount:this.selectedFiltersAmount,filterButtonTemplate:this.filterButtonTemplate,onFilter:()=>this.filter.emit(),enableEdit:this.enableEdit,editIcon:this.editButtonIcon,editText:this.editButtonText,editLoading:this.editButtonLoading,canEdit:!!((t=this.selectedRows)===null||t===void 0?void 0:t.length),editButtonTemplate:this.editButtonTemplate,onEdit:()=>this.edit.emit(),itemsSelectedAmount:(i=this.selectedRows)===null||i===void 0?void 0:i.length,loading:this.headerLoading},this._hasCustomFilterSlot&&e("slot",{name:"custom-filter",slot:"custom-filter"})),this._getHeader(),e("div",{class:"flex flex-col"},this._getRows()),this.enableFooter&&e("p-table-footer",{hideOnSinglePage:this.hideOnSinglePage,enablePageSize:this.enablePageSize,pageSize:this.pageSize,pageSizeOptions:this.pageSizeOptions,onPageSizeChange:({detail:t})=>this.pageSizeChange.emit(t),enablePagination:this.enablePagination,page:this.page,total:this.total,onPageChange:({detail:t})=>this.pageChange.emit(t),enableExport:this.enableExport,onExport:()=>this.export.emit(),loading:this.footerLoading})))}async _setLocales(){this._locales=await h(this._el)}onTableDefinitionUpdated(){this._generateColumns()}keyDown({key:t}){if(t!=="Control"||this._ctrlDown===true){return}this._ctrlDown=true}keyUp({key:t}){if(t!=="Control"||this._ctrlDown===false){return}this._ctrlDown=false}visibilityChange(){if(document.visibilityState!=="hidden"||this._ctrlDown===false){return}this._ctrlDown=false}_parseItems(t){if(!t){this._items=[];return}if(Array.isArray(t)){this._items=t;return}this._items=JSON.parse(t)}_generateColumns(){const t=this._el.querySelectorAll("p-table-column");const i=Array.from(t);i[i.length-1]["isLast"]=true;this._columns=i}_getHeader(){return e("p-table-row",{variant:"header"},this._columns.map(((t,i)=>e("p-table-cell",{definition:t,value:t.name,variant:"header",checkbox:i===0||t.hasCheckbox?this._getCheckbox(null,"loading"):null,index:i}))))}_getRows(){if(this.loading){return Array.from({length:this.amountOfLoadingRows},((t,i)=>e("p-table-row",{enableHover:this.enableRowSelection||this.enableRowClick},this._getLoadingColumns(i))))}if(!this._items.length){return this._getEmptyState()}return this._items.map(((t,i)=>e("p-table-row",{enableHover:this.enableRowSelection||this.enableRowClick,onClick:t=>this._rowClick(t,i)},this._getRowColumns(t,i))))}_getRowColumns(t,i){return this._columns.map(((s,n)=>e("p-table-cell",{definition:s,item:t,checkbox:n===0||s.hasCheckbox?this._getCheckbox(i):null,index:n,rowIndex:i})))}_getLoadingColumns(t){return this._columns.map(((i,s)=>e("p-table-cell",{definition:i,variant:"loading",checkbox:s===0||i.hasCheckbox?this._getCheckbox(t,"loading"):null,index:s,rowIndex:t})))}_getCheckbox(t,i="default"){if(!this.enableRowSelection||!this.selectionKey){return}if(i==="loading"){return e("p-loader",{variant:"ghost",class:"h-6 w-6 rounded"})}if(i==="header"){return e("input",{class:"p-input",type:"checkbox",onChange:t=>this._selectAllChange(t),checked:this._selectionContainsAll(),indeterminate:this._selectionIndeterminate()})}const s=this._items[t];return e("input",{class:"p-input",type:"checkbox",onChange:i=>this._checkboxChange(i===null||i===void 0?void 0:i.target,t),disabled:this.canSelectKey&&!s[this.canSelectKey],checked:this._selectionContains(s,t)})}_getEmptyState(){var t;if(((t=this.query)===null||t===void 0?void 0:t.length)||this.selectedFiltersAmount){return e("div",{class:"flex max-w-[20rem] flex-col items-center self-center py-24 text-center"},e("p-illustration",{variant:"empty-state-search",class:"mb-6"}),e("p",{class:"text-storm-default font-semibold"},this.emptyStateFilteredHeader()),e("p",{class:"mb-14 text-sm text-storm-medium"},this.emptyStateFilteredContent()))}return e("div",{class:`flex max-w-[20rem] flex-col items-center self-center py-24 text-center ${this.enableEmptyStateAction&&"cursor-pointer"}`,onClick:()=>this.enableEmptyStateAction&&this.emptyStateActionClick.emit(null)},e("p-illustration",{variant:"empty-state-add",class:"mb-6"}),e("p",{class:"text-storm-default font-semibold"},this.emptyStateHeader()),e("p",{class:"mb-6 text-sm text-storm-medium"},this.emptyStateContent()),this.enableEmptyStateAction&&e("p-button",{variant:"secondary",icon:"plus",size:"small"},this.emptyStateAction()))}_selectAllChange(t){if(!this.enableRowSelection){return}const i=this._getCheckedValue(t.target);if(i){const t=[];for(let i=0;i<this._items.length;i++){const e=this._items[i];if(this.canSelectKey&&!e[this.canSelectKey]){continue}if(this._selectionContains(e,i)){continue}t.push(e);this.rowSelected.emit(e)}this.selectedRows=[...this.selectedRows,...t];this.selectedRowsChange.emit(this.selectedRows);return}for(let t=0;t<this.selectedRows.length;t++){const i=this.selectedRows[t];const e=this._items.find((e=>this._getSelectionValue(e,t)===this._getSelectionValue(i,t)));if(!e){continue}this.rowDeselected.emit(e)}this.selectedRows=[];this.selectedRowsChange.emit(this.selectedRows)}_checkboxChange(t,i){if(!this.enableRowSelection){return}const e=this._items[i];if(this.canSelectKey&&!e[this.canSelectKey]){t.checked=false;return}const s=this._getCheckedValue(t);if(s){this.selectedRows=[...this.selectedRows,e];this.selectedRowsChange.emit(this.selectedRows);this.rowSelected.emit(e);return}const n=this._selectionContains(e,i,true);const r=[...this.selectedRows];r.splice(n,1);this.selectedRows=r;this.selectedRowsChange.emit(this.selectedRows);this.rowDeselected.emit(e)}_getCheckedValue(t){return t===null||t===void 0?void 0:t.checked}_getSelectionValue(t,i){return this.selectionKey?(t===null||t===void 0?void 0:t[this.selectionKey])||i:i}_selectionContains(t,i,e=false){const s=this.selectedRows.findIndex((e=>this._getSelectionValue(t,i)===this._getSelectionValue(e,i)));return!e?s>=0:s}_selectionContainsAll(){var t,i;let e=true;if(!((t=this._items)===null||t===void 0?void 0:t.length)){return false}for(let t=0;t<((i=this._items)===null||i===void 0?void 0:i.length);t++){const i=this._items[t];const s=this._selectionContains(i,t);if(!s){e=false;break}}return e}_selectionIndeterminate(){var t,i,e;if(!((t=this._items)===null||t===void 0?void 0:t.length)||!((i=this.selectedRows)===null||i===void 0?void 0:i.length)){return false}let s=0;for(let t=0;t<((e=this._items)===null||e===void 0?void 0:e.length);t++){const i=this._items[t];const e=this._selectionContains(i,t);if(e){s++}}return s>0&&s!==this._items.length}_rowClick(t,i){const e=t.target;if(e.tagName.toLowerCase()==="input"||e.type==="checkbox"){return}const s=this._findRow(t.target);const n=this._findRowAction(t.target);if(n){return}if(this.enableRowClick){const t=this._items[i];this.rowClick.emit({item:t,ctrlDown:this._ctrlDown});return}if(!this.enableRowSelection){return}const r=s===null||s===void 0?void 0:s.querySelector('input[type="checkbox"]');if(!r){return}r.checked=!r.checked;this._checkboxChange(r,i)}_findRow(t){var i;if(!t){return t}if(((i=t===null||t===void 0?void 0:t.tagName)===null||i===void 0?void 0:i.toLowerCase())==="p-table-row"){return t}return this._findRow(t===null||t===void 0?void 0:t.parentElement)}_findRowAction(t){var i;if(!t){return null}if(t.getAttribute("data-is-action")!==null&&t.getAttribute("data-is-action")!=="false"){return t}if(((i=t===null||t===void 0?void 0:t.tagName)===null||i===void 0?void 0:i.toLowerCase())==="p-table-row"){return null}return this._findRowAction(t===null||t===void 0?void 0:t.parentElement)}get _el(){return n(this)}static get watchers(){return{items:["_parseItems"]}}};d.style=l;export{d as p_table};
|
|
2
|
-
//# sourceMappingURL=p-b59e29d7.entry.js.map
|