@sme.up/ketchup 11.0.0-SNAPSHOT-20241118135127 → 11.0.0-SNAPSHOT-20241118143411
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/dist/cjs/{f-cell-2c5c4b63.js → f-cell-99c84f1c.js} +4 -4
- package/dist/cjs/{f-cell-2c5c4b63.js.map → f-cell-99c84f1c.js.map} +1 -1
- package/dist/cjs/{f-chip-c76e0caa.js → f-chip-29e9258a.js} +2 -2
- package/dist/cjs/{f-chip-c76e0caa.js.map → f-chip-29e9258a.js.map} +1 -1
- package/dist/cjs/{f-paginator-utils-e30b6e63.js → f-paginator-utils-af69bd51.js} +2 -2
- package/dist/cjs/{f-paginator-utils-e30b6e63.js.map → f-paginator-utils-af69bd51.js.map} +1 -1
- package/dist/cjs/{f-text-field-41132ecd.js → f-text-field-4226081f.js} +2 -2
- package/dist/cjs/{f-text-field-41132ecd.js.map → f-text-field-4226081f.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_28.cjs.entry.js +6 -6
- package/dist/cjs/kup-box.cjs.entry.js +6 -6
- package/dist/cjs/kup-calendar.cjs.entry.js +2 -2
- package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-cell.cjs.entry.js +4 -4
- package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
- package/dist/cjs/{kup-data-table-helper-f228f568.js → kup-data-table-helper-00427a69.js} +2 -2
- package/dist/cjs/{kup-data-table-helper-f228f568.js.map → kup-data-table-helper-00427a69.js.map} +1 -1
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +1 -1
- package/dist/cjs/kup-editor.cjs.entry.js +1 -1
- package/dist/cjs/kup-family-tree.cjs.entry.js +1 -1
- package/dist/cjs/kup-grid.cjs.entry.js +1 -1
- package/dist/cjs/kup-htm.cjs.entry.js +1 -1
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-input-panel.cjs.entry.js +4 -4
- package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
- package/dist/cjs/kup-magic-box.cjs.entry.js +1 -1
- package/dist/cjs/{kup-manager-77611451.js → kup-manager-fe741ac9.js} +2 -2
- package/dist/cjs/{kup-manager-77611451.js.map → kup-manager-fe741ac9.js.map} +1 -1
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
- package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
- package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
- package/dist/cjs/kup-planner.cjs.entry.js +2 -2
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
- package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/kup-txt.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography.cjs.entry.js +1 -1
- package/dist/components/kup-manager.js +1 -1
- package/dist/components/kup-manager.js.map +1 -1
- package/dist/esm/{f-cell-ed323876.js → f-cell-84b76695.js} +4 -4
- package/dist/esm/{f-cell-ed323876.js.map → f-cell-84b76695.js.map} +1 -1
- package/dist/esm/{f-chip-493f6e72.js → f-chip-cd564624.js} +2 -2
- package/dist/esm/{f-chip-493f6e72.js.map → f-chip-cd564624.js.map} +1 -1
- package/dist/esm/{f-paginator-utils-45b88cb0.js → f-paginator-utils-7fd2bb01.js} +2 -2
- package/dist/esm/{f-paginator-utils-45b88cb0.js.map → f-paginator-utils-7fd2bb01.js.map} +1 -1
- package/dist/esm/{f-text-field-234a66b4.js → f-text-field-66b6f8a6.js} +2 -2
- package/dist/esm/{f-text-field-234a66b4.js.map → f-text-field-66b6f8a6.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/kup-accordion.entry.js +1 -1
- package/dist/esm/kup-activity-timeline.entry.js +2 -2
- package/dist/esm/kup-autocomplete_28.entry.js +6 -6
- package/dist/esm/kup-box.entry.js +6 -6
- package/dist/esm/kup-calendar.entry.js +2 -2
- package/dist/esm/kup-card-list.entry.js +1 -1
- package/dist/esm/kup-cell.entry.js +4 -4
- package/dist/esm/kup-dashboard.entry.js +2 -2
- package/dist/esm/{kup-data-table-helper-dc9ece8a.js → kup-data-table-helper-7807c3bc.js} +2 -2
- package/dist/esm/{kup-data-table-helper-dc9ece8a.js.map → kup-data-table-helper-7807c3bc.js.map} +1 -1
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +1 -1
- package/dist/esm/kup-editor.entry.js +1 -1
- package/dist/esm/kup-family-tree.entry.js +1 -1
- package/dist/esm/kup-grid.entry.js +1 -1
- package/dist/esm/kup-htm.entry.js +1 -1
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +4 -4
- package/dist/esm/kup-input-panel.entry.js +4 -4
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +1 -1
- package/dist/esm/{kup-manager-0f056eae.js → kup-manager-e6854c15.js} +2 -2
- package/dist/esm/{kup-manager-0f056eae.js.map → kup-manager-e6854c15.js.map} +1 -1
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +2 -2
- package/dist/esm/kup-pdf.entry.js +1 -1
- package/dist/esm/kup-photo-frame.entry.js +1 -1
- package/dist/esm/kup-planner.entry.js +2 -2
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +1 -1
- package/dist/esm/kup-snackbar.entry.js +1 -1
- package/dist/esm/kup-txt.entry.js +1 -1
- package/dist/esm/kup-typography-list.entry.js +1 -1
- package/dist/esm/kup-typography.entry.js +1 -1
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-f8982626.entry.js → p-00696d0b.entry.js} +2 -2
- package/dist/ketchup/{p-4e4f3c12.entry.js → p-02d83afd.entry.js} +2 -2
- package/dist/ketchup/{p-28a98448.entry.js → p-08a8d90e.entry.js} +2 -2
- package/dist/ketchup/{p-e7ba0039.entry.js → p-0f194063.entry.js} +2 -2
- package/dist/ketchup/{p-e5b89e72.entry.js → p-0f8be7d2.entry.js} +2 -2
- package/dist/ketchup/{p-941633cf.entry.js → p-10cea33b.entry.js} +2 -2
- package/dist/ketchup/{p-07101843.entry.js → p-1b23ecb9.entry.js} +2 -2
- package/dist/ketchup/{p-8b1f6d22.js → p-1f0bd3bc.js} +2 -2
- package/dist/ketchup/{p-8666c112.entry.js → p-1fd1da4a.entry.js} +2 -2
- package/dist/ketchup/{p-e4e7cb0a.entry.js → p-36f1f1f2.entry.js} +2 -2
- package/dist/ketchup/{p-18c2474c.entry.js → p-3a0e74d7.entry.js} +2 -2
- package/dist/ketchup/{p-e177845a.entry.js → p-4e8485bb.entry.js} +2 -2
- package/dist/ketchup/{p-4ac7f525.js → p-5403ec7d.js} +2 -2
- package/dist/ketchup/{p-6722ad32.entry.js → p-56ebec9a.entry.js} +2 -2
- package/dist/ketchup/{p-6a7aad42.entry.js → p-582719d0.entry.js} +2 -2
- package/dist/ketchup/{p-d88f2604.entry.js → p-6b510eea.entry.js} +2 -2
- package/dist/ketchup/{p-73b94f37.entry.js → p-7fd94ab9.entry.js} +2 -2
- package/dist/ketchup/{p-7f6331ba.entry.js → p-822300c4.entry.js} +2 -2
- package/dist/ketchup/{p-98d28887.entry.js → p-9466c7b2.entry.js} +2 -2
- package/dist/ketchup/{p-7c151495.entry.js → p-9b45f18d.entry.js} +2 -2
- package/dist/ketchup/{p-43d46909.entry.js → p-b2a20978.entry.js} +2 -2
- package/dist/ketchup/{p-2215ccf4.entry.js → p-c0aed6b3.entry.js} +2 -2
- package/dist/ketchup/{p-27163fd2.js → p-c398ed83.js} +2 -2
- package/dist/ketchup/{p-f00d7dff.js → p-c618c6fd.js} +2 -2
- package/dist/ketchup/p-c71c14ea.entry.js +2 -0
- package/dist/ketchup/{p-c88e7d76.entry.js.map → p-c71c14ea.entry.js.map} +1 -1
- package/dist/ketchup/{p-525b168f.entry.js → p-cda00e9e.entry.js} +2 -2
- package/dist/ketchup/{p-996ba080.entry.js → p-d073f545.entry.js} +2 -2
- package/dist/ketchup/{p-fb533065.entry.js → p-d26f1d41.entry.js} +2 -2
- package/dist/ketchup/{p-99171aba.js → p-da7ae266.js} +2 -2
- package/dist/ketchup/{p-013a555c.entry.js → p-e1c69d06.entry.js} +2 -2
- package/dist/ketchup/{p-15f54117.js → p-e1cf074e.js} +4 -4
- package/dist/ketchup/p-e1cf074e.js.map +1 -0
- package/dist/ketchup/{p-b2699d88.entry.js → p-ee8fc062.entry.js} +2 -2
- package/dist/ketchup/{p-5b8896da.entry.js → p-f1d7efa6.entry.js} +2 -2
- package/dist/ketchup/{p-dc8e1959.entry.js → p-f9e43ad1.entry.js} +2 -2
- package/dist/ketchup/{p-12c06de2.entry.js → p-fcce8e0d.entry.js} +2 -2
- package/dist/ketchup/{p-b896d5c4.entry.js → p-ff6a7fca.entry.js} +2 -2
- package/package.json +1 -1
- package/dist/ketchup/p-15f54117.js.map +0 -1
- package/dist/ketchup/p-c88e7d76.entry.js +0 -2
- /package/dist/ketchup/{p-f8982626.entry.js.map → p-00696d0b.entry.js.map} +0 -0
- /package/dist/ketchup/{p-4e4f3c12.entry.js.map → p-02d83afd.entry.js.map} +0 -0
- /package/dist/ketchup/{p-28a98448.entry.js.map → p-08a8d90e.entry.js.map} +0 -0
- /package/dist/ketchup/{p-e7ba0039.entry.js.map → p-0f194063.entry.js.map} +0 -0
- /package/dist/ketchup/{p-e5b89e72.entry.js.map → p-0f8be7d2.entry.js.map} +0 -0
- /package/dist/ketchup/{p-941633cf.entry.js.map → p-10cea33b.entry.js.map} +0 -0
- /package/dist/ketchup/{p-07101843.entry.js.map → p-1b23ecb9.entry.js.map} +0 -0
- /package/dist/ketchup/{p-8b1f6d22.js.map → p-1f0bd3bc.js.map} +0 -0
- /package/dist/ketchup/{p-8666c112.entry.js.map → p-1fd1da4a.entry.js.map} +0 -0
- /package/dist/ketchup/{p-e4e7cb0a.entry.js.map → p-36f1f1f2.entry.js.map} +0 -0
- /package/dist/ketchup/{p-18c2474c.entry.js.map → p-3a0e74d7.entry.js.map} +0 -0
- /package/dist/ketchup/{p-e177845a.entry.js.map → p-4e8485bb.entry.js.map} +0 -0
- /package/dist/ketchup/{p-4ac7f525.js.map → p-5403ec7d.js.map} +0 -0
- /package/dist/ketchup/{p-6722ad32.entry.js.map → p-56ebec9a.entry.js.map} +0 -0
- /package/dist/ketchup/{p-6a7aad42.entry.js.map → p-582719d0.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d88f2604.entry.js.map → p-6b510eea.entry.js.map} +0 -0
- /package/dist/ketchup/{p-73b94f37.entry.js.map → p-7fd94ab9.entry.js.map} +0 -0
- /package/dist/ketchup/{p-7f6331ba.entry.js.map → p-822300c4.entry.js.map} +0 -0
- /package/dist/ketchup/{p-98d28887.entry.js.map → p-9466c7b2.entry.js.map} +0 -0
- /package/dist/ketchup/{p-7c151495.entry.js.map → p-9b45f18d.entry.js.map} +0 -0
- /package/dist/ketchup/{p-43d46909.entry.js.map → p-b2a20978.entry.js.map} +0 -0
- /package/dist/ketchup/{p-2215ccf4.entry.js.map → p-c0aed6b3.entry.js.map} +0 -0
- /package/dist/ketchup/{p-27163fd2.js.map → p-c398ed83.js.map} +0 -0
- /package/dist/ketchup/{p-f00d7dff.js.map → p-c618c6fd.js.map} +0 -0
- /package/dist/ketchup/{p-525b168f.entry.js.map → p-cda00e9e.entry.js.map} +0 -0
- /package/dist/ketchup/{p-996ba080.entry.js.map → p-d073f545.entry.js.map} +0 -0
- /package/dist/ketchup/{p-fb533065.entry.js.map → p-d26f1d41.entry.js.map} +0 -0
- /package/dist/ketchup/{p-99171aba.js.map → p-da7ae266.js.map} +0 -0
- /package/dist/ketchup/{p-013a555c.entry.js.map → p-e1c69d06.entry.js.map} +0 -0
- /package/dist/ketchup/{p-b2699d88.entry.js.map → p-ee8fc062.entry.js.map} +0 -0
- /package/dist/ketchup/{p-5b8896da.entry.js.map → p-f1d7efa6.entry.js.map} +0 -0
- /package/dist/ketchup/{p-dc8e1959.entry.js.map → p-f9e43ad1.entry.js.map} +0 -0
- /package/dist/ketchup/{p-12c06de2.entry.js.map → p-fcce8e0d.entry.js.map} +0 -0
- /package/dist/ketchup/{p-b896d5c4.entry.js.map → p-ff6a7fca.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as o,H as s,d as n}from"./p-d7c15b0e.js";import{k as r,y as a,g as l,s as h,a1 as c,v as p,h as u,b as d,e as f,N as b,R as x,au as g,V as m,E as k}from"./p-15f54117.js";import{f as w,p as v,s as y}from"./p-99171aba.js";import{F as _}from"./p-2b519589.js";import{c as j}from"./p-f00d7dff.js";import{c as C}from"./p-635bb4b3.js";import{F as z}from"./p-27163fd2.js";import{p as P,r as M,F as R}from"./p-8b1f6d22.js";import{F as A}from"./p-c4054aba.js";import"./p-029c7cbe.js";import"./p-5d03c077.js";import"./p-4ac7f525.js";import"./p-cc32b7a2.js";import"./p-e3062c19.js";import"./p-d4a879fc.js";var I;(function(t){t["cardData"]="Data of the card linked to the box when the latter's layout must be a premade template.";t["columns"]="Number of columns.";t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the box.";t["dragEnabled"]="Enable dragging.";t["dropEnabled"]="Enable dropping.";t["dropOnSection"]="Drop can be done in section.";t["enableRowActions"]="If enabled, a button to load / display the row actions will be displayed on the right of every box.";t["globalFilter"]="When set to true it activates the global filter.";t["globalFilterValue"]="The value of the global filter.";t["kanban"]="Displays the boxlist as a Kanban.";t["layout"]="How the field will be displayed. If not present, a default one will be created.";t["lazyLoadRows"]="When set to true, extra rows will be automatically loaded once the last row enters the viewport.";t["loadMoreLimit"]="Sets a maximum limit of new records which can be required by the load more functionality.";t["loadMoreMode"]="Establish the modality of how many new records will be downloaded. This property is regulated also by loadMoreStep.";t["loadMoreStep"]="The number of records which will be requested to be downloaded when clicking on the load more button. This property is regulated also by loadMoreMode.";t["multiSelection"]="Enable multi selection.";t["pageSelected"]="Current page number.";t["pagination"]="Enables pagination.";t["rowsPerPage"]="Number of current rows per page.";t["scrollOnHover"]="Activates the scroll on hover function.";t["selectBox"]="Automatically selects the box at the specified index.";t["selectedRowsState"]="Multiple selection.";t["showLoadMore"]="If set to true, displays the button to load more records.";t["showSelection"]="If enabled, highlights the selected box/boxes.";t["sortBy"]="If sorting is enabled, specifies which column to sort.";t["sortEnabled"]="Enable sorting.";t["stateId"]="";t["store"]="";t["swipeDisabled"]="Disable swipe."})(I||(I={}));var E;(function(t){t["CONSTANT"]="constant";t["CONSTANT_INCREMENT"]="constant_increment";t["PROGRESSIVE_THRESHOLD"]="progressive_threshold"})(E||(E={}));class S{constructor(){this.globalFilterValue="";this.sortBy="";this.selectedRowsState="";this.pageSelected=1;this.rowsPerPage=0;this.load=false;this.loadMoreLimit=1e3;this.showLoadMore=false}toDebugString(){return"box state"}}const O=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_box_background_color:var(--kup-box-background-color, var(--kup-layer-1));--kup_box_background_color_hover:var(\n --kup-box-background-color-hover,\n var(--kup-layer-1-hover)\n );--kup_box_background_color_selected:var(\n --kup-box-background-color-selected,\n var(--kup-layer-1-selected)\n );--kup_box_text_color:var(--kup-box-text-color, var(--kup-text-secondary));--kup_box_grid_gap:var(--kup-box-grid-gap, var(--kup-space-03));--kup_box_transition:var(--kup-box-transition, 0.25s);--kup_box_border_color_drag:var(--kup-box-border-color-drag, var(--kup-border-interactive))\n display: block;--kup_box_padding:var(--kup-box-padding, var(--kup-space-05))}.box-component{transition:border var(--kup_box_transition) ease}.box-component[kup-drag-over]{position:relative;border:3px dashed var(--kup_box_border_color_drag)}#box-container{display:grid;grid-gap:var(--kup_box_grid_gap);color:var(--kup_box_text_color);overflow:auto}#box-container.is-kanban .kanban-section{overflow:auto}#box-container.is-kanban .box-wrapper{padding-top:1em}#box-container.is-kanban .box-wrapper .box{overflow:auto}#box-container *:not(.progress-bar-percentage){box-sizing:border-box}#box-container .box-wrapper{display:flex;align-items:center;background-color:var(--kup_box_background_color);border-radius:var(--kup-radius-00)}#box-container .box-wrapper:hover{background-color:var(--kup_box_background_color_hover)}#box-container .box-wrapper.selected{background-color:var(--kup_box_background_color_selected)}#box-container .box-wrapper.selected .box-section.titled>h3{background-color:transparent}#box-container .box-wrapper .box{flex-grow:1;cursor:pointer;position:relative;display:flex;padding:var(--kup_box_padding);transition:background-color var(--kup_box_transition) ease, box-shadow var(--kup_box_transition) ease, border var(--kup_box_transition) ease}#box-container .box-wrapper .box.draggable{touch-action:none;user-select:none}#box-container .box-wrapper .box.column{flex-direction:column}#box-container .box-wrapper .box[kup-draggable]{opacity:0.5}#box-container .box-wrapper .box[kup-drag-over]{border:3px dashed var(--kup_box_border_color_drag);position:relative;z-index:2}#box-container .box-wrapper .box .box-section{display:flex;flex-direction:row;flex:1 1 1%;flex-wrap:wrap}#box-container .box-wrapper .box .box-section.column{flex-direction:column;justify-content:center;flex-wrap:unset}#box-container .box-wrapper .box .box-section.column>.box-section{flex:0 0 auto}#box-container .box-wrapper .box .box-section.grid{display:grid}#box-container .box-wrapper .box .box-section .box-object{min-height:16px}#box-container .box-wrapper .box .box-section .box-object img{height:auto}#box-container .box-wrapper .box .box-section.collapse-section .header{border-top:1px solid var(--kup-border-subtle);color:rgba(var(--kup-text-secondary-rgb), 0.75);display:flex;justify-content:space-around;width:100%}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content{margin:0.5em;display:flex;align-items:center}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image{transition:transform 0.15s}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image.toggled{transform:rotate(-180deg)}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .kup-icon.kup-dropdown-icon{margin:0;-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}#box-container .box-wrapper .box .box-section.collapse-section .content{display:none;width:100%}#box-container .box-wrapper .box .box-section.collapse-section.open .content{display:block}#box-container .box-wrapper .box .box-section.titled{border:1px solid var(--kup-border-subtle);padding-top:5px;position:relative;margin:10px}#box-container .box-wrapper .box .box-section.titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}#box-container .box-wrapper .box .box-selection{position:absolute;top:0.5em;right:0.5em;z-index:1}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler{position:relative;width:24px;height:24px;margin-left:3px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler svg{cursor:pointer;opacity:0;fill:var(--kup-text-color);transition:opacity 300ms ease-out}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu{background:var(--kup-background-color);border:1px solid var(--kup-border-subtle);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);position:absolute;top:0;right:24px;display:none;z-index:10}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul{list-style-type:none;margin:0;padding:0}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li{cursor:pointer;white-space:nowrap;padding:0 12px;display:flex;align-items:center;line-height:30px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li:not(:last-child){border-bottom:1px solid var(--kup-border-subtle)}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu.open{display:block}#box-container .box-wrapper:hover .row-actions-wrapper .row-actions-toggler svg{opacity:1}#sort-panel,#global-filter{margin-bottom:1em}:host(.kup-center-aligned) #kup-component .box-section{text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell img{margin:auto}:host(.kup-right-aligned) #kup-component .box-section{text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell img{margin-left:auto;margin-right:0}:host(.kup-top-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-start}:host(.kup-bottom-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-end}:host(.kup-flat-on-hover) #box-container .box-wrapper .box:hover{box-shadow:none}:host(.kup-shaped) .box{border-radius:10px}:host(.kup-round) .box{border-radius:25px}:host(.kup-dashed-sections) .box-section{border:2px dashed var(--kup-text-color)}:host(:not(.kup-paddingless)) #box-container .box .box-section .box-object{padding:1px 4px}:host(:not(.kup-paddingless)) #box-container .box .box-section.last-child{padding:3px 4px}:host(.kup-danger){--kup-box-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-box-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-box-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-box-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-box-primary-color-rgb:var(--kup-warning-color-rgb)}";const D=O;var W=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,o){if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?o:i==="a"?o.call(t):o?o.value:e.get(t)};var B=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,o,s){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?s.call(t,i):s?s.value=i:e.set(t,i),i};var T,$,L,F,H,N,G,V,q;const K=class{constructor(i){t(this,i);this.kupBoxClick=e(this,"kup-box-click",6);this.kupBoxSelected=e(this,"kup-box-selected",6);this.kupAutoBoxSelect=e(this,"kup-box-autoselect",6);this.kupRowActionMenuClick=e(this,"kup-box-rowactionmenuclick",6);this.kupRowActionClick=e(this,"kup-box-rowactionclick",6);this.kupDidLoad=e(this,"kup-box-didload",6);this.kupDidUnload=e(this,"kup-box-didunload",6);this.kupBoxContextMenu=e(this,"kup-box-contextmenu",6);this.kupLoadMoreClick=e(this,"kup-box-loadmoreclick",6);T.add(this);this.state=new S;this.kupManager=r();this.visibleColumns=[];this.rows=[];this.filteredRows=[];this.sectionRef=null;this.rowsRefs=[];this.hold=false;this.interactableDrag=[];this.interactableDrop=[];this.interactableTouch=[];$.set(this,undefined);L.set(this,[]);F.set(this,0);H.set(this,0);N.set(this,0);this.collapsedSection={};this.selectedRows=[];this.rowActionMenuOpened=undefined;this.currentPage=1;this.currentRowsPerPage=10;this.cardData=null;this.columns=1;this.customStyle="";this.data=null;this.dragEnabled=false;this.dropEnabled=false;this.dropOnSection=false;this.editableData=false;this.enableRowActions=false;this.globalFilter=false;this.globalFilterValue="";this.kanban=null;this.layout=undefined;this.lazyLoadRows=false;this.loadMoreLimit=1e3;this.loadMoreMode=E.PROGRESSIVE_THRESHOLD;this.loadMoreStep=60;this.multiSelection=false;this.pageSelected=1;this.pagination=false;this.rowsPerPage=undefined;this.scrollOnHover=false;this.selectBox=undefined;this.selectedRowsState=undefined;this.showLoadMore=false;this.showSelection=true;this.sortBy=undefined;this.sortEnabled=false;this.stateId="";this.store=undefined;this.swipeDisabled=false}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);if(t!=null){this.kupManager.debug.logMessage(this,"Initialize with state for stateId "+this.stateId+": "+t);this.sortBy=this.state.sortBy;this.globalFilterValue=this.state.globalFilterValue;this.selectedRowsState=this.state.selectedRowsState;this.pageSelected=this.state.pageSelected;this.rowsPerPage=this.state.rowsPerPage;this.loadMoreLimit=t.loadMoreLimit;this.showLoadMore=t.showLoadMore}}}persistState(){if(this.store&&this.stateId){let t=false;if(!this.kupManager.objects.deepEqual(this.state.sortBy,this.sortBy)){this.state.sortBy=this.sortBy;t=true}if(!this.kupManager.objects.deepEqual(this.state.globalFilterValue,this.globalFilterValue)){this.state.globalFilterValue=this.globalFilterValue;t=true}if(!this.kupManager.objects.deepEqual(this.state.pageSelected,this.currentPage)){this.state.pageSelected=this.currentPage;t=true}if(!this.kupManager.objects.deepEqual(this.state.rowsPerPage,this.currentRowsPerPage)){this.state.rowsPerPage=this.currentRowsPerPage;t=true}const e=this.selectedRows.reduce(((t,e,i)=>{const o=i>0?";":"";return t+o+e.id}),"");if(!this.kupManager.objects.deepEqual(this.state.selectedRowsState,e)){this.state.selectedRowsState=e;t=true}if(!this.kupManager.objects.deepEqual(this.state.loadMoreLimit,this.loadMoreLimit)){this.state.loadMoreLimit=this.loadMoreLimit;t=true}if(!this.kupManager.objects.deepEqual(this.state.showLoadMore,this.showLoadMore)){this.state.showLoadMore=this.showLoadMore;t=true}if(!this.state.load){this.state.load=true;return}if(t){this.kupManager.debug.logMessage(this,"Persisting state for stateId "+this.stateId+": "+this.state);this.store.persistState(this.stateId,this.state)}}}rowsPerPageHandler(t){this.currentRowsPerPage=t}recalculateRows(){this.initRows()}onDataChanged(){a(this.getRows());this.initVisibleColumns();this.initRows();this.checkLayout()}onLayoutChanged(){this.checkLayout()}onSelectBoxChanged(){this.handleAutomaticBoxSelection()}async getProps(t){return l(this,I,t)}async loadRowActions(t,e){t.actions=e;this.rowActionMenuOpened=t}async refresh(){i(this)}async setProps(t){h(this,I,t)}getColumns(){return this.data&&this.data.columns?this.data.columns:[{title:"",name:"",size:undefined}]}initVisibleColumns(){this.visibleColumns=this.getColumns().filter((t=>{if(t.hasOwnProperty("visible")){return t.visible}return true}))}getRows(){return this.data&&this.data.rows?this.data.rows:[]}initRows(){this.filteredRows=this.getRows();if(this.globalFilter&&this.globalFilterValue){this.filteredRows=w(this.filteredRows,null,this.globalFilterValue,this.visibleColumns)}this.rows=this.sortRows(this.filteredRows);if(this.pagination){this.rows=v(this.rows,this.currentPage,this.currentRowsPerPage,false)}}sortRows(t){let e=t;if(this.sortBy){e=y(e,this.toSortObjectList())}return e}toSortObjectList(){const t=this.sortBy.split("|").map((t=>{const e=t.split(",");const i={column:e[0],sortMode:e.length>1?c[e[1]]:c.A};return i}));return t}checkScrollOnHover(){if(this.boxContainer){if(!this.kupManager.scrollOnHover.isRegistered(this.boxContainer)){if(this.scrollOnHover){this.kupManager.scrollOnHover.register(this.boxContainer)}}else{if(!this.scrollOnHover){this.kupManager.scrollOnHover.unregister(this.boxContainer)}}}}checkLayout(){if(this.layout){this.boxLayout=this.layout;return}const t={horizontal:false,sections:[]};const e=this.visibleColumns;let i=e.length;let o=[];let s=0;while(i-- >0){o.push({column:e[s++].name})}t.content=o;this.boxLayout={sections:[t]}}onSortChange(t){let e=p(this.visibleColumns,t.detail.value);this.sortBy=e.name}onGlobalFilterChange({detail:t}){let e="";if(t&&t.value){e=t.value}this.globalFilterValue=e}isSectionExpanded(t,e){if(!t.id||!e.id){return false}return this.collapsedSection[e.id]&&this.collapsedSection[e.id][t.id]}handleAutomaticBoxSelection(){if(this.selectBox&&this.selectBox>0&&this.selectBox<=this.data.rows.length){this.selectedRows=[];for(let t of this.data.rows){if(t.id===(this.selectBox-1).toString()){this.selectedRows.push(t);break}}this.kupAutoBoxSelect.emit({comp:this,id:this.rootElement.id,row:this.selectedRows[0]})}}getEventDetails(t,e){let i=null;let o=null;let s=null;let n=null;if(t){for(let e=t.length-1;e>=0;e--){let o=t[e];if(!o.tagName){continue}switch(o.tagName.toUpperCase()){default:{if(o.classList.contains("box-object")){i=o}if(!s&&o["data-row"]){s=o["data-row"]}break}}}}if(i){if(i.classList.contains("f-cell")){const t=i["kup-get-cell-props"]();o=t.cell;n=t.column;s=t.row}else{o=i["data-cell"];s=i["data-row"];n=p(this.visibleColumns,i.dataset.column)}}return{boxObject:i?i:null,column:n?n:null,cell:o?o:null,originalEvent:e,row:s?s:null}}clickHandler(t){const e=this.getEventDetails(this.kupManager.getEventPath(t.target,this.rootElement),t);if(e.row){if(this.multiSelection){this.onSelectionCheckChange(e.row)}else{this.selectedRows=[e.row]}}return e}contextMenuHandler(t){const e=this.getEventDetails(this.kupManager.getEventPath(t.target,this.rootElement),t);return e}checkIfElementIsActionMenuIcon(t){if(t.tagName&&t.parentElement){return t.tagName==="svg"&&t.parentElement.classList.contains("row-actions-toggler")}return false}onSelectionCheckChange(t){var e=-1;for(let i=0;i<this.selectedRows.length;i++){const o=this.selectedRows[i];if(o.id===t.id){e=i;break}}if(e>=0){this.selectedRows.splice(e,1);this.selectedRows=[...this.selectedRows]}else{this.selectedRows=[...this.selectedRows,t]}this.kupBoxSelected.emit({comp:this,id:this.rootElement.id,rows:this.selectedRows})}toggleSectionExpand(t,e){if(!e.id){console.error("cannot expand / collapse a section withoun an ID");return}if(!t.id){console.error("cannot expand / collapse a section of a row without ad id");return}if(!this.collapsedSection[e.id]){this.collapsedSection[e.id]={};this.collapsedSection[e.id][t.id]=true}else{const i=this.collapsedSection[e.id];if(!i[t.id]){i[t.id]=true}else{i[t.id]=!i[t.id]}}this.collapsedSection=Object.assign({},this.collapsedSection)}onRowAction(t){if(!t){return}if(t===this.rowActionMenuOpened){this.rowActionMenuOpened=null;return}if(t.actions){this.rowActionMenuOpened=t}else{this.kupRowActionMenuClick.emit({comp:this,id:this.rootElement.id,row:t})}}onRowActionClick(t,e,i){this.kupRowActionClick.emit({comp:this,id:this.rootElement.id,row:t,action:e,index:i})}clickFunction(t){try{const e=t.composedPath();for(let t of e){if(this.checkIfElementIsActionMenuIcon(t)){return}}}catch(e){if(this.checkIfElementIsActionMenuIcon(t.target)){return}}this.rowActionMenuOpened=null}handlePageChange(t){const e=P(t,this.filteredRows.length,this.currentRowsPerPage);if(e){this.currentPage=e}}handleRowsPerPageChange(t){const e=M(t,this.filteredRows.length);if(e){this.currentRowsPerPage=e;this.adjustPaginator()}}adjustPaginator(){const t=this.rows.length;const e=Math.ceil(t/this.currentRowsPerPage);if(this.currentPage>e){this.currentPage=1}}renderSectionAsCard(t){let e=false;const i={button:[],cell:[],columns:[],image:[],progressbar:[],text:[]};for(let e=0;e<this.data.columns.length;e++){const o=this.data.columns[e];if(o.visible!==false){i.cell.push(t.cells[o.name]);i.columns.push(o)}}for(const e in t.cells){if(t.cells.hasOwnProperty(e)){const o=t.cells[e];if(o.cardID!==undefined&&o.obj){switch(o.obj.p){case"BTN":do{i.button.push({})}while(i.button.length<o.cardID);i.button[o.cardID]={label:o.value};break;case"IMG":do{i.image.push({})}while(i.image.length<o.cardID);i.image[o.cardID]={resource:o.value};break;case"PGB":do{i.progressbar.push({})}while(i.progressbar.length<o.cardID);i.progressbar[o.cardID]={value:o.value};break;default:do{i.text.push("")}while(i.text.length<o.cardID);i.text[o.cardID]=o.value;break}}}}for(const o in t.cells){if(t.cells.hasOwnProperty(o)){const s=t.cells[o];if(s.cardID===undefined&&s.obj){e=false;switch(s.obj.p){case"BTN":for(let t=0;t<i.button.length;t++){if(!Object.keys(i.button[t]).length){i.button[t]={label:s.value};e=true;break}}if(!e){i.button.push({label:s.value})}break;case"IMG":for(let t=0;t<i.image.length;t++){if(!Object.keys(i.image[t]).length){i.image[t]={resource:s.value};e=true;break}}if(!e){i.image.push({resource:s.value})}break;case"PGB":for(let t=0;t<i.progressbar.length;t++){if(!Object.keys(i.progressbar[t]).length){i.progressbar[t]={value:s.value};e=true;break}}if(!e){i.progressbar.push({value:s.value})}break;default:for(let t=0;t<i.text.length;t++){if(i.text[t]===""){i.text[t]=s.value;e=true;break}}if(!e){i.text.push(s.value)}break}}}}return o("kup-card",Object.assign({data:i},this.cardData))}renderRow(t){const e=[...this.visibleColumns];let i=null;let s=t.layout;if(!s){s=this.boxLayout}let n=false;if(s){if(s.horizontal){n=true}const o=s.sections;let r=o.length;let a=0;if(r>0){i=[]}const l={horizontal:n};while(r-- >0){if(this.cardData!==null&&this.cardData!==undefined&&typeof this.cardData==="object"){i.push(this.renderSectionAsCard(t))}else{i.push(this.renderSection(o[a++],l,t,e))}}}var r=false;for(let e of this.selectedRows){if(e.id===t.id){r=true}}let a=null;if(this.multiSelection){a=o("div",{class:"box-selection"},o("kup-checkbox",{checked:r}))}let l=null;if(this.enableRowActions&&!this.swipeDisabled){const e={"row-action-menu":true,open:t===this.rowActionMenuOpened};let i=null;if(t.actions){const e=t.actions.map(((e,i)=>{const s=`icon ${e.icon}`;return o("li",{tabindex:"0",onClick:()=>this.onRowActionClick(t,e,i)},o("div",{class:s}),o("div",{class:"text"},e.text))}));i=o("ul",null,e)}l=o("div",{class:"row-actions-wrapper"},o("div",{class:"row-actions-toggler"},o("svg",{version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24",onClick:()=>this.onRowAction(t)},o("path",{d:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"})),o("div",{class:e},i)))}let h=null;if(t.badgeData&&t.badgeData.length>0){h=t.badgeData.map((t=>o("kup-badge",{text:t.text,class:t["className"]?`centered ${t["className"]}`:"centered",imageData:t.imageData})))}const c={box:true,draggable:this.dragEnabled,selected:this.showSelection&&r,column:!n};const p=t.style||{};return o("div",{class:"box-wrapper",style:p,ref:t=>{if(t){W(this,L,"f").push(t)}}},o("div",{class:c,"data-row":t,ref:t=>this.rowsRefs.push(t)},a,i,h),l)}renderSection(t,e,i,s){let n=null;if(t.sections&&t.sections.length>0){const e=t.sections;let o=e.length;let r=0;if(o>0){n=[]}while(o-- >0){n.push(this.renderSection(e[r++],t,i,s))}}else if(t.content){const e=t.content;let o=e.length;let r=0;if(o>0){n=[]}while(o-- >0){n.push(this.renderBoxObject({boxObject:e[r++],row:i,visibleColumns:s},true))}}else if(s.length>0){const t=s[0];n=this.renderBoxObject({boxObject:{column:t.name},row:i,visibleColumns:s})}const r=this.isSectionExpanded(i,t);const a=!!t.columns;const l={"box-section":true,open:r,column:!a&&!t.horizontal,grid:a,titled:!!t.title,"last-child":!t.sections||t.sections.length===0};const h=t.style||{};if(t.dim&&e){h.flex=`0 0 ${t.dim}`;h.overflow="hidden";if(e.horizontal){h.maxWidth=t.dim}else{h.maxHeight=t.dim}}if(a){h["grid-template-columns"]=`repeat(${t.columns}, 1fr)`}let c=null;if(t.collapsible){l["collapse-section"]=true;const e={content:true};let s="";if(t.title){s=t.title}else if(r){s=this.kupManager.language.translate(u.COLLAPSE)}else{s=this.kupManager.language.translate(u.EXPAND)}c=o("div",{class:l,style:h},o("div",{class:e},n),o("div",{class:"header",role:"button",onClick:e=>{e.stopPropagation();this.toggleSectionExpand(i,t)}},o("div",{class:"header-content"},o("span",null,s),o(_,{resource:`${d.DROPDOWN}`,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:r?"toggled":""}))))}else{const e=t.title?o("h3",null,t.title):null;c=o("div",{class:l,style:h},e,n)}return c}renderBoxObject({boxObject:t,row:e,visibleColumns:i},s){const n={"box-object":true};const r={};let a=null;let l=-1;for(let e=0;e<i.length;e++){const o=i[e];if(o.name===t.column){l=e;break}}if(l>=0){a=i[l];i.splice(l,1)}else if(s){a=this.data.columns.find((e=>e.name===t.column))}const h=e.cells[t.column];let c=undefined;if(h&&!this.kupManager.objects.isEmptyKupObj(h.obj)){n["is-obj"]=true;if(this.kupManager.debug.isDebug()){c=h.obj.t+"; "+h.obj.p+"; "+h.obj.k+";"}}const p={cell:h,column:a,component:this,editable:this.editableData,renderKup:true,row:e,setSizes:true,shape:t.shape};return o("div",{"data-cell":h,"data-row":e,"data-column":t.column,class:n,style:r,title:c},h&&a?o(z,Object.assign({},p)):o("span",null,t.value))}kanbanMode(){if(!this.kanban.columns||this.kanban.columns.length===0){this.kupManager.debug.logMessage(this,"No columns to group by detected.",f.ERROR);return{jsx:o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{ref:t=>this.rowsRefs.push(t)}),this.kupManager.language.translate(u.EMPTY_DATA)),style:{"grid-template-columns":`repeat(1, 1fr)`}}}const t=[];if(this.kanban.labels){for(let e=0;e<this.kanban.labels.length;e++){const i=this.kanban.labels[e];t.push({labels:i,nodes:[]})}}for(let e=0;e<this.rows.length;e++){let i=[];for(let t=0;t<this.kanban.columns.length;t++){try{i.push(this.rows[e].cells[this.kanban.columns[t]].value)}catch(t){this.kupManager.debug.logMessage(this,t,f.WARNING)}}const o={found:false,index:null};for(let e=0;e<t.length;e++){let s=t[e].labels;let n=true;for(let t=0;t<s.length;t++){if(i[t]!==s[t]){n=false;break}}if(n){o.found=true;o.index=e;break}}if(o.found){t[o.index].nodes.push(this.renderRow(this.rows[e]))}else{t.push({labels:i,nodes:[this.renderRow(this.rows[e])]})}}const e=[];for(let i=0;i<t.length;i++){const s=t[i].labels;const n={data:[]};for(let t=0;t<s.length;t++){n.data.push({value:s[t],id:s[t]})}e.push(o("div",{class:"kanban-section"},o(j,Object.assign({},n)),t[i].nodes))}return{jsx:e,style:{"grid-template-columns":this.kanban.isStacked?"repeat(1fr)":this.kanban.size?`repeat(${Object.keys(t).length}, ${this.kanban.size})`:`repeat(${Object.keys(t).length}, 1fr)`}}}didLoadInteractables(){this.interactableTouch.push(this.boxContainer);const t=t=>{var e;if(this.hold){this.hold=false;return}switch(t.button){case 0:const i={};for(const e in t){i[e]=t[e]}const o=this.clickHandler(i);this.kupBoxClick.emit({comp:this,id:this.rootElement.id,row:o.row,column:(e=o.column)===null||e===void 0?void 0:e.name});break;case 2:this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)});break}};const e=t=>{if(t.pointerType==="pen"||t.pointerType==="touch"){this.hold=true;this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)})}};this.kupManager.interact.on(this.boxContainer,b.TAP,t);this.kupManager.interact.on(this.boxContainer,b.HOLD,e)}didRenderInteractables(){if(this.dragEnabled){for(let t=0;t<this.rowsRefs.length;t++){const e=this.rowsRefs[t];const i=()=>{const t=this.rootElement.shadowRoot.querySelector(".box-object:hover");return{cell:t["data-cell"],column:p(this.visibleColumns,t.dataset.column),id:this.rootElement.id,multiple:this.multiSelection,row:t["data-row"],selectedRows:this.selectedRows}};if(e&&!this.interactableDrag.includes(e)){this.interactableDrag.push(e);this.kupManager.interact.draggable(e,{allowFrom:".box-object",cursorChecker(){return null}},{callback:i},x.BADGE)}}}if(this.dropEnabled){const t=()=>{const t=this.rootElement.shadowRoot.querySelector(".box:hover");if(!t){this.kupManager.debug.logMessage(this,"Couldn't find cell hovered to retrieve dropzone informations!",f.WARNING);return}const e=this.kupManager.getEventPath(t,this.rootElement);const i=this.getEventDetails(e);return{cell:i.cell,column:i.column,id:this.rootElement.id,row:i.row}};if(!this.interactableDrop.includes(this.sectionRef)){this.interactableDrop.push(this.sectionRef);this.kupManager.interact.dropzone(this.sectionRef,{accept:`[${g}]`},{dispatcher:this.rootElement,type:m.BOX})}for(let e=0;e<this.rowsRefs.length;e++){const i=this.rowsRefs[e];if(i&&!this.interactableDrop.includes(i)){this.interactableDrop.push(i);this.kupManager.interact.dropzone(i,{accept:`[${g}]`},{callback:t,dispatcher:this.rootElement,type:m.BOX})}}}}componentWillLoad(){this.kupManager.debug.logLoad(this,false);if(this.rowsPerPage){this.currentRowsPerPage=this.rowsPerPage}if(this.data&&this.data.rows&&this.currentRowsPerPage>this.data.rows.length){this.currentRowsPerPage=this.data.rows.length}this.kupManager.language.register(this);this.kupManager.theme.register(this);this.onDataChanged();this.adjustPaginator();if(document.querySelector(".header")){B(this,F,document.querySelector(".header").clientHeight,"f")}else{B(this,F,0,"f")}if(document.querySelector(".topbar")){B(this,F,W(this,F,"f")+document.querySelector(".topbar").clientHeight,"f")}W(this,T,"m",V).call(this)}componentDidLoad(){this.handleAutomaticBoxSelection();document.addEventListener("click",this.clickFunction.bind(this));this.currentPage=this.pageSelected;if(this.multiSelection&&this.selectedRowsState){this.selectedRows=[];let t=this.selectedRowsState.split(";");this.selectedRows=this.data.rows.filter((e=>t.indexOf(e.id)>=0))}this.didLoadInteractables();this.kupDidLoad.emit({comp:this,id:this.rootElement.id});this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const e=t.querySelectorAll(".f-text-field");for(let t=0;t<e.length;t++){A(e[t])}}this.checkScrollOnHover();this.persistState();this.didRenderInteractables();W(this,T,"m",G).call(this);this.kupManager.debug.logRender(this,true)}render(){B(this,L,[],"f");const t=!!(typeof this.kanban==="object"&&this.kanban!==null);let e=null;if(this.sortEnabled){const t=this.visibleColumns.map((t=>{const e={value:t.title,id:t.name,selected:t.name===this.sortBy};return e}));const i=[{value:"",id:""},...t];let s={label:this.kupManager.language.translate(u.SORT_BY),trailingIcon:true};let n={data:i,selectable:true};let r={"kup-text-field":s,"kup-list":n};e=o("div",{id:"sort-panel"},o("kup-combobox",{data:r,initialValue:this.sortBy,"onkup-combobox-itemclick":t=>this.onSortChange(t)}))}let i=null;if(this.globalFilter){i=o("div",{id:"global-filter"},o("kup-text-field",{fullWidth:true,label:this.kupManager.language.translate(k.SEARCH),icon:d.SEARCH,initialValue:this.globalFilterValue,"onkup-textfield-input":t=>{window.clearTimeout(this.globalFilterTimeout);this.globalFilterTimeout=window.setTimeout((()=>this.onGlobalFilterChange(t)),600)}}))}let n=null;if(this.showLoadMore||!this.lazyLoadRows&&this.pagination){n=o(R,{id:"top-paginator",currentPage:this.currentPage,max:this.filteredRows.length,perPage:this.currentRowsPerPage?this.currentRowsPerPage:this.rowsPerPage,onLoadMore:this.showLoadMore?()=>{W(this,T,"m",q).call(this)}:null,onNextPage:()=>this.handlePageChange(this.currentPage+1),onPrevPage:()=>this.handlePageChange(this.currentPage-1),onPageChange:t=>this.handlePageChange(t.detail.value),onRowsChange:t=>this.handleRowsPerPageChange(t.detail.value)})}let r=null;let a={};if(this.rows.length===0){r=o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{class:"box",ref:t=>this.rowsRefs.push(t)},this.kupManager.language.translate(u.EMPTY_DATA)));a={"grid-template-columns":`repeat(1, 1fr)`}}else if(t){const t=this.kanbanMode();r=t.jsx;a=t.style}else{a={"grid-template-columns":`repeat(${this.columns}, 1fr)`};const t=this.rows;let e=t.length;let i=0;r=[];while(e-- >0){r.push(this.renderRow(t[i++]))}}return o(s,null,o("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{id:C},o("div",{class:"box-component",ref:t=>this.sectionRef=t},e,i,n,o("div",{class:t?"is-kanban":"",id:"box-container",style:a,onContextMenu:t=>{t.preventDefault()},ref:t=>this.boxContainer=t},r))))}disconnectedCallback(){this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop));this.kupManager.language.unregister(this);this.kupManager.theme.unregister(this);if(this.scrollOnHover){this.kupManager.scrollOnHover.unregister(this.boxContainer)}document.removeEventListener("click",this.clickFunction.bind(this));this.kupDidUnload.emit({comp:this,id:this.rootElement.id})}get rootElement(){return n(this)}static get watchers(){return{rowsPerPage:["rowsPerPageHandler","recalculateRows"],globalFilterValue:["recalculateRows"],sortBy:["recalculateRows"],pagination:["recalculateRows"],currentPage:["recalculateRows"],currentRowsPerPage:["recalculateRows"],data:["onDataChanged"],layout:["onLayoutChanged"],selectBox:["onSelectBoxChanged"]}}};$=new WeakMap,L=new WeakMap,F=new WeakMap,H=new WeakMap,N=new WeakMap,T=new WeakSet,G=function t(){if(this.lazyLoadRows&&this.currentRowsPerPage<this.data.rows.length){W(this,$,"f").observe(W(this,L,"f")[W(this,L,"f").length-1])}},V=function t(){const e=t=>{t.forEach((t=>{if(t.isIntersecting){this.kupManager.debug.logMessage(this,"Last row entering the viewport, loading more elements.");const e=this.data.rows.length-this.currentRowsPerPage;if(e<this.loadMoreStep){this.currentRowsPerPage+=e}else{this.currentRowsPerPage+=this.loadMoreStep}t.target.classList.remove("last-row");W(this,$,"f").unobserve(t.target)}}))};const i={threshold:0,rootMargin:"-"+W(this,F,"f")+"px 0px 0px 0px"};B(this,$,new IntersectionObserver(e,i),"f")},q=function t(){var e;let i=0;switch(this.loadMoreMode){case E.CONSTANT:i=this.loadMoreStep;break;case E.CONSTANT_INCREMENT:i=this.loadMoreStep*(W(this,H,"f")+1);break;case E.PROGRESSIVE_THRESHOLD:i=Math.max(W(this,N,"f"),this.loadMoreStep)*Math.min(W(this,H,"f")+1,2);break}if(i>this.loadMoreLimit){i=this.loadMoreLimit}this.kupLoadMoreClick.emit({comp:this,id:this.rootElement.id,loadItems:i});B(this,N,i,"f");B(this,H,(e=W(this,H,"f"),e++,e),"f")};K.style=D;export{K as kup_box};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,f as i,h as o,H as s,d as n}from"./p-d7c15b0e.js";import{k as r,y as a,g as l,s as h,a1 as c,v as p,h as u,b as d,e as f,N as b,R as x,au as g,V as m,E as k}from"./p-e1cf074e.js";import{f as w,p as v,s as y}from"./p-da7ae266.js";import{F as _}from"./p-2b519589.js";import{c as j}from"./p-c618c6fd.js";import{c as C}from"./p-635bb4b3.js";import{F as z}from"./p-c398ed83.js";import{p as P,r as M,F as R}from"./p-1f0bd3bc.js";import{F as A}from"./p-c4054aba.js";import"./p-029c7cbe.js";import"./p-5d03c077.js";import"./p-5403ec7d.js";import"./p-cc32b7a2.js";import"./p-e3062c19.js";import"./p-d4a879fc.js";var I;(function(t){t["cardData"]="Data of the card linked to the box when the latter's layout must be a premade template.";t["columns"]="Number of columns.";t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the box.";t["dragEnabled"]="Enable dragging.";t["dropEnabled"]="Enable dropping.";t["dropOnSection"]="Drop can be done in section.";t["enableRowActions"]="If enabled, a button to load / display the row actions will be displayed on the right of every box.";t["globalFilter"]="When set to true it activates the global filter.";t["globalFilterValue"]="The value of the global filter.";t["kanban"]="Displays the boxlist as a Kanban.";t["layout"]="How the field will be displayed. If not present, a default one will be created.";t["lazyLoadRows"]="When set to true, extra rows will be automatically loaded once the last row enters the viewport.";t["loadMoreLimit"]="Sets a maximum limit of new records which can be required by the load more functionality.";t["loadMoreMode"]="Establish the modality of how many new records will be downloaded. This property is regulated also by loadMoreStep.";t["loadMoreStep"]="The number of records which will be requested to be downloaded when clicking on the load more button. This property is regulated also by loadMoreMode.";t["multiSelection"]="Enable multi selection.";t["pageSelected"]="Current page number.";t["pagination"]="Enables pagination.";t["rowsPerPage"]="Number of current rows per page.";t["scrollOnHover"]="Activates the scroll on hover function.";t["selectBox"]="Automatically selects the box at the specified index.";t["selectedRowsState"]="Multiple selection.";t["showLoadMore"]="If set to true, displays the button to load more records.";t["showSelection"]="If enabled, highlights the selected box/boxes.";t["sortBy"]="If sorting is enabled, specifies which column to sort.";t["sortEnabled"]="Enable sorting.";t["stateId"]="";t["store"]="";t["swipeDisabled"]="Disable swipe."})(I||(I={}));var E;(function(t){t["CONSTANT"]="constant";t["CONSTANT_INCREMENT"]="constant_increment";t["PROGRESSIVE_THRESHOLD"]="progressive_threshold"})(E||(E={}));class S{constructor(){this.globalFilterValue="";this.sortBy="";this.selectedRowsState="";this.pageSelected=1;this.rowsPerPage=0;this.load=false;this.loadMoreLimit=1e3;this.showLoadMore=false}toDebugString(){return"box state"}}const O=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_box_background_color:var(--kup-box-background-color, var(--kup-layer-1));--kup_box_background_color_hover:var(\n --kup-box-background-color-hover,\n var(--kup-layer-1-hover)\n );--kup_box_background_color_selected:var(\n --kup-box-background-color-selected,\n var(--kup-layer-1-selected)\n );--kup_box_text_color:var(--kup-box-text-color, var(--kup-text-secondary));--kup_box_grid_gap:var(--kup-box-grid-gap, var(--kup-space-03));--kup_box_transition:var(--kup-box-transition, 0.25s);--kup_box_border_color_drag:var(--kup-box-border-color-drag, var(--kup-border-interactive))\n display: block;--kup_box_padding:var(--kup-box-padding, var(--kup-space-05))}.box-component{transition:border var(--kup_box_transition) ease}.box-component[kup-drag-over]{position:relative;border:3px dashed var(--kup_box_border_color_drag)}#box-container{display:grid;grid-gap:var(--kup_box_grid_gap);color:var(--kup_box_text_color);overflow:auto}#box-container.is-kanban .kanban-section{overflow:auto}#box-container.is-kanban .box-wrapper{padding-top:1em}#box-container.is-kanban .box-wrapper .box{overflow:auto}#box-container *:not(.progress-bar-percentage){box-sizing:border-box}#box-container .box-wrapper{display:flex;align-items:center;background-color:var(--kup_box_background_color);border-radius:var(--kup-radius-00)}#box-container .box-wrapper:hover{background-color:var(--kup_box_background_color_hover)}#box-container .box-wrapper.selected{background-color:var(--kup_box_background_color_selected)}#box-container .box-wrapper.selected .box-section.titled>h3{background-color:transparent}#box-container .box-wrapper .box{flex-grow:1;cursor:pointer;position:relative;display:flex;padding:var(--kup_box_padding);transition:background-color var(--kup_box_transition) ease, box-shadow var(--kup_box_transition) ease, border var(--kup_box_transition) ease}#box-container .box-wrapper .box.draggable{touch-action:none;user-select:none}#box-container .box-wrapper .box.column{flex-direction:column}#box-container .box-wrapper .box[kup-draggable]{opacity:0.5}#box-container .box-wrapper .box[kup-drag-over]{border:3px dashed var(--kup_box_border_color_drag);position:relative;z-index:2}#box-container .box-wrapper .box .box-section{display:flex;flex-direction:row;flex:1 1 1%;flex-wrap:wrap}#box-container .box-wrapper .box .box-section.column{flex-direction:column;justify-content:center;flex-wrap:unset}#box-container .box-wrapper .box .box-section.column>.box-section{flex:0 0 auto}#box-container .box-wrapper .box .box-section.grid{display:grid}#box-container .box-wrapper .box .box-section .box-object{min-height:16px}#box-container .box-wrapper .box .box-section .box-object img{height:auto}#box-container .box-wrapper .box .box-section.collapse-section .header{border-top:1px solid var(--kup-border-subtle);color:rgba(var(--kup-text-secondary-rgb), 0.75);display:flex;justify-content:space-around;width:100%}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content{margin:0.5em;display:flex;align-items:center}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image{transition:transform 0.15s}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .f-image.toggled{transform:rotate(-180deg)}#box-container .box-wrapper .box .box-section.collapse-section .header .header-content .kup-icon.kup-dropdown-icon{margin:0;-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}#box-container .box-wrapper .box .box-section.collapse-section .content{display:none;width:100%}#box-container .box-wrapper .box .box-section.collapse-section.open .content{display:block}#box-container .box-wrapper .box .box-section.titled{border:1px solid var(--kup-border-subtle);padding-top:5px;position:relative;margin:10px}#box-container .box-wrapper .box .box-section.titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}#box-container .box-wrapper .box .box-selection{position:absolute;top:0.5em;right:0.5em;z-index:1}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler{position:relative;width:24px;height:24px;margin-left:3px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler svg{cursor:pointer;opacity:0;fill:var(--kup-text-color);transition:opacity 300ms ease-out}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu{background:var(--kup-background-color);border:1px solid var(--kup-border-subtle);box-shadow:0px 0px 7.5px 0px rgba(128, 128, 128, 0.5);position:absolute;top:0;right:24px;display:none;z-index:10}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul{list-style-type:none;margin:0;padding:0}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li{cursor:pointer;white-space:nowrap;padding:0 12px;display:flex;align-items:center;line-height:30px}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu ul>li:not(:last-child){border-bottom:1px solid var(--kup-border-subtle)}#box-container .box-wrapper .row-actions-wrapper .row-actions-toggler .row-action-menu.open{display:block}#box-container .box-wrapper:hover .row-actions-wrapper .row-actions-toggler svg{opacity:1}#sort-panel,#global-filter{margin-bottom:1em}:host(.kup-center-aligned) #kup-component .box-section{text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:center;margin:auto;text-align:center}:host(.kup-center-aligned) #kup-component .box-section .f-cell img{margin:auto}:host(.kup-right-aligned) #kup-component .box-section{text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell .f-cell__content{justify-content:flex-end;margin-left:auto;margin-right:0;text-align:right}:host(.kup-right-aligned) #kup-component .box-section .f-cell img{margin-left:auto;margin-right:0}:host(.kup-top-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-start}:host(.kup-bottom-aligned) #box-container .box-wrapper .box .box-section .column{justify-content:flex-end}:host(.kup-flat-on-hover) #box-container .box-wrapper .box:hover{box-shadow:none}:host(.kup-shaped) .box{border-radius:10px}:host(.kup-round) .box{border-radius:25px}:host(.kup-dashed-sections) .box-section{border:2px dashed var(--kup-text-color)}:host(:not(.kup-paddingless)) #box-container .box .box-section .box-object{padding:1px 4px}:host(:not(.kup-paddingless)) #box-container .box .box-section.last-child{padding:3px 4px}:host(.kup-danger){--kup-box-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-box-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-box-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-box-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-box-primary-color-rgb:var(--kup-warning-color-rgb)}";const D=O;var W=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,o){if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?o:i==="a"?o.call(t):o?o.value:e.get(t)};var B=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,o,s){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?s.call(t,i):s?s.value=i:e.set(t,i),i};var T,$,L,F,H,N,G,V,q;const K=class{constructor(i){t(this,i);this.kupBoxClick=e(this,"kup-box-click",6);this.kupBoxSelected=e(this,"kup-box-selected",6);this.kupAutoBoxSelect=e(this,"kup-box-autoselect",6);this.kupRowActionMenuClick=e(this,"kup-box-rowactionmenuclick",6);this.kupRowActionClick=e(this,"kup-box-rowactionclick",6);this.kupDidLoad=e(this,"kup-box-didload",6);this.kupDidUnload=e(this,"kup-box-didunload",6);this.kupBoxContextMenu=e(this,"kup-box-contextmenu",6);this.kupLoadMoreClick=e(this,"kup-box-loadmoreclick",6);T.add(this);this.state=new S;this.kupManager=r();this.visibleColumns=[];this.rows=[];this.filteredRows=[];this.sectionRef=null;this.rowsRefs=[];this.hold=false;this.interactableDrag=[];this.interactableDrop=[];this.interactableTouch=[];$.set(this,undefined);L.set(this,[]);F.set(this,0);H.set(this,0);N.set(this,0);this.collapsedSection={};this.selectedRows=[];this.rowActionMenuOpened=undefined;this.currentPage=1;this.currentRowsPerPage=10;this.cardData=null;this.columns=1;this.customStyle="";this.data=null;this.dragEnabled=false;this.dropEnabled=false;this.dropOnSection=false;this.editableData=false;this.enableRowActions=false;this.globalFilter=false;this.globalFilterValue="";this.kanban=null;this.layout=undefined;this.lazyLoadRows=false;this.loadMoreLimit=1e3;this.loadMoreMode=E.PROGRESSIVE_THRESHOLD;this.loadMoreStep=60;this.multiSelection=false;this.pageSelected=1;this.pagination=false;this.rowsPerPage=undefined;this.scrollOnHover=false;this.selectBox=undefined;this.selectedRowsState=undefined;this.showLoadMore=false;this.showSelection=true;this.sortBy=undefined;this.sortEnabled=false;this.stateId="";this.store=undefined;this.swipeDisabled=false}initWithPersistedState(){if(this.store&&this.stateId){const t=this.store.getState(this.stateId);if(t!=null){this.kupManager.debug.logMessage(this,"Initialize with state for stateId "+this.stateId+": "+t);this.sortBy=this.state.sortBy;this.globalFilterValue=this.state.globalFilterValue;this.selectedRowsState=this.state.selectedRowsState;this.pageSelected=this.state.pageSelected;this.rowsPerPage=this.state.rowsPerPage;this.loadMoreLimit=t.loadMoreLimit;this.showLoadMore=t.showLoadMore}}}persistState(){if(this.store&&this.stateId){let t=false;if(!this.kupManager.objects.deepEqual(this.state.sortBy,this.sortBy)){this.state.sortBy=this.sortBy;t=true}if(!this.kupManager.objects.deepEqual(this.state.globalFilterValue,this.globalFilterValue)){this.state.globalFilterValue=this.globalFilterValue;t=true}if(!this.kupManager.objects.deepEqual(this.state.pageSelected,this.currentPage)){this.state.pageSelected=this.currentPage;t=true}if(!this.kupManager.objects.deepEqual(this.state.rowsPerPage,this.currentRowsPerPage)){this.state.rowsPerPage=this.currentRowsPerPage;t=true}const e=this.selectedRows.reduce(((t,e,i)=>{const o=i>0?";":"";return t+o+e.id}),"");if(!this.kupManager.objects.deepEqual(this.state.selectedRowsState,e)){this.state.selectedRowsState=e;t=true}if(!this.kupManager.objects.deepEqual(this.state.loadMoreLimit,this.loadMoreLimit)){this.state.loadMoreLimit=this.loadMoreLimit;t=true}if(!this.kupManager.objects.deepEqual(this.state.showLoadMore,this.showLoadMore)){this.state.showLoadMore=this.showLoadMore;t=true}if(!this.state.load){this.state.load=true;return}if(t){this.kupManager.debug.logMessage(this,"Persisting state for stateId "+this.stateId+": "+this.state);this.store.persistState(this.stateId,this.state)}}}rowsPerPageHandler(t){this.currentRowsPerPage=t}recalculateRows(){this.initRows()}onDataChanged(){a(this.getRows());this.initVisibleColumns();this.initRows();this.checkLayout()}onLayoutChanged(){this.checkLayout()}onSelectBoxChanged(){this.handleAutomaticBoxSelection()}async getProps(t){return l(this,I,t)}async loadRowActions(t,e){t.actions=e;this.rowActionMenuOpened=t}async refresh(){i(this)}async setProps(t){h(this,I,t)}getColumns(){return this.data&&this.data.columns?this.data.columns:[{title:"",name:"",size:undefined}]}initVisibleColumns(){this.visibleColumns=this.getColumns().filter((t=>{if(t.hasOwnProperty("visible")){return t.visible}return true}))}getRows(){return this.data&&this.data.rows?this.data.rows:[]}initRows(){this.filteredRows=this.getRows();if(this.globalFilter&&this.globalFilterValue){this.filteredRows=w(this.filteredRows,null,this.globalFilterValue,this.visibleColumns)}this.rows=this.sortRows(this.filteredRows);if(this.pagination){this.rows=v(this.rows,this.currentPage,this.currentRowsPerPage,false)}}sortRows(t){let e=t;if(this.sortBy){e=y(e,this.toSortObjectList())}return e}toSortObjectList(){const t=this.sortBy.split("|").map((t=>{const e=t.split(",");const i={column:e[0],sortMode:e.length>1?c[e[1]]:c.A};return i}));return t}checkScrollOnHover(){if(this.boxContainer){if(!this.kupManager.scrollOnHover.isRegistered(this.boxContainer)){if(this.scrollOnHover){this.kupManager.scrollOnHover.register(this.boxContainer)}}else{if(!this.scrollOnHover){this.kupManager.scrollOnHover.unregister(this.boxContainer)}}}}checkLayout(){if(this.layout){this.boxLayout=this.layout;return}const t={horizontal:false,sections:[]};const e=this.visibleColumns;let i=e.length;let o=[];let s=0;while(i-- >0){o.push({column:e[s++].name})}t.content=o;this.boxLayout={sections:[t]}}onSortChange(t){let e=p(this.visibleColumns,t.detail.value);this.sortBy=e.name}onGlobalFilterChange({detail:t}){let e="";if(t&&t.value){e=t.value}this.globalFilterValue=e}isSectionExpanded(t,e){if(!t.id||!e.id){return false}return this.collapsedSection[e.id]&&this.collapsedSection[e.id][t.id]}handleAutomaticBoxSelection(){if(this.selectBox&&this.selectBox>0&&this.selectBox<=this.data.rows.length){this.selectedRows=[];for(let t of this.data.rows){if(t.id===(this.selectBox-1).toString()){this.selectedRows.push(t);break}}this.kupAutoBoxSelect.emit({comp:this,id:this.rootElement.id,row:this.selectedRows[0]})}}getEventDetails(t,e){let i=null;let o=null;let s=null;let n=null;if(t){for(let e=t.length-1;e>=0;e--){let o=t[e];if(!o.tagName){continue}switch(o.tagName.toUpperCase()){default:{if(o.classList.contains("box-object")){i=o}if(!s&&o["data-row"]){s=o["data-row"]}break}}}}if(i){if(i.classList.contains("f-cell")){const t=i["kup-get-cell-props"]();o=t.cell;n=t.column;s=t.row}else{o=i["data-cell"];s=i["data-row"];n=p(this.visibleColumns,i.dataset.column)}}return{boxObject:i?i:null,column:n?n:null,cell:o?o:null,originalEvent:e,row:s?s:null}}clickHandler(t){const e=this.getEventDetails(this.kupManager.getEventPath(t.target,this.rootElement),t);if(e.row){if(this.multiSelection){this.onSelectionCheckChange(e.row)}else{this.selectedRows=[e.row]}}return e}contextMenuHandler(t){const e=this.getEventDetails(this.kupManager.getEventPath(t.target,this.rootElement),t);return e}checkIfElementIsActionMenuIcon(t){if(t.tagName&&t.parentElement){return t.tagName==="svg"&&t.parentElement.classList.contains("row-actions-toggler")}return false}onSelectionCheckChange(t){var e=-1;for(let i=0;i<this.selectedRows.length;i++){const o=this.selectedRows[i];if(o.id===t.id){e=i;break}}if(e>=0){this.selectedRows.splice(e,1);this.selectedRows=[...this.selectedRows]}else{this.selectedRows=[...this.selectedRows,t]}this.kupBoxSelected.emit({comp:this,id:this.rootElement.id,rows:this.selectedRows})}toggleSectionExpand(t,e){if(!e.id){console.error("cannot expand / collapse a section withoun an ID");return}if(!t.id){console.error("cannot expand / collapse a section of a row without ad id");return}if(!this.collapsedSection[e.id]){this.collapsedSection[e.id]={};this.collapsedSection[e.id][t.id]=true}else{const i=this.collapsedSection[e.id];if(!i[t.id]){i[t.id]=true}else{i[t.id]=!i[t.id]}}this.collapsedSection=Object.assign({},this.collapsedSection)}onRowAction(t){if(!t){return}if(t===this.rowActionMenuOpened){this.rowActionMenuOpened=null;return}if(t.actions){this.rowActionMenuOpened=t}else{this.kupRowActionMenuClick.emit({comp:this,id:this.rootElement.id,row:t})}}onRowActionClick(t,e,i){this.kupRowActionClick.emit({comp:this,id:this.rootElement.id,row:t,action:e,index:i})}clickFunction(t){try{const e=t.composedPath();for(let t of e){if(this.checkIfElementIsActionMenuIcon(t)){return}}}catch(e){if(this.checkIfElementIsActionMenuIcon(t.target)){return}}this.rowActionMenuOpened=null}handlePageChange(t){const e=P(t,this.filteredRows.length,this.currentRowsPerPage);if(e){this.currentPage=e}}handleRowsPerPageChange(t){const e=M(t,this.filteredRows.length);if(e){this.currentRowsPerPage=e;this.adjustPaginator()}}adjustPaginator(){const t=this.rows.length;const e=Math.ceil(t/this.currentRowsPerPage);if(this.currentPage>e){this.currentPage=1}}renderSectionAsCard(t){let e=false;const i={button:[],cell:[],columns:[],image:[],progressbar:[],text:[]};for(let e=0;e<this.data.columns.length;e++){const o=this.data.columns[e];if(o.visible!==false){i.cell.push(t.cells[o.name]);i.columns.push(o)}}for(const e in t.cells){if(t.cells.hasOwnProperty(e)){const o=t.cells[e];if(o.cardID!==undefined&&o.obj){switch(o.obj.p){case"BTN":do{i.button.push({})}while(i.button.length<o.cardID);i.button[o.cardID]={label:o.value};break;case"IMG":do{i.image.push({})}while(i.image.length<o.cardID);i.image[o.cardID]={resource:o.value};break;case"PGB":do{i.progressbar.push({})}while(i.progressbar.length<o.cardID);i.progressbar[o.cardID]={value:o.value};break;default:do{i.text.push("")}while(i.text.length<o.cardID);i.text[o.cardID]=o.value;break}}}}for(const o in t.cells){if(t.cells.hasOwnProperty(o)){const s=t.cells[o];if(s.cardID===undefined&&s.obj){e=false;switch(s.obj.p){case"BTN":for(let t=0;t<i.button.length;t++){if(!Object.keys(i.button[t]).length){i.button[t]={label:s.value};e=true;break}}if(!e){i.button.push({label:s.value})}break;case"IMG":for(let t=0;t<i.image.length;t++){if(!Object.keys(i.image[t]).length){i.image[t]={resource:s.value};e=true;break}}if(!e){i.image.push({resource:s.value})}break;case"PGB":for(let t=0;t<i.progressbar.length;t++){if(!Object.keys(i.progressbar[t]).length){i.progressbar[t]={value:s.value};e=true;break}}if(!e){i.progressbar.push({value:s.value})}break;default:for(let t=0;t<i.text.length;t++){if(i.text[t]===""){i.text[t]=s.value;e=true;break}}if(!e){i.text.push(s.value)}break}}}}return o("kup-card",Object.assign({data:i},this.cardData))}renderRow(t){const e=[...this.visibleColumns];let i=null;let s=t.layout;if(!s){s=this.boxLayout}let n=false;if(s){if(s.horizontal){n=true}const o=s.sections;let r=o.length;let a=0;if(r>0){i=[]}const l={horizontal:n};while(r-- >0){if(this.cardData!==null&&this.cardData!==undefined&&typeof this.cardData==="object"){i.push(this.renderSectionAsCard(t))}else{i.push(this.renderSection(o[a++],l,t,e))}}}var r=false;for(let e of this.selectedRows){if(e.id===t.id){r=true}}let a=null;if(this.multiSelection){a=o("div",{class:"box-selection"},o("kup-checkbox",{checked:r}))}let l=null;if(this.enableRowActions&&!this.swipeDisabled){const e={"row-action-menu":true,open:t===this.rowActionMenuOpened};let i=null;if(t.actions){const e=t.actions.map(((e,i)=>{const s=`icon ${e.icon}`;return o("li",{tabindex:"0",onClick:()=>this.onRowActionClick(t,e,i)},o("div",{class:s}),o("div",{class:"text"},e.text))}));i=o("ul",null,e)}l=o("div",{class:"row-actions-wrapper"},o("div",{class:"row-actions-toggler"},o("svg",{version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24",onClick:()=>this.onRowAction(t)},o("path",{d:"M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"})),o("div",{class:e},i)))}let h=null;if(t.badgeData&&t.badgeData.length>0){h=t.badgeData.map((t=>o("kup-badge",{text:t.text,class:t["className"]?`centered ${t["className"]}`:"centered",imageData:t.imageData})))}const c={box:true,draggable:this.dragEnabled,selected:this.showSelection&&r,column:!n};const p=t.style||{};return o("div",{class:"box-wrapper",style:p,ref:t=>{if(t){W(this,L,"f").push(t)}}},o("div",{class:c,"data-row":t,ref:t=>this.rowsRefs.push(t)},a,i,h),l)}renderSection(t,e,i,s){let n=null;if(t.sections&&t.sections.length>0){const e=t.sections;let o=e.length;let r=0;if(o>0){n=[]}while(o-- >0){n.push(this.renderSection(e[r++],t,i,s))}}else if(t.content){const e=t.content;let o=e.length;let r=0;if(o>0){n=[]}while(o-- >0){n.push(this.renderBoxObject({boxObject:e[r++],row:i,visibleColumns:s},true))}}else if(s.length>0){const t=s[0];n=this.renderBoxObject({boxObject:{column:t.name},row:i,visibleColumns:s})}const r=this.isSectionExpanded(i,t);const a=!!t.columns;const l={"box-section":true,open:r,column:!a&&!t.horizontal,grid:a,titled:!!t.title,"last-child":!t.sections||t.sections.length===0};const h=t.style||{};if(t.dim&&e){h.flex=`0 0 ${t.dim}`;h.overflow="hidden";if(e.horizontal){h.maxWidth=t.dim}else{h.maxHeight=t.dim}}if(a){h["grid-template-columns"]=`repeat(${t.columns}, 1fr)`}let c=null;if(t.collapsible){l["collapse-section"]=true;const e={content:true};let s="";if(t.title){s=t.title}else if(r){s=this.kupManager.language.translate(u.COLLAPSE)}else{s=this.kupManager.language.translate(u.EXPAND)}c=o("div",{class:l,style:h},o("div",{class:e},n),o("div",{class:"header",role:"button",onClick:e=>{e.stopPropagation();this.toggleSectionExpand(i,t)}},o("div",{class:"header-content"},o("span",null,s),o(_,{resource:`${d.DROPDOWN}`,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:r?"toggled":""}))))}else{const e=t.title?o("h3",null,t.title):null;c=o("div",{class:l,style:h},e,n)}return c}renderBoxObject({boxObject:t,row:e,visibleColumns:i},s){const n={"box-object":true};const r={};let a=null;let l=-1;for(let e=0;e<i.length;e++){const o=i[e];if(o.name===t.column){l=e;break}}if(l>=0){a=i[l];i.splice(l,1)}else if(s){a=this.data.columns.find((e=>e.name===t.column))}const h=e.cells[t.column];let c=undefined;if(h&&!this.kupManager.objects.isEmptyKupObj(h.obj)){n["is-obj"]=true;if(this.kupManager.debug.isDebug()){c=h.obj.t+"; "+h.obj.p+"; "+h.obj.k+";"}}const p={cell:h,column:a,component:this,editable:this.editableData,renderKup:true,row:e,setSizes:true,shape:t.shape};return o("div",{"data-cell":h,"data-row":e,"data-column":t.column,class:n,style:r,title:c},h&&a?o(z,Object.assign({},p)):o("span",null,t.value))}kanbanMode(){if(!this.kanban.columns||this.kanban.columns.length===0){this.kupManager.debug.logMessage(this,"No columns to group by detected.",f.ERROR);return{jsx:o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{ref:t=>this.rowsRefs.push(t)}),this.kupManager.language.translate(u.EMPTY_DATA)),style:{"grid-template-columns":`repeat(1, 1fr)`}}}const t=[];if(this.kanban.labels){for(let e=0;e<this.kanban.labels.length;e++){const i=this.kanban.labels[e];t.push({labels:i,nodes:[]})}}for(let e=0;e<this.rows.length;e++){let i=[];for(let t=0;t<this.kanban.columns.length;t++){try{i.push(this.rows[e].cells[this.kanban.columns[t]].value)}catch(t){this.kupManager.debug.logMessage(this,t,f.WARNING)}}const o={found:false,index:null};for(let e=0;e<t.length;e++){let s=t[e].labels;let n=true;for(let t=0;t<s.length;t++){if(i[t]!==s[t]){n=false;break}}if(n){o.found=true;o.index=e;break}}if(o.found){t[o.index].nodes.push(this.renderRow(this.rows[e]))}else{t.push({labels:i,nodes:[this.renderRow(this.rows[e])]})}}const e=[];for(let i=0;i<t.length;i++){const s=t[i].labels;const n={data:[]};for(let t=0;t<s.length;t++){n.data.push({value:s[t],id:s[t]})}e.push(o("div",{class:"kanban-section"},o(j,Object.assign({},n)),t[i].nodes))}return{jsx:e,style:{"grid-template-columns":this.kanban.isStacked?"repeat(1fr)":this.kanban.size?`repeat(${Object.keys(t).length}, ${this.kanban.size})`:`repeat(${Object.keys(t).length}, 1fr)`}}}didLoadInteractables(){this.interactableTouch.push(this.boxContainer);const t=t=>{var e;if(this.hold){this.hold=false;return}switch(t.button){case 0:const i={};for(const e in t){i[e]=t[e]}const o=this.clickHandler(i);this.kupBoxClick.emit({comp:this,id:this.rootElement.id,row:o.row,column:(e=o.column)===null||e===void 0?void 0:e.name});break;case 2:this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)});break}};const e=t=>{if(t.pointerType==="pen"||t.pointerType==="touch"){this.hold=true;this.kupBoxContextMenu.emit({comp:this,id:this.rootElement.id,details:this.contextMenuHandler(t)})}};this.kupManager.interact.on(this.boxContainer,b.TAP,t);this.kupManager.interact.on(this.boxContainer,b.HOLD,e)}didRenderInteractables(){if(this.dragEnabled){for(let t=0;t<this.rowsRefs.length;t++){const e=this.rowsRefs[t];const i=()=>{const t=this.rootElement.shadowRoot.querySelector(".box-object:hover");return{cell:t["data-cell"],column:p(this.visibleColumns,t.dataset.column),id:this.rootElement.id,multiple:this.multiSelection,row:t["data-row"],selectedRows:this.selectedRows}};if(e&&!this.interactableDrag.includes(e)){this.interactableDrag.push(e);this.kupManager.interact.draggable(e,{allowFrom:".box-object",cursorChecker(){return null}},{callback:i},x.BADGE)}}}if(this.dropEnabled){const t=()=>{const t=this.rootElement.shadowRoot.querySelector(".box:hover");if(!t){this.kupManager.debug.logMessage(this,"Couldn't find cell hovered to retrieve dropzone informations!",f.WARNING);return}const e=this.kupManager.getEventPath(t,this.rootElement);const i=this.getEventDetails(e);return{cell:i.cell,column:i.column,id:this.rootElement.id,row:i.row}};if(!this.interactableDrop.includes(this.sectionRef)){this.interactableDrop.push(this.sectionRef);this.kupManager.interact.dropzone(this.sectionRef,{accept:`[${g}]`},{dispatcher:this.rootElement,type:m.BOX})}for(let e=0;e<this.rowsRefs.length;e++){const i=this.rowsRefs[e];if(i&&!this.interactableDrop.includes(i)){this.interactableDrop.push(i);this.kupManager.interact.dropzone(i,{accept:`[${g}]`},{callback:t,dispatcher:this.rootElement,type:m.BOX})}}}}componentWillLoad(){this.kupManager.debug.logLoad(this,false);if(this.rowsPerPage){this.currentRowsPerPage=this.rowsPerPage}if(this.data&&this.data.rows&&this.currentRowsPerPage>this.data.rows.length){this.currentRowsPerPage=this.data.rows.length}this.kupManager.language.register(this);this.kupManager.theme.register(this);this.onDataChanged();this.adjustPaginator();if(document.querySelector(".header")){B(this,F,document.querySelector(".header").clientHeight,"f")}else{B(this,F,0,"f")}if(document.querySelector(".topbar")){B(this,F,W(this,F,"f")+document.querySelector(".topbar").clientHeight,"f")}W(this,T,"m",V).call(this)}componentDidLoad(){this.handleAutomaticBoxSelection();document.addEventListener("click",this.clickFunction.bind(this));this.currentPage=this.pageSelected;if(this.multiSelection&&this.selectedRowsState){this.selectedRows=[];let t=this.selectedRowsState.split(";");this.selectedRows=this.data.rows.filter((e=>t.indexOf(e.id)>=0))}this.didLoadInteractables();this.kupDidLoad.emit({comp:this,id:this.rootElement.id});this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const e=t.querySelectorAll(".f-text-field");for(let t=0;t<e.length;t++){A(e[t])}}this.checkScrollOnHover();this.persistState();this.didRenderInteractables();W(this,T,"m",G).call(this);this.kupManager.debug.logRender(this,true)}render(){B(this,L,[],"f");const t=!!(typeof this.kanban==="object"&&this.kanban!==null);let e=null;if(this.sortEnabled){const t=this.visibleColumns.map((t=>{const e={value:t.title,id:t.name,selected:t.name===this.sortBy};return e}));const i=[{value:"",id:""},...t];let s={label:this.kupManager.language.translate(u.SORT_BY),trailingIcon:true};let n={data:i,selectable:true};let r={"kup-text-field":s,"kup-list":n};e=o("div",{id:"sort-panel"},o("kup-combobox",{data:r,initialValue:this.sortBy,"onkup-combobox-itemclick":t=>this.onSortChange(t)}))}let i=null;if(this.globalFilter){i=o("div",{id:"global-filter"},o("kup-text-field",{fullWidth:true,label:this.kupManager.language.translate(k.SEARCH),icon:d.SEARCH,initialValue:this.globalFilterValue,"onkup-textfield-input":t=>{window.clearTimeout(this.globalFilterTimeout);this.globalFilterTimeout=window.setTimeout((()=>this.onGlobalFilterChange(t)),600)}}))}let n=null;if(this.showLoadMore||!this.lazyLoadRows&&this.pagination){n=o(R,{id:"top-paginator",currentPage:this.currentPage,max:this.filteredRows.length,perPage:this.currentRowsPerPage?this.currentRowsPerPage:this.rowsPerPage,onLoadMore:this.showLoadMore?()=>{W(this,T,"m",q).call(this)}:null,onNextPage:()=>this.handlePageChange(this.currentPage+1),onPrevPage:()=>this.handlePageChange(this.currentPage-1),onPageChange:t=>this.handlePageChange(t.detail.value),onRowsChange:t=>this.handleRowsPerPageChange(t.detail.value)})}let r=null;let a={};if(this.rows.length===0){r=o("div",{id:"empty-data-message",class:"box-wrapper"},o("div",{class:"box",ref:t=>this.rowsRefs.push(t)},this.kupManager.language.translate(u.EMPTY_DATA)));a={"grid-template-columns":`repeat(1, 1fr)`}}else if(t){const t=this.kanbanMode();r=t.jsx;a=t.style}else{a={"grid-template-columns":`repeat(${this.columns}, 1fr)`};const t=this.rows;let e=t.length;let i=0;r=[];while(e-- >0){r.push(this.renderRow(t[i++]))}}return o(s,null,o("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{id:C},o("div",{class:"box-component",ref:t=>this.sectionRef=t},e,i,n,o("div",{class:t?"is-kanban":"",id:"box-container",style:a,onContextMenu:t=>{t.preventDefault()},ref:t=>this.boxContainer=t},r))))}disconnectedCallback(){this.kupManager.interact.unregister(this.interactableDrag.concat(this.interactableDrop));this.kupManager.language.unregister(this);this.kupManager.theme.unregister(this);if(this.scrollOnHover){this.kupManager.scrollOnHover.unregister(this.boxContainer)}document.removeEventListener("click",this.clickFunction.bind(this));this.kupDidUnload.emit({comp:this,id:this.rootElement.id})}get rootElement(){return n(this)}static get watchers(){return{rowsPerPage:["rowsPerPageHandler","recalculateRows"],globalFilterValue:["recalculateRows"],sortBy:["recalculateRows"],pagination:["recalculateRows"],currentPage:["recalculateRows"],currentRowsPerPage:["recalculateRows"],data:["onDataChanged"],layout:["onLayoutChanged"],selectBox:["onSelectBoxChanged"]}}};$=new WeakMap,L=new WeakMap,F=new WeakMap,H=new WeakMap,N=new WeakMap,T=new WeakSet,G=function t(){if(this.lazyLoadRows&&this.currentRowsPerPage<this.data.rows.length){W(this,$,"f").observe(W(this,L,"f")[W(this,L,"f").length-1])}},V=function t(){const e=t=>{t.forEach((t=>{if(t.isIntersecting){this.kupManager.debug.logMessage(this,"Last row entering the viewport, loading more elements.");const e=this.data.rows.length-this.currentRowsPerPage;if(e<this.loadMoreStep){this.currentRowsPerPage+=e}else{this.currentRowsPerPage+=this.loadMoreStep}t.target.classList.remove("last-row");W(this,$,"f").unobserve(t.target)}}))};const i={threshold:0,rootMargin:"-"+W(this,F,"f")+"px 0px 0px 0px"};B(this,$,new IntersectionObserver(e,i),"f")},q=function t(){var e;let i=0;switch(this.loadMoreMode){case E.CONSTANT:i=this.loadMoreStep;break;case E.CONSTANT_INCREMENT:i=this.loadMoreStep*(W(this,H,"f")+1);break;case E.PROGRESSIVE_THRESHOLD:i=Math.max(W(this,N,"f"),this.loadMoreStep)*Math.min(W(this,H,"f")+1,2);break}if(i>this.loadMoreLimit){i=this.loadMoreLimit}this.kupLoadMoreClick.emit({comp:this,id:this.rootElement.id,loadItems:i});B(this,N,i,"f");B(this,H,(e=W(this,H,"f"),e++,e),"f")};K.style=D;export{K as kup_box};
|
|
2
|
+
//# sourceMappingURL=p-0f8be7d2.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as o,H as a,d as n}from"./p-d7c15b0e.js";import{k as s,g as f,s as p}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,f as i,h as o,H as a,d as n}from"./p-d7c15b0e.js";import{k as s,g as f,s as p}from"./p-e1cf074e.js";import{c as h}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var r;(function(t){t["customStyle"]="Custom style of the component.";t["placeholderAttrs"]="Html attributes of the picture before the component enters the viewport.";t["resourceAttrs"]="Html attributes of the picture after the component enters the viewport."})(r||(r={}));const l=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_photoframe_border:var(\n --kup-photoframe-border,\n 1px inset var(--kup-border-subtle)\n );--kup_photoframe_fade_out_time:var(--kup-photoframe-fade-out-time, 2000ms);border:var(--kup_photoframe_border);display:block;height:100%;position:relative;width:100%}#kup-component{position:relative;height:100%;width:100%}img{max-height:100%;max-width:100%}.horizontal img{width:100%}.vertical img{height:100%}.placeholder{display:none;transition:opacity var(--kup_photoframe_fade_out_time) ease-out;will-change:opacity;z-index:1}.placeholder--loaded{display:block}.placeholder--fade-out{opacity:0;position:absolute}.resource{display:none;left:0;position:absolute;top:0;z-index:0}.resource--fade-in{display:block;position:relative}:host(.kup-fit) img{height:100%;object-fit:cover;width:100%}";const c=l;var d=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,o){if(i==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?o:i==="a"?o.call(t):o?o.value:e.get(t)};var u=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,o,a){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?a.call(t,i):a?a.value=i:e.set(t,i),i};var m,g,k,y,w,x;const v=class{constructor(i){t(this,i);this.kupPhotoFramePlaceholderLoad=e(this,"kup-photoframe-placeholderload",6);this.kupPhotoFrameResourceLoad=e(this,"kup-photoframe-resourceload",6);m.set(this,null);g.set(this,s());k.set(this,null);y.set(this,null);w.set(this,false);x.set(this,null);this.isInViewport=false;this.customStyle="";this.placeholderAttrs={};this.resourceAttrs={};this.threshold=.25}async getProps(t){return f(this,r,t)}async refresh(){i(this)}async setProps(t){p(this,r,t)}setObserver(){let t=t=>{t.forEach((t=>{if(t.isIntersecting){this.isInViewport=true;d(this,m,"f").unobserve(this.rootElement)}}))};let e={threshold:this.threshold};u(this,m,new IntersectionObserver(t,e),"f")}componentWillLoad(){d(this,g,"f").debug.logLoad(this,false);d(this,g,"f").theme.register(this);this.setObserver()}componentDidLoad(){d(this,g,"f").debug.logLoad(this,true)}componentWillRender(){d(this,g,"f").debug.logRender(this,false)}componentDidRender(){d(this,g,"f").debug.logRender(this,true)}render(){if(this.isInViewport&&!d(this,w,"f")){u(this,w,true,"f")}return o(a,{key:"0a8e3132bca574cfbb1cce6ad4caafa9214e9c76"},o("style",{key:"9ee8736d2783d07c51dcd87d2dbbe366bae06078"},d(this,g,"f").theme.setKupStyle(this.rootElement)),o("div",{key:"f93a429043a18f9d5b1ca8eaebfcb97ecc0218e7",id:h,ref:t=>{u(this,x,t,"f")}},o("img",Object.assign({key:"41d8a842da9ec15a748073f221641876a4e37dcf"},this.placeholderAttrs,{class:"placeholder",ref:t=>u(this,k,t,"f"),onLoad:()=>{if(d(this,k,"f").naturalWidth>d(this,k,"f").naturalHeight){d(this,x,"f").classList.add("horizontal")}else{d(this,x,"f").classList.add("vertical")}d(this,m,"f").observe(this.rootElement);d(this,k,"f").classList.add("placeholder--loaded");this.kupPhotoFramePlaceholderLoad.emit({comp:this,id:this.rootElement.id})}})),d(this,w,"f")?o("img",Object.assign({},this.resourceAttrs,{class:"resource",ref:t=>u(this,y,t,"f"),onLoad:()=>{d(this,k,"f").classList.add("placeholder--fade-out");d(this,y,"f").classList.add("resource--fade-in");this.kupPhotoFrameResourceLoad.emit({comp:this,id:this.rootElement.id})}})):null))}disconnectedCallback(){var t;d(this,g,"f").theme.unregister(this);(t=d(this,m,"f"))===null||t===void 0?void 0:t.unobserve(this.rootElement)}get rootElement(){return n(this)}};m=new WeakMap,g=new WeakMap,k=new WeakMap,y=new WeakMap,w=new WeakMap,x=new WeakMap;v.style=c;export{v as kup_photo_frame};
|
|
2
|
+
//# sourceMappingURL=p-10cea33b.entry.js.map
|