@sme.up/ketchup 11.0.0-SNAPSHOT-20241126152113 → 11.0.0-SNAPSHOT-20241127090925
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-6a401f54.js → f-cell-9e9a291e.js} +4 -4
- package/dist/cjs/{f-cell-6a401f54.js.map → f-cell-9e9a291e.js.map} +1 -1
- package/dist/cjs/{f-chip-525536f4.js → f-chip-43fb65b2.js} +2 -2
- package/dist/cjs/{f-chip-525536f4.js.map → f-chip-43fb65b2.js.map} +1 -1
- package/dist/cjs/{f-paginator-utils-f6758cd9.js → f-paginator-utils-ada85b68.js} +2 -2
- package/dist/cjs/{f-paginator-utils-f6758cd9.js.map → f-paginator-utils-ada85b68.js.map} +1 -1
- package/dist/cjs/{f-text-field-3bdc88d7.js → f-text-field-be868b63.js} +5 -2
- package/dist/cjs/f-text-field-be868b63.js.map +1 -0
- 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-d64f7d7a.js → kup-data-table-helper-fd333383.js} +2 -2
- package/dist/cjs/{kup-data-table-helper-d64f7d7a.js.map → kup-data-table-helper-fd333383.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-c352f5e2.js → kup-manager-a588c6da.js} +2 -2
- package/dist/cjs/{kup-manager-c352f5e2.js.map → kup-manager-a588c6da.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/collection/f-components/f-text-field/f-text-field.js +3 -0
- package/dist/collection/f-components/f-text-field/f-text-field.js.map +1 -1
- package/dist/components/kup-autocomplete2.js +3 -0
- package/dist/components/kup-autocomplete2.js.map +1 -1
- package/dist/components/kup-manager.js +1 -1
- package/dist/components/kup-manager.js.map +1 -1
- package/dist/esm/{f-cell-d344559d.js → f-cell-dc844fda.js} +4 -4
- package/dist/esm/{f-cell-d344559d.js.map → f-cell-dc844fda.js.map} +1 -1
- package/dist/esm/{f-chip-b5a960e4.js → f-chip-9103ffc9.js} +2 -2
- package/dist/esm/{f-chip-b5a960e4.js.map → f-chip-9103ffc9.js.map} +1 -1
- package/dist/esm/{f-paginator-utils-59096636.js → f-paginator-utils-6edcb9c3.js} +2 -2
- package/dist/esm/{f-paginator-utils-59096636.js.map → f-paginator-utils-6edcb9c3.js.map} +1 -1
- package/dist/esm/{f-text-field-3e8f19e4.js → f-text-field-80930605.js} +5 -2
- package/dist/{ketchup/p-a61546b9.js.map → esm/f-text-field-80930605.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-d87897de.js → kup-data-table-helper-995fc188.js} +2 -2
- package/dist/esm/{kup-data-table-helper-d87897de.js.map → kup-data-table-helper-995fc188.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-734ac610.js → kup-manager-e9b17e17.js} +2 -2
- package/dist/esm/{kup-manager-734ac610.js.map → kup-manager-e9b17e17.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-6e8c175f.entry.js → p-02503afe.entry.js} +2 -2
- package/dist/ketchup/{p-c1eab0b5.entry.js → p-043324c6.entry.js} +2 -2
- package/dist/ketchup/{p-41373d28.js → p-0facfbaf.js} +2 -2
- package/dist/ketchup/p-2acd1e25.js +2 -0
- package/dist/ketchup/p-2acd1e25.js.map +1 -0
- package/dist/ketchup/{p-ce5f056b.entry.js → p-2deef1fb.entry.js} +2 -2
- package/dist/ketchup/{p-a2b1c88f.entry.js → p-40349e58.entry.js} +2 -2
- package/dist/ketchup/{p-c3fd52bb.entry.js → p-4175b5ce.entry.js} +2 -2
- package/dist/ketchup/{p-99aa3fd5.entry.js → p-44a9afa7.entry.js} +2 -2
- package/dist/ketchup/{p-f1ccd876.js → p-54f6e4df.js} +4 -4
- package/dist/ketchup/p-54f6e4df.js.map +1 -0
- package/dist/ketchup/{p-d2f32f1c.entry.js → p-574e970a.entry.js} +2 -2
- package/dist/ketchup/{p-7142f2cb.js → p-6b225612.js} +2 -2
- package/dist/ketchup/{p-5e7bdc8f.entry.js → p-70ea1441.entry.js} +2 -2
- package/dist/ketchup/{p-8d393000.entry.js → p-76573017.entry.js} +2 -2
- package/dist/ketchup/{p-d3318d46.entry.js → p-7fc2ece1.entry.js} +2 -2
- package/dist/ketchup/p-81876eef.entry.js +2 -0
- package/dist/ketchup/{p-ad948253.entry.js.map → p-81876eef.entry.js.map} +1 -1
- package/dist/ketchup/{p-733fa75d.entry.js → p-836b5606.entry.js} +2 -2
- package/dist/ketchup/{p-a533d712.entry.js → p-854b4c27.entry.js} +2 -2
- package/dist/ketchup/{p-95e2b3e9.entry.js → p-87e71fb1.entry.js} +2 -2
- package/dist/ketchup/{p-03746a30.entry.js → p-8a540599.entry.js} +2 -2
- package/dist/ketchup/{p-1cd09e44.entry.js → p-8a7e8043.entry.js} +2 -2
- package/dist/ketchup/{p-e0fffd5d.entry.js → p-9bae40e3.entry.js} +2 -2
- package/dist/ketchup/{p-8bfe8781.entry.js → p-a3ae1c57.entry.js} +2 -2
- package/dist/ketchup/{p-9fc0c161.entry.js → p-b2e6fcf9.entry.js} +2 -2
- package/dist/ketchup/{p-8c8dda16.entry.js → p-b3bee19d.entry.js} +2 -2
- package/dist/ketchup/{p-743d9b2c.entry.js → p-b413dbae.entry.js} +2 -2
- package/dist/ketchup/{p-36a98a27.entry.js → p-b44cdd98.entry.js} +2 -2
- package/dist/ketchup/{p-80cf6fc6.entry.js → p-b6589b6a.entry.js} +2 -2
- package/dist/ketchup/{p-13afe462.entry.js → p-badd6e2e.entry.js} +2 -2
- package/dist/ketchup/{p-507e6f98.entry.js → p-c0ded373.entry.js} +2 -2
- package/dist/ketchup/{p-7ca44626.entry.js → p-c739bb15.entry.js} +2 -2
- package/dist/ketchup/{p-4166302d.entry.js → p-cfb1d74e.entry.js} +2 -2
- package/dist/ketchup/{p-66d129ca.entry.js → p-cfee9a84.entry.js} +2 -2
- package/dist/ketchup/{p-69b1117e.js → p-d5ec4d2e.js} +2 -2
- package/dist/ketchup/{p-c4ff4d97.js → p-df8c4398.js} +2 -2
- package/dist/ketchup/{p-3ed44151.entry.js → p-e2506dce.entry.js} +2 -2
- package/dist/ketchup/{p-edf45917.entry.js → p-ff4f5497.entry.js} +2 -2
- package/package.json +1 -1
- package/dist/cjs/f-text-field-3bdc88d7.js.map +0 -1
- package/dist/esm/f-text-field-3e8f19e4.js.map +0 -1
- package/dist/ketchup/p-a61546b9.js +0 -2
- package/dist/ketchup/p-ad948253.entry.js +0 -2
- package/dist/ketchup/p-f1ccd876.js.map +0 -1
- /package/dist/ketchup/{p-6e8c175f.entry.js.map → p-02503afe.entry.js.map} +0 -0
- /package/dist/ketchup/{p-c1eab0b5.entry.js.map → p-043324c6.entry.js.map} +0 -0
- /package/dist/ketchup/{p-41373d28.js.map → p-0facfbaf.js.map} +0 -0
- /package/dist/ketchup/{p-ce5f056b.entry.js.map → p-2deef1fb.entry.js.map} +0 -0
- /package/dist/ketchup/{p-a2b1c88f.entry.js.map → p-40349e58.entry.js.map} +0 -0
- /package/dist/ketchup/{p-c3fd52bb.entry.js.map → p-4175b5ce.entry.js.map} +0 -0
- /package/dist/ketchup/{p-99aa3fd5.entry.js.map → p-44a9afa7.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d2f32f1c.entry.js.map → p-574e970a.entry.js.map} +0 -0
- /package/dist/ketchup/{p-7142f2cb.js.map → p-6b225612.js.map} +0 -0
- /package/dist/ketchup/{p-5e7bdc8f.entry.js.map → p-70ea1441.entry.js.map} +0 -0
- /package/dist/ketchup/{p-8d393000.entry.js.map → p-76573017.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d3318d46.entry.js.map → p-7fc2ece1.entry.js.map} +0 -0
- /package/dist/ketchup/{p-733fa75d.entry.js.map → p-836b5606.entry.js.map} +0 -0
- /package/dist/ketchup/{p-a533d712.entry.js.map → p-854b4c27.entry.js.map} +0 -0
- /package/dist/ketchup/{p-95e2b3e9.entry.js.map → p-87e71fb1.entry.js.map} +0 -0
- /package/dist/ketchup/{p-03746a30.entry.js.map → p-8a540599.entry.js.map} +0 -0
- /package/dist/ketchup/{p-1cd09e44.entry.js.map → p-8a7e8043.entry.js.map} +0 -0
- /package/dist/ketchup/{p-e0fffd5d.entry.js.map → p-9bae40e3.entry.js.map} +0 -0
- /package/dist/ketchup/{p-8bfe8781.entry.js.map → p-a3ae1c57.entry.js.map} +0 -0
- /package/dist/ketchup/{p-9fc0c161.entry.js.map → p-b2e6fcf9.entry.js.map} +0 -0
- /package/dist/ketchup/{p-8c8dda16.entry.js.map → p-b3bee19d.entry.js.map} +0 -0
- /package/dist/ketchup/{p-743d9b2c.entry.js.map → p-b413dbae.entry.js.map} +0 -0
- /package/dist/ketchup/{p-36a98a27.entry.js.map → p-b44cdd98.entry.js.map} +0 -0
- /package/dist/ketchup/{p-80cf6fc6.entry.js.map → p-b6589b6a.entry.js.map} +0 -0
- /package/dist/ketchup/{p-13afe462.entry.js.map → p-badd6e2e.entry.js.map} +0 -0
- /package/dist/ketchup/{p-507e6f98.entry.js.map → p-c0ded373.entry.js.map} +0 -0
- /package/dist/ketchup/{p-7ca44626.entry.js.map → p-c739bb15.entry.js.map} +0 -0
- /package/dist/ketchup/{p-4166302d.entry.js.map → p-cfb1d74e.entry.js.map} +0 -0
- /package/dist/ketchup/{p-66d129ca.entry.js.map → p-cfee9a84.entry.js.map} +0 -0
- /package/dist/ketchup/{p-69b1117e.js.map → p-d5ec4d2e.js.map} +0 -0
- /package/dist/ketchup/{p-c4ff4d97.js.map → p-df8c4398.js.map} +0 -0
- /package/dist/ketchup/{p-3ed44151.entry.js.map → p-e2506dce.entry.js.map} +0 -0
- /package/dist/ketchup/{p-edf45917.entry.js.map → p-ff4f5497.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as o,c as i,f as t,h as e,H as r,d as a}from"./p-d7c15b0e.js";import{k as n,a as c,g as p,s as d,d as s,b as l}from"./p-f1ccd876.js";import{F as h}from"./p-2b519589.js";import{c as u}from"./p-635bb4b3.js";import{M as f}from"./p-d4a879fc.js";import"./p-029c7cbe.js";var m;(function(o){o["customStyle"]="Custom style of the component. For more information: https://smeup.github.io/ketchup/#/customization";o["data"]="Data of the accordion.";o["ripple"]="When enabled displays Material's ripple effect on item headers."})(m||(m={}));const _=".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_accordion_border_top_color:var(\n --kup-accordion-border-top-color,\n var(--kup-border-subtle)\n );--kup_accordion_item_small_height:var(\n --kup-accordion-item-small-height,\n 32px\n );--kup_accordion_item_medium_height:var(\n --kup-accordion-item-medium-height,\n 40px\n );--kup_accordion_item_outline_color_active:var(\n --kup-accordion-item-outline-color-focus,\n var(--kup-border-interactive)\n );--kup_accordion_item_large_height:var(\n --kup-accordion-item-medium-height,\n 48px\n );--kup_accordion_header_background_color:var(\n --kup-accordion-header-background-color,\n var(--kup-layer-0)\n );--kup_accordion_header_background_color_hover:var(\n --kup-accordion-header-background-color-hover,\n var(--kup-layer-0-hover)\n );--kup_accordion_header_padding:var(\n --kup-accordion-header-padding,\n var(--kup-space-05)\n );--kup_accordion_dropdown_icon_color:var(\n --kup-accordio-dropdown-icon-color,\n var(--kup-text-primary)\n );--kup_accordion_transition:var(--kup-accordion-transition, 80ms);display:block;font-family:var(--kup_accordion_font_family);font-size:var(--kup_accordion_font_size)}.accordion{border-radius:var(--kup_accordion_border_radius);display:flex;flex-wrap:wrap;flex-direction:column;width:100%}.accordion-item{border-top:1px solid var(--kup_accordion_border_top_color);box-sizing:border-box;width:100%}.accordion-item--visible{display:block}.accordion-item:is(:last-of-type){border-bottom:1px solid var(--kup_accordion_border_top_color)}.accordion-item__header{height:var(--kup_accordion_item_medium_height);align-items:center;border:none;box-sizing:border-box;color:var(--kup_accordion_text_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;padding:var(--kup_accordion_padding);text-align:left;transition:background-color var(--kup_accordion_transition), color var(--kup_accordion_transition);width:100%;outline:2px solid transparent;outline-offset:-2px;padding-left:16px;padding-right:16px}.accordion-item__header:focus{outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header.accordion-item--small{height:var(--kup_accordion_item_small_height)}.accordion-item__header.accordion-item--large{height:var(--kup_accordion_item_large_height)}.accordion-item__header:hover:not(.accordion-item__header--selected){background-color:var(--kup_accordion_header_background_color_hover)}.accordion-item__header:focus(.accordion-item__header--selected){outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header--expanded{background-color:var(--kup_accordion_background_color)}.accordion-item__header--expanded .accordion-item__dropdown{transform:rotate(-180deg)}.accordion-item__text{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}.accordion-item__text--highlighted{color:var(--kup_accordion_text_on_primary_color);background-color:var(--kup_accordion_primary_color)}.accordion-item__icon{margin-left:0;margin-right:0.5em}.accordion-item__dropdown{background-color:var(--kup_accordion_dropdown_icon_color);height:1.5em;margin-left:auto;margin-right:0;min-width:1.5em;width:1.5em;transition:transform var(--kup_accordion_transition)}.accordion-item__content{padding-left:16px;padding-top:8px;padding-bottom:24px;padding-right:80px;animation:fade-in 0.25s ease-out;display:none;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}.accordion-item__content--selected{display:block}.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:var(--kup_accordion_primary_color)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}:host(.kup-borderless){--kup-accordion-border:none}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-danger){--kup-accordion-primary-color:var(--kup-danger-color-60);--kup-accordion-primary-color-rgb:var(--kup-danger-color-60-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-info){--kup-accordion-primary-color:var(--kup-info-50-color);--kup-accordion-primary-color-rgb:var(--kup-info-color-50-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-secondary){--kup-accordion-primary-color:var(--kup-secondary-color);--kup-accordion-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-accordion-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-accordion-primary-color:var(--kup-success-color-40);--kup-accordion-primary-color-rgb:var(--kup-success-color-40-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-warning){--kup-accordion-primary-color:var(--kup-warning-color-50);--kup-accordion-primary-color-rgb:var(--kup-warning-color-50-rgb);--kup-accordion-text-on-primary-color:white}";const k=_;const g=class{constructor(t){o(this,t);this.kupAccordionItemSelected=i(this,"kup-accordion-itemselected",6);this.kupManager=n();this.slotsNames=[];this.selectedItems=[];this.customStyle="";this.data=null;this.ripple=false;this.sizing=c.SMALL}applyRipple(){const o=this.rootElement.shadowRoot;if(o&&this.ripple){const i=o.querySelectorAll(".mdc-ripple-surface:not(.mdc-ripple-upgraded)");if(i){for(let o=0;o<i.length;o++){f.attachTo(i[o])}}}}async collapseAll(){const o=[];for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const e=t.name;if(!this.isItemExpandible(e)&&this.isItemSelected(e)){o.push(e)}}this.selectedItems=o}async expandAll(){const o=[];for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const e=t.name;if(this.isItemExpandible(e)){o.push(e)}}this.selectedItems=o}async getProps(o){return p(this,m,o)}async refresh(){t(this)}async setProps(o){d(this,m,o)}async toggleItem(o){const i=this.isItemExpandible(o);const t=[...this.selectedItems];if(t.includes(o)){t.splice(t.indexOf(o),1)}else{t.push(o)}this.selectedItems=t;if(!i){this.kupAccordionItemSelected.emit({comp:this,id:this.rootElement.id,itemName:o})}}isItemExpandible(o){return this.slotsNames.includes(o)}isItemSelected(o){return this.selectedItems.includes(o)}renderItems(){const o=[];const i=Array.prototype.slice.call(this.rootElement.children,0);this.slotsNames=[];for(let o=0;o<i.length;o++){const t=i[o];this.slotsNames.push(t.slot)}for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const r=t.name;const a=this.isItemSelected(r);const n=this.isItemExpandible(r);const c={"accordion-item__header":true,"accordion-item__header--selected":!n&&a?true:false,"accordion-item__header--expanded":n&&a?true:false,"mdc-ripple-surface":this.ripple?true:false,[`accordion-item--${this.sizing}`]:this.sizing?true:false};const p={"accordion-item__content":true,"accordion-item__content--selected":a?true:false};o.push(e("div",{class:"accordion-item"},e("div",{tabindex:"1",title:t.title,class:c,onClick:()=>this.toggleItem(r)},t.icon?e(h,{color:`var(${s.ICON})`,resource:t.icon,sizeX:"1.5em",sizeY:"1.5em",wrapperClass:"accordion-item__icon"}):null,e("span",{class:"accordion-item__text"},t.title),n?e("span",{class:`accordion-item__dropdown kup-icon ${l.DROPDOWN.replace("--","")}`}):null),e("div",{class:p},e("slot",{name:t.name}))))}return o}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this)}componentDidLoad(){this.applyRipple();this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){const o=this.rootElement.shadowRoot;if(o){const i=o.querySelectorAll(".mdc-ripple-surface");if(i){for(let o=0;o<i.length;o++){f.attachTo(i[o])}}}this.kupManager.debug.logRender(this,true)}render(){const o=this.data&&this.data.columns?this.renderItems():null;return e(r,{key:"c6cc4c937b265fd4cae251d7499ea3e26d29ad14"},e("style",{key:"3f14819201f57e2823e85841405ecd0b9c829289"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"5109d2bfa23e81daad6888dd5926e037e1f3d882",id:u},e("div",{key:"713ae0a1ec95e2676c22134d733109b35d40952a",class:"accordion"},o)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}static get watchers(){return{ripple:["applyRipple"]}}};g.style=k;export{g as kup_accordion};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as o,c as i,f as t,h as e,H as r,d as a}from"./p-d7c15b0e.js";import{k as n,a as c,g as p,s as d,d as s,b as l}from"./p-54f6e4df.js";import{F as h}from"./p-2b519589.js";import{c as u}from"./p-635bb4b3.js";import{M as f}from"./p-d4a879fc.js";import"./p-029c7cbe.js";var m;(function(o){o["customStyle"]="Custom style of the component. For more information: https://smeup.github.io/ketchup/#/customization";o["data"]="Data of the accordion.";o["ripple"]="When enabled displays Material's ripple effect on item headers."})(m||(m={}));const _=".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_accordion_border_top_color:var(\n --kup-accordion-border-top-color,\n var(--kup-border-subtle)\n );--kup_accordion_item_small_height:var(\n --kup-accordion-item-small-height,\n 32px\n );--kup_accordion_item_medium_height:var(\n --kup-accordion-item-medium-height,\n 40px\n );--kup_accordion_item_outline_color_active:var(\n --kup-accordion-item-outline-color-focus,\n var(--kup-border-interactive)\n );--kup_accordion_item_large_height:var(\n --kup-accordion-item-medium-height,\n 48px\n );--kup_accordion_header_background_color:var(\n --kup-accordion-header-background-color,\n var(--kup-layer-0)\n );--kup_accordion_header_background_color_hover:var(\n --kup-accordion-header-background-color-hover,\n var(--kup-layer-0-hover)\n );--kup_accordion_header_padding:var(\n --kup-accordion-header-padding,\n var(--kup-space-05)\n );--kup_accordion_dropdown_icon_color:var(\n --kup-accordio-dropdown-icon-color,\n var(--kup-text-primary)\n );--kup_accordion_transition:var(--kup-accordion-transition, 80ms);display:block;font-family:var(--kup_accordion_font_family);font-size:var(--kup_accordion_font_size)}.accordion{border-radius:var(--kup_accordion_border_radius);display:flex;flex-wrap:wrap;flex-direction:column;width:100%}.accordion-item{border-top:1px solid var(--kup_accordion_border_top_color);box-sizing:border-box;width:100%}.accordion-item--visible{display:block}.accordion-item:is(:last-of-type){border-bottom:1px solid var(--kup_accordion_border_top_color)}.accordion-item__header{height:var(--kup_accordion_item_medium_height);align-items:center;border:none;box-sizing:border-box;color:var(--kup_accordion_text_color);cursor:pointer;display:flex;line-height:1.75em;outline:none;padding:var(--kup_accordion_padding);text-align:left;transition:background-color var(--kup_accordion_transition), color var(--kup_accordion_transition);width:100%;outline:2px solid transparent;outline-offset:-2px;padding-left:16px;padding-right:16px}.accordion-item__header:focus{outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header.accordion-item--small{height:var(--kup_accordion_item_small_height)}.accordion-item__header.accordion-item--large{height:var(--kup_accordion_item_large_height)}.accordion-item__header:hover:not(.accordion-item__header--selected){background-color:var(--kup_accordion_header_background_color_hover)}.accordion-item__header:focus(.accordion-item__header--selected){outline:2px solid var(--kup_accordion_item_outline_color_active)}.accordion-item__header--expanded{background-color:var(--kup_accordion_background_color)}.accordion-item__header--expanded .accordion-item__dropdown{transform:rotate(-180deg)}.accordion-item__text{margin-right:0.5em;overflow:hidden;text-overflow:ellipsis;white-space:pre}.accordion-item__text--highlighted{color:var(--kup_accordion_text_on_primary_color);background-color:var(--kup_accordion_primary_color)}.accordion-item__icon{margin-left:0;margin-right:0.5em}.accordion-item__dropdown{background-color:var(--kup_accordion_dropdown_icon_color);height:1.5em;margin-left:auto;margin-right:0;min-width:1.5em;width:1.5em;transition:transform var(--kup_accordion_transition)}.accordion-item__content{padding-left:16px;padding-top:8px;padding-bottom:24px;padding-right:80px;animation:fade-in 0.25s ease-out;display:none;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}.accordion-item__content--selected{display:block}.mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.mdc-ripple-surface:before,.mdc-ripple-surface:after{background-color:var(--kup_accordion_primary_color)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}:host(.kup-borderless){--kup-accordion-border:none}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-danger){--kup-accordion-primary-color:var(--kup-danger-color-60);--kup-accordion-primary-color-rgb:var(--kup-danger-color-60-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-info){--kup-accordion-primary-color:var(--kup-info-50-color);--kup-accordion-primary-color-rgb:var(--kup-info-color-50-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-secondary){--kup-accordion-primary-color:var(--kup-secondary-color);--kup-accordion-primary-color-rgb:var(--kup-secondary-color-rgb);--kup-accordion-text-on-primary-color:var(--kup-text-on-secondary-color)}:host(.kup-success){--kup-accordion-primary-color:var(--kup-success-color-40);--kup-accordion-primary-color-rgb:var(--kup-success-color-40-rgb);--kup-accordion-text-on-primary-color:white}:host(.kup-warning){--kup-accordion-primary-color:var(--kup-warning-color-50);--kup-accordion-primary-color-rgb:var(--kup-warning-color-50-rgb);--kup-accordion-text-on-primary-color:white}";const k=_;const g=class{constructor(t){o(this,t);this.kupAccordionItemSelected=i(this,"kup-accordion-itemselected",6);this.kupManager=n();this.slotsNames=[];this.selectedItems=[];this.customStyle="";this.data=null;this.ripple=false;this.sizing=c.SMALL}applyRipple(){const o=this.rootElement.shadowRoot;if(o&&this.ripple){const i=o.querySelectorAll(".mdc-ripple-surface:not(.mdc-ripple-upgraded)");if(i){for(let o=0;o<i.length;o++){f.attachTo(i[o])}}}}async collapseAll(){const o=[];for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const e=t.name;if(!this.isItemExpandible(e)&&this.isItemSelected(e)){o.push(e)}}this.selectedItems=o}async expandAll(){const o=[];for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const e=t.name;if(this.isItemExpandible(e)){o.push(e)}}this.selectedItems=o}async getProps(o){return p(this,m,o)}async refresh(){t(this)}async setProps(o){d(this,m,o)}async toggleItem(o){const i=this.isItemExpandible(o);const t=[...this.selectedItems];if(t.includes(o)){t.splice(t.indexOf(o),1)}else{t.push(o)}this.selectedItems=t;if(!i){this.kupAccordionItemSelected.emit({comp:this,id:this.rootElement.id,itemName:o})}}isItemExpandible(o){return this.slotsNames.includes(o)}isItemSelected(o){return this.selectedItems.includes(o)}renderItems(){const o=[];const i=Array.prototype.slice.call(this.rootElement.children,0);this.slotsNames=[];for(let o=0;o<i.length;o++){const t=i[o];this.slotsNames.push(t.slot)}for(let i=0;i<this.data.columns.length;i++){const t=this.data.columns[i];const r=t.name;const a=this.isItemSelected(r);const n=this.isItemExpandible(r);const c={"accordion-item__header":true,"accordion-item__header--selected":!n&&a?true:false,"accordion-item__header--expanded":n&&a?true:false,"mdc-ripple-surface":this.ripple?true:false,[`accordion-item--${this.sizing}`]:this.sizing?true:false};const p={"accordion-item__content":true,"accordion-item__content--selected":a?true:false};o.push(e("div",{class:"accordion-item"},e("div",{tabindex:"1",title:t.title,class:c,onClick:()=>this.toggleItem(r)},t.icon?e(h,{color:`var(${s.ICON})`,resource:t.icon,sizeX:"1.5em",sizeY:"1.5em",wrapperClass:"accordion-item__icon"}):null,e("span",{class:"accordion-item__text"},t.title),n?e("span",{class:`accordion-item__dropdown kup-icon ${l.DROPDOWN.replace("--","")}`}):null),e("div",{class:p},e("slot",{name:t.name}))))}return o}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this)}componentDidLoad(){this.applyRipple();this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){const o=this.rootElement.shadowRoot;if(o){const i=o.querySelectorAll(".mdc-ripple-surface");if(i){for(let o=0;o<i.length;o++){f.attachTo(i[o])}}}this.kupManager.debug.logRender(this,true)}render(){const o=this.data&&this.data.columns?this.renderItems():null;return e(r,{key:"c6cc4c937b265fd4cae251d7499ea3e26d29ad14"},e("style",{key:"3f14819201f57e2823e85841405ecd0b9c829289"},this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{key:"5109d2bfa23e81daad6888dd5926e037e1f3d882",id:u},e("div",{key:"713ae0a1ec95e2676c22134d733109b35d40952a",class:"accordion"},o)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}static get watchers(){return{ripple:["applyRipple"]}}};g.style=k;export{g as kup_accordion};
|
|
2
|
+
//# sourceMappingURL=p-8a7e8043.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as i,c as t,f as e,h as a,H as s,d as o}from"./p-d7c15b0e.js";import{k as n,g as l,s as r,h as p,N as c,f as m}from"./p-f1ccd876.js";import{c as h}from"./p-635bb4b3.js";import{F as f}from"./p-2b519589.js";import{F as g}from"./p-10dfd311.js";import{a as u}from"./p-e3062c19.js";import{F as d}from"./p-7142f2cb.js";import{M as _}from"./p-d4a879fc.js";import"./p-029c7cbe.js";import"./p-5d03c077.js";import"./p-a61546b9.js";import"./p-41373d28.js";var k;(function(i){i["columns"]="Can set a specific number of columns";i["customStyle"]="Custom style of the component.";i["data"]="Actual data of the component";i["ripple"]="When enabled displays Material's ripple effect on clicked items.";i["rows"]="Cam set a specific number of rows. It overwrite the columns flow into rows flow";i["showFullDescription"]="When enabled, image descriptions will always be displayed entirely and not cut or truncated."})(k||(k={}));class v{constructor(){this.load=false}toDebugString(){return"image-list state"}}const b=".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_imagelist_columns_mobile:var(--kup-imagelist-columns-mobile, 4);--kup_imagelist_columns_tablet:var(--kup-imagelist-columns-tablet, 6);--kup_imagelist_columns_desktop:var(--kup-imagelist-columns-desktop, 8);--kup_imagelist_background_color:var(\n --kup-imagelist-background-color,\n transparent\n );--kup_imagelist_columns:var(--kup-imagelist-columns, 4);--kup_imagelist_grid_gap:var(--kup-imagelist-grid-gap, var(--kup-space-03));--kup_imagelist_image_min_height:var(\n --kup-imagelist-image-min-height,\n var(--kup-space-09)\n );--kup_imagelist_item_border_radius:var(\n --kup-imagelist-item-border-radius,\n var(--kup-radius-00)\n );--kup_imagelist_item_height:var(--kup-imagelist-item-height, auto);--kup_imagelist_item_padding:var(--kup-imagelist-item-padding, 0);--kup_imagelist_item_width:var(--kup-imagelist-item-width, auto);--kup_imagelist_label_margin:var(\n --kup-imagelist-label-margin,\n 0 auto 1em auto\n );--kup_imagelist_navbar_background_color:var(\n --kup-imagelist-navbar-background-color,\n transparent\n );--kup_imagelist_primary_color:var(\n --kup-imagelist-primary-color,\n var(--kup-primary-color)\n );--kup_imagelist_primary_color_rgb:var(\n --kup-imagelist-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_imagelist_text_color:var(\n --kup-imagelist-text-color,\n var(--kup-text-secondary)\n );--kup_imagelist_item_background_color:var(\n --kup-imagelist-item-background-color,\n var(--kup-layer-1)\n );--kup_imagelist_item_background_color_hover:var(\n --kup-imagelist-item-background-color-hover,\n var(--kup-layer-1-hover)\n );display:block}.navigation-bar{align-items:center;background-color:var(--kup_imagelist_navbar_background_color);display:flex;justify-content:center}.navigation-bar__wrapper{align-items:center;display:flex;flex-wrap:wrap;justify-content:center;max-width:100%;position:relative}.navigation-bar__wrapper--active .navigation-bar__title{background-color:rgba(var(--kup_imagelist_primary_color_rgb), 0.15);color:var(--kup_imagelist_primary_color)}.navigation-bar__back,.navigation-bar__top{--kup-button-primary-color-rgb:0}.navigation-bar__title{border-radius:16px;box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;padding:0.75em 1em;user-select:none;transition:background-color 125ms, color 125ms;width:100%}.navigation-bar__title__image.f-image{margin:0}.navigation-bar__title__label{overflow:hidden;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap;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}.image-list{background-color:var(--kup_imagelist_background_color);display:grid;grid-gap:var(--kup_imagelist_grid_gap);grid-template-columns:repeat(var(--kup-imagelist-columns-mobile, var(--kup_imagelist_columns_mobile)), minmax(0px, 1fr));margin-top:1em;width:100%;grid-auto-flow:row}.image-list.full-description .f-cell .f-cell__content .image-list__wrapper .f-image.image-list__image{display:flow-root}.image-list.full-description .image-list__label{overflow:unset;text-align:center;text-overflow:unset;white-space:normal;overflow-wrap:break-word}.image-list .f-cell{height:100%;width:100%}.image-list .f-cell .f-cell__content{height:100%}.image-list .f-cell .f-cell__content .image-list__wrapper{display:flex;flex-direction:column;justify-content:space-between;box-sizing:border-box;position:relative;height:100%}.image-list .f-cell .f-cell__content .image-list__wrapper.images{height:100%;justify-content:flex-end}.image-list .f-cell .f-cell__content .image-list__wrapper.images .f-image{position:unset;overflow:auto;height:100%;display:flex}.image-list__item{background-color:var(--kup_imagelist_item_background_color);border-radius:var(--kup_imagelist_item_border_radius);cursor:pointer;height:var(--kup_imagelist_item_height);padding:var(--kup_imagelist_item_padding);width:var(--kup_imagelist_item_width)}.image-list__item:hover{background-color:var(--kup_imagelist_item_background_color_hover)}.image-list__image.f-image{position:absolute;padding:var(--kup-space-03);padding-bottom:0px;box-sizing:border-box;width:100%;height:calc(100% - 16px - var(--kup-space-03) * 2);overflow:hidden}.image-list__image.f-image .f-image__icon{mask-size:100% !important}.image-list__label{overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;padding:var(--kup-space-03);font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}@media screen and (min-width: 678px){.image-list{grid-template-columns:repeat(var(--kup-imagelist-columns-tablet, var(--kup_imagelist_columns_tablet)), minmax(0px, 1fr));grid-gap:var(--kup-space-05)}}@media screen and (min-width: 1024px){.image-list{grid-template-columns:repeat(var(--kup-imagelist-columns-desktop, var(--kup_imagelist_columns_desktop)), minmax(0px, 1fr));grid-gap:var(--kup-space-05)}}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-horizontal) .image-list{display:flex}:host(.kup-auto-grid) .image-list{display:flex;flex-wrap:wrap;justify-content:center}";const w=b;var y=undefined&&undefined.__classPrivateFieldGet||function(i,t,e,a){if(e==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?i!==t||!a:!t.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?a:e==="a"?a.call(i):a?a.value:t.get(i)};var x=undefined&&undefined.__classPrivateFieldSet||function(i,t,e,a,s){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?i!==t||!s:!t.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?s.call(i,e):s?s.value=e:t.set(i,e),e};var j,z,C,W,$,M,E,O,T,P,D,I,N,R,S;const F=class{constructor(e){i(this,e);this.kupClick=t(this,"kup-imagelist-click",6);this.kupContextMenu=t(this,"kup-imagelist-contextmenu",6);this.kupDblClick=t(this,"kup-imagelist-dblclick",6);j.add(this);this.state=new v;z.set(this,[]);C.set(this,n());W.set(this,{icon:"arrow_back",onClick:()=>{this.currentNode=y(this,C,"f").data.node.getParent(this.data,this.currentNode);if(!this.currentNode){this.navigationBarToggled=false}},styling:u.FLAT,wrapperClass:"navigation-bar__back"});$.set(this,{icon:"arrow_upward",onClick:()=>{this.currentNode=null;this.navigationBarToggled=false},styling:u.FLAT,wrapperClass:"navigation-bar__top"});M.set(this,void 0);E.set(this,false);O.set(this,[]);this.currentNode=null;this.navigationBarToggled=false;this.columns=[];this.customStyle="";this.data=[];this.ripple=false;this.rows=null;this.selectedNode=[];this.stateId="";this.store=undefined;this.showFullDescription=false}initWithPersistedState(){if(this.store&&this.stateId){const i=this.store.getState(this.stateId);if(i!=null){this.currentNode=y(this,C,"f").data.node.findByStrTreeNodePath(this.data,i.selectedTreeNodePath)}}}persistState(){if(this.store&&this.stateId){let i=false;let t=this.currentNode?this.currentNode.id:"";if(!y(this,C,"f").objects.deepEqual(this.state.selectedTreeNodePath,t)){this.state.selectedTreeNodePath=t;i=true}if(!this.state.load){this.state.load=true;return}if(i){this.store.persistState(this.stateId,this.state)}}}selectNode(i){if(!i||i.length==0){return}this.currentNode=y(this,C,"f").data.node.find(this.data,i)}async getProps(i){return l(this,k,i)}async refresh(){e(this)}async setProps(i){r(this,k,i)}componentWillLoad(){y(this,C,"f").debug.logLoad(this,false);y(this,C,"f").language.register(this);y(this,C,"f").theme.register(this)}componentDidLoad(){y(this,j,"m",S).call(this);y(this,C,"f").debug.logLoad(this,true)}componentWillRender(){y(this,C,"f").debug.logRender(this,false)}componentDidRender(){const i=this.rootElement.shadowRoot;if(i&&this.ripple){const t=i.querySelectorAll(".mdc-ripple-surface:not(.mdc-ripple-upgraded)");if(t){for(let i=0;i<t.length;i++){_.attachTo(t[i])}}}this.persistState();y(this,C,"f").debug.logRender(this,true)}render(){const i=!!this.currentNode;let t={};if(this.columns){if(this.columns.length===1){t={"--kup-imagelist-columns-mobile":`${this.columns[0]}`,"--kup-imagelist-columns-tablet":`${this.columns[0]}`,"--kup-imagelist-columns-desktop":`${this.columns[0]}`}}else if(this.columns.length===2){t={"--kup-imagelist-columns-mobile":`${this.columns[0]}`,"--kup-imagelist-columns-tablet":`${this.columns[0]}`,"--kup-imagelist-columns-desktop":`${this.columns[1]}`}}else if(this.columns.length===3){t={"--kup-imagelist-columns-mobile":`${this.columns[0]}`,"--kup-imagelist-columns-tablet":`${this.columns[1]}`,"--kup-imagelist-columns-desktop":`${this.columns[2]}`}}}let e=Object.assign({},t);if(this.rows!=null&&this.rows>0){const i={"grid-template-rows":`repeat(${this.rows}, minmax(0px, 1fr))`,"grid-auto-flow":`column`};e=Object.assign(Object.assign({},e),i)}const o="image-list"+(this.showFullDescription?" full-description":"");return a(s,{key:"aaefac38b6fc8edb0a3378edce114b31dcd4c982"},a("style",{key:"80541c8e96c4949ae9d3635342458ed4636aa4f3"},y(this,C,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"e21da53853b397147fae86eb46c4ec73ab1918c8",id:h,ref:i=>{x(this,M,i,"f")}},a("div",{key:"2ea71db6523c5ed84e6e04bc36844199208ae69f",class:"navigation-bar"},i?a("div",{class:`navigation-bar__wrapper ${this.navigationBarToggled?"navigation-bar__wrapper--active":""}`},a("div",{class:`navigation-bar__title`,onClick:()=>{this.navigationBarToggled=!this.navigationBarToggled}},a(f,{fit:true,resource:this.currentNode.icon,placeholderResource:this.currentNode.placeholderIcon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"navigation-bar__title__image"}),a("div",{class:"navigation-bar__title__label"},this.currentNode.value)),a(g,Object.assign({},y(this,W,"f"),{label:y(this,C,"f").language.translate(p.BACK)})),a(g,Object.assign({},y(this,$,"f"),{label:y(this,C,"f").language.translate(p.TOP)}))):null),a("div",{key:"cca51c44ab0f8eb8a3010d070ef2c39ce4eea04b",class:o,style:e},...y(this,j,"m",P).call(this))))}disconnectedCallback(){y(this,C,"f").interact.unregister(y(this,O,"f"));y(this,C,"f").language.unregister(this);y(this,C,"f").theme.unregister(this)}get rootElement(){return o(this)}static get watchers(){return{selectedNode:["selectNode"]}}};z=new WeakMap,C=new WeakMap,W=new WeakMap,$=new WeakMap,M=new WeakMap,E=new WeakMap,O=new WeakMap,j=new WeakSet,T=function i(t){const e={fit:true,resource:t.icon,placeholderResource:t.placeholderIcon,title:t.title,wrapperClass:"image-list__image",badgeData:t.badgeData};const s=a(f,Object.assign({},e));const o=a("div",{class:"image-list__label"},t.value);const n=e.resource.indexOf(".")>-1||e.resource.indexOf("/")>-1||e.resource.indexOf("\\")>-1;return a(d,{cell:{value:t.value,icon:t.icon,placeholderIcon:t.placeholderIcon,obj:t.obj},column:{name:"IMAGE",title:"Image"},component:this,density:m.NONE,row:Object.assign({},t)},a("div",{class:`image-list__wrapper${n?" images":""}`},!n&&a("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 24 24"}),s,o))},P=function i(){const t=[];const e=this.currentNode?this.currentNode.children:this.data;for(let i=0;e&&i<e.length;i++){const s=e[i];const o={"image-list__item":true,"mdc-ripple-surface":this.ripple?true:false};const n=a("div",{onContextMenu:i=>{i.preventDefault()},class:o},y(this,j,"m",T).call(this,s));t.push(n)}return t},D=function i(t,e){let a;if(t){for(let i=t.length-1;i>=0;i--){let e=t[i];if(!e.tagName){continue}if(e.classList.contains("f-cell")){a=e["kup-get-cell-props"]()}}}return{cell:a===null||a===void 0?void 0:a.cell,column:a===null||a===void 0?void 0:a.column,originalEvent:e,row:a===null||a===void 0?void 0:a.row}},I=function i(t){const e=y(this,j,"m",D).call(this,y(this,C,"f").getEventPath(t.target,this.rootElement),t);return e},N=function i(t){const e=y(this,j,"m",D).call(this,y(this,C,"f").getEventPath(t.target,this.rootElement),t);return e},R=function i(t){const e=y(this,j,"m",D).call(this,y(this,C,"f").getEventPath(t.target,this.rootElement),t);return e},S=function i(){y(this,O,"f").push(y(this,M,"f"));const t=i=>{if(y(this,E,"f")){x(this,E,false,"f");return}switch(i.button){case 0:const t={};for(const e in i){t[e]=i[e]}y(this,z,"f").push(setTimeout((()=>{var i;const e=y(this,j,"m",I).call(this,t);const a=e.row;if(((i=a===null||a===void 0?void 0:a.children)===null||i===void 0?void 0:i.length)>0){this.currentNode=a}this.kupClick.emit({comp:this,id:this.rootElement.id,details:e})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:y(this,j,"m",N).call(this,i)});break}};const e=i=>{switch(i.button){case 0:for(let i=0;i<y(this,z,"f").length;i++){clearTimeout(y(this,z,"f")[i]);y(this,C,"f").debug.logMessage(this,"Cleared clickHandler timeout("+y(this,z,"f")[i]+").")}x(this,z,[],"f");this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:y(this,j,"m",R).call(this,i)});break}};const a=i=>{if(i.pointerType==="pen"||i.pointerType==="touch"){x(this,E,true,"f");this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:y(this,j,"m",N).call(this,i)})}};y(this,C,"f").interact.on(y(this,M,"f"),c.HOLD,a);y(this,C,"f").interact.on(y(this,M,"f"),c.TAP,t);y(this,C,"f").interact.on(y(this,M,"f"),c.DOUBLETAP,e)};F.style=w;export{F as kup_image_list};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as i,c as t,f as e,h as a,H as s,d as o}from"./p-d7c15b0e.js";import{k as n,g as l,s as r,h as p,N as c,f as m}from"./p-54f6e4df.js";import{c as h}from"./p-635bb4b3.js";import{F as f}from"./p-2b519589.js";import{F as g}from"./p-10dfd311.js";import{a as u}from"./p-e3062c19.js";import{F as d}from"./p-6b225612.js";import{M as _}from"./p-d4a879fc.js";import"./p-029c7cbe.js";import"./p-5d03c077.js";import"./p-2acd1e25.js";import"./p-0facfbaf.js";var k;(function(i){i["columns"]="Can set a specific number of columns";i["customStyle"]="Custom style of the component.";i["data"]="Actual data of the component";i["ripple"]="When enabled displays Material's ripple effect on clicked items.";i["rows"]="Cam set a specific number of rows. It overwrite the columns flow into rows flow";i["showFullDescription"]="When enabled, image descriptions will always be displayed entirely and not cut or truncated."})(k||(k={}));class v{constructor(){this.load=false}toDebugString(){return"image-list state"}}const b=".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_imagelist_columns_mobile:var(--kup-imagelist-columns-mobile, 4);--kup_imagelist_columns_tablet:var(--kup-imagelist-columns-tablet, 6);--kup_imagelist_columns_desktop:var(--kup-imagelist-columns-desktop, 8);--kup_imagelist_background_color:var(\n --kup-imagelist-background-color,\n transparent\n );--kup_imagelist_columns:var(--kup-imagelist-columns, 4);--kup_imagelist_grid_gap:var(--kup-imagelist-grid-gap, var(--kup-space-03));--kup_imagelist_image_min_height:var(\n --kup-imagelist-image-min-height,\n var(--kup-space-09)\n );--kup_imagelist_item_border_radius:var(\n --kup-imagelist-item-border-radius,\n var(--kup-radius-00)\n );--kup_imagelist_item_height:var(--kup-imagelist-item-height, auto);--kup_imagelist_item_padding:var(--kup-imagelist-item-padding, 0);--kup_imagelist_item_width:var(--kup-imagelist-item-width, auto);--kup_imagelist_label_margin:var(\n --kup-imagelist-label-margin,\n 0 auto 1em auto\n );--kup_imagelist_navbar_background_color:var(\n --kup-imagelist-navbar-background-color,\n transparent\n );--kup_imagelist_primary_color:var(\n --kup-imagelist-primary-color,\n var(--kup-primary-color)\n );--kup_imagelist_primary_color_rgb:var(\n --kup-imagelist-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_imagelist_text_color:var(\n --kup-imagelist-text-color,\n var(--kup-text-secondary)\n );--kup_imagelist_item_background_color:var(\n --kup-imagelist-item-background-color,\n var(--kup-layer-1)\n );--kup_imagelist_item_background_color_hover:var(\n --kup-imagelist-item-background-color-hover,\n var(--kup-layer-1-hover)\n );display:block}.navigation-bar{align-items:center;background-color:var(--kup_imagelist_navbar_background_color);display:flex;justify-content:center}.navigation-bar__wrapper{align-items:center;display:flex;flex-wrap:wrap;justify-content:center;max-width:100%;position:relative}.navigation-bar__wrapper--active .navigation-bar__title{background-color:rgba(var(--kup_imagelist_primary_color_rgb), 0.15);color:var(--kup_imagelist_primary_color)}.navigation-bar__back,.navigation-bar__top{--kup-button-primary-color-rgb:0}.navigation-bar__title{border-radius:16px;box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;padding:0.75em 1em;user-select:none;transition:background-color 125ms, color 125ms;width:100%}.navigation-bar__title__image.f-image{margin:0}.navigation-bar__title__label{overflow:hidden;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap;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}.image-list{background-color:var(--kup_imagelist_background_color);display:grid;grid-gap:var(--kup_imagelist_grid_gap);grid-template-columns:repeat(var(--kup-imagelist-columns-mobile, var(--kup_imagelist_columns_mobile)), minmax(0px, 1fr));margin-top:1em;width:100%;grid-auto-flow:row}.image-list.full-description .f-cell .f-cell__content .image-list__wrapper .f-image.image-list__image{display:flow-root}.image-list.full-description .image-list__label{overflow:unset;text-align:center;text-overflow:unset;white-space:normal;overflow-wrap:break-word}.image-list .f-cell{height:100%;width:100%}.image-list .f-cell .f-cell__content{height:100%}.image-list .f-cell .f-cell__content .image-list__wrapper{display:flex;flex-direction:column;justify-content:space-between;box-sizing:border-box;position:relative;height:100%}.image-list .f-cell .f-cell__content .image-list__wrapper.images{height:100%;justify-content:flex-end}.image-list .f-cell .f-cell__content .image-list__wrapper.images .f-image{position:unset;overflow:auto;height:100%;display:flex}.image-list__item{background-color:var(--kup_imagelist_item_background_color);border-radius:var(--kup_imagelist_item_border_radius);cursor:pointer;height:var(--kup_imagelist_item_height);padding:var(--kup_imagelist_item_padding);width:var(--kup_imagelist_item_width)}.image-list__item:hover{background-color:var(--kup_imagelist_item_background_color_hover)}.image-list__image.f-image{position:absolute;padding:var(--kup-space-03);padding-bottom:0px;box-sizing:border-box;width:100%;height:calc(100% - 16px - var(--kup-space-03) * 2);overflow:hidden}.image-list__image.f-image .f-image__icon{mask-size:100% !important}.image-list__label{overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;padding:var(--kup-space-03);font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}@media screen and (min-width: 678px){.image-list{grid-template-columns:repeat(var(--kup-imagelist-columns-tablet, var(--kup_imagelist_columns_tablet)), minmax(0px, 1fr));grid-gap:var(--kup-space-05)}}@media screen and (min-width: 1024px){.image-list{grid-template-columns:repeat(var(--kup-imagelist-columns-desktop, var(--kup_imagelist_columns_desktop)), minmax(0px, 1fr));grid-gap:var(--kup-space-05)}}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-horizontal) .image-list{display:flex}:host(.kup-auto-grid) .image-list{display:flex;flex-wrap:wrap;justify-content:center}";const w=b;var y=undefined&&undefined.__classPrivateFieldGet||function(i,t,e,a){if(e==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?i!==t||!a:!t.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?a:e==="a"?a.call(i):a?a.value:t.get(i)};var x=undefined&&undefined.__classPrivateFieldSet||function(i,t,e,a,s){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?i!==t||!s:!t.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?s.call(i,e):s?s.value=e:t.set(i,e),e};var j,z,C,W,$,M,E,O,T,P,D,I,N,R,S;const F=class{constructor(e){i(this,e);this.kupClick=t(this,"kup-imagelist-click",6);this.kupContextMenu=t(this,"kup-imagelist-contextmenu",6);this.kupDblClick=t(this,"kup-imagelist-dblclick",6);j.add(this);this.state=new v;z.set(this,[]);C.set(this,n());W.set(this,{icon:"arrow_back",onClick:()=>{this.currentNode=y(this,C,"f").data.node.getParent(this.data,this.currentNode);if(!this.currentNode){this.navigationBarToggled=false}},styling:u.FLAT,wrapperClass:"navigation-bar__back"});$.set(this,{icon:"arrow_upward",onClick:()=>{this.currentNode=null;this.navigationBarToggled=false},styling:u.FLAT,wrapperClass:"navigation-bar__top"});M.set(this,void 0);E.set(this,false);O.set(this,[]);this.currentNode=null;this.navigationBarToggled=false;this.columns=[];this.customStyle="";this.data=[];this.ripple=false;this.rows=null;this.selectedNode=[];this.stateId="";this.store=undefined;this.showFullDescription=false}initWithPersistedState(){if(this.store&&this.stateId){const i=this.store.getState(this.stateId);if(i!=null){this.currentNode=y(this,C,"f").data.node.findByStrTreeNodePath(this.data,i.selectedTreeNodePath)}}}persistState(){if(this.store&&this.stateId){let i=false;let t=this.currentNode?this.currentNode.id:"";if(!y(this,C,"f").objects.deepEqual(this.state.selectedTreeNodePath,t)){this.state.selectedTreeNodePath=t;i=true}if(!this.state.load){this.state.load=true;return}if(i){this.store.persistState(this.stateId,this.state)}}}selectNode(i){if(!i||i.length==0){return}this.currentNode=y(this,C,"f").data.node.find(this.data,i)}async getProps(i){return l(this,k,i)}async refresh(){e(this)}async setProps(i){r(this,k,i)}componentWillLoad(){y(this,C,"f").debug.logLoad(this,false);y(this,C,"f").language.register(this);y(this,C,"f").theme.register(this)}componentDidLoad(){y(this,j,"m",S).call(this);y(this,C,"f").debug.logLoad(this,true)}componentWillRender(){y(this,C,"f").debug.logRender(this,false)}componentDidRender(){const i=this.rootElement.shadowRoot;if(i&&this.ripple){const t=i.querySelectorAll(".mdc-ripple-surface:not(.mdc-ripple-upgraded)");if(t){for(let i=0;i<t.length;i++){_.attachTo(t[i])}}}this.persistState();y(this,C,"f").debug.logRender(this,true)}render(){const i=!!this.currentNode;let t={};if(this.columns){if(this.columns.length===1){t={"--kup-imagelist-columns-mobile":`${this.columns[0]}`,"--kup-imagelist-columns-tablet":`${this.columns[0]}`,"--kup-imagelist-columns-desktop":`${this.columns[0]}`}}else if(this.columns.length===2){t={"--kup-imagelist-columns-mobile":`${this.columns[0]}`,"--kup-imagelist-columns-tablet":`${this.columns[0]}`,"--kup-imagelist-columns-desktop":`${this.columns[1]}`}}else if(this.columns.length===3){t={"--kup-imagelist-columns-mobile":`${this.columns[0]}`,"--kup-imagelist-columns-tablet":`${this.columns[1]}`,"--kup-imagelist-columns-desktop":`${this.columns[2]}`}}}let e=Object.assign({},t);if(this.rows!=null&&this.rows>0){const i={"grid-template-rows":`repeat(${this.rows}, minmax(0px, 1fr))`,"grid-auto-flow":`column`};e=Object.assign(Object.assign({},e),i)}const o="image-list"+(this.showFullDescription?" full-description":"");return a(s,{key:"aaefac38b6fc8edb0a3378edce114b31dcd4c982"},a("style",{key:"80541c8e96c4949ae9d3635342458ed4636aa4f3"},y(this,C,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"e21da53853b397147fae86eb46c4ec73ab1918c8",id:h,ref:i=>{x(this,M,i,"f")}},a("div",{key:"2ea71db6523c5ed84e6e04bc36844199208ae69f",class:"navigation-bar"},i?a("div",{class:`navigation-bar__wrapper ${this.navigationBarToggled?"navigation-bar__wrapper--active":""}`},a("div",{class:`navigation-bar__title`,onClick:()=>{this.navigationBarToggled=!this.navigationBarToggled}},a(f,{fit:true,resource:this.currentNode.icon,placeholderResource:this.currentNode.placeholderIcon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"navigation-bar__title__image"}),a("div",{class:"navigation-bar__title__label"},this.currentNode.value)),a(g,Object.assign({},y(this,W,"f"),{label:y(this,C,"f").language.translate(p.BACK)})),a(g,Object.assign({},y(this,$,"f"),{label:y(this,C,"f").language.translate(p.TOP)}))):null),a("div",{key:"cca51c44ab0f8eb8a3010d070ef2c39ce4eea04b",class:o,style:e},...y(this,j,"m",P).call(this))))}disconnectedCallback(){y(this,C,"f").interact.unregister(y(this,O,"f"));y(this,C,"f").language.unregister(this);y(this,C,"f").theme.unregister(this)}get rootElement(){return o(this)}static get watchers(){return{selectedNode:["selectNode"]}}};z=new WeakMap,C=new WeakMap,W=new WeakMap,$=new WeakMap,M=new WeakMap,E=new WeakMap,O=new WeakMap,j=new WeakSet,T=function i(t){const e={fit:true,resource:t.icon,placeholderResource:t.placeholderIcon,title:t.title,wrapperClass:"image-list__image",badgeData:t.badgeData};const s=a(f,Object.assign({},e));const o=a("div",{class:"image-list__label"},t.value);const n=e.resource.indexOf(".")>-1||e.resource.indexOf("/")>-1||e.resource.indexOf("\\")>-1;return a(d,{cell:{value:t.value,icon:t.icon,placeholderIcon:t.placeholderIcon,obj:t.obj},column:{name:"IMAGE",title:"Image"},component:this,density:m.NONE,row:Object.assign({},t)},a("div",{class:`image-list__wrapper${n?" images":""}`},!n&&a("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 24 24"}),s,o))},P=function i(){const t=[];const e=this.currentNode?this.currentNode.children:this.data;for(let i=0;e&&i<e.length;i++){const s=e[i];const o={"image-list__item":true,"mdc-ripple-surface":this.ripple?true:false};const n=a("div",{onContextMenu:i=>{i.preventDefault()},class:o},y(this,j,"m",T).call(this,s));t.push(n)}return t},D=function i(t,e){let a;if(t){for(let i=t.length-1;i>=0;i--){let e=t[i];if(!e.tagName){continue}if(e.classList.contains("f-cell")){a=e["kup-get-cell-props"]()}}}return{cell:a===null||a===void 0?void 0:a.cell,column:a===null||a===void 0?void 0:a.column,originalEvent:e,row:a===null||a===void 0?void 0:a.row}},I=function i(t){const e=y(this,j,"m",D).call(this,y(this,C,"f").getEventPath(t.target,this.rootElement),t);return e},N=function i(t){const e=y(this,j,"m",D).call(this,y(this,C,"f").getEventPath(t.target,this.rootElement),t);return e},R=function i(t){const e=y(this,j,"m",D).call(this,y(this,C,"f").getEventPath(t.target,this.rootElement),t);return e},S=function i(){y(this,O,"f").push(y(this,M,"f"));const t=i=>{if(y(this,E,"f")){x(this,E,false,"f");return}switch(i.button){case 0:const t={};for(const e in i){t[e]=i[e]}y(this,z,"f").push(setTimeout((()=>{var i;const e=y(this,j,"m",I).call(this,t);const a=e.row;if(((i=a===null||a===void 0?void 0:a.children)===null||i===void 0?void 0:i.length)>0){this.currentNode=a}this.kupClick.emit({comp:this,id:this.rootElement.id,details:e})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:y(this,j,"m",N).call(this,i)});break}};const e=i=>{switch(i.button){case 0:for(let i=0;i<y(this,z,"f").length;i++){clearTimeout(y(this,z,"f")[i]);y(this,C,"f").debug.logMessage(this,"Cleared clickHandler timeout("+y(this,z,"f")[i]+").")}x(this,z,[],"f");this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:y(this,j,"m",R).call(this,i)});break}};const a=i=>{if(i.pointerType==="pen"||i.pointerType==="touch"){x(this,E,true,"f");this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:y(this,j,"m",N).call(this,i)})}};y(this,C,"f").interact.on(y(this,M,"f"),c.HOLD,a);y(this,C,"f").interact.on(y(this,M,"f"),c.TAP,t);y(this,C,"f").interact.on(y(this,M,"f"),c.DOUBLETAP,e)};F.style=w;export{F as kup_image_list};
|
|
2
|
+
//# sourceMappingURL=p-9bae40e3.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as r,f as e,h as o,H as a,d as i}from"./p-d7c15b0e.js";import{k as n,g as p,s}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as r,f as e,h as o,H as a,d as i}from"./p-d7c15b0e.js";import{k as n,g as p,s}from"./p-54f6e4df.js";import{c as l}from"./p-635bb4b3.js";import"./p-029c7cbe.js";const d="drawer";var c;(function(t){t["customStyle"]="Custom style of the component.";t["opened"]="Defaults at false. When set to true, the drawer appears."})(c||(c={}));const h=".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_drawer_backdrop:var(--kup-drawer-backdrop, rgba(0, 0, 0, 0.32));--kup_drawer_box_shadow:var(\n --kup-drawer-box-shadow,\n 0 8px 10px -5px rgba(0, 0, 0, 0.2),\n 0 16px 24px 2px rgba(0, 0, 0, 0.14),\n 0 6px 30px 5px rgba(0, 0, 0, 0.12)\n );--kup_drawer_slotted_color:var(\n --kup-drawer-slotted-color,\n var(--kup-text-secondary)\n );--kup_drawer_background_color:var(\n --kup-drawer-background-color,\n var(--kup-layer-1)\n );--kup_drawer_permanent_border:var(\n --kup-drawer-permanent-border,\n 1px solid var(--kup-border-subtle)\n );--kup_drawer_slide_transition:var(--kup-drawer-slide-transition, 300ms);--kup_drawer_transition:var(--kup-drawer-transition, 250ms);box-shadow:var(--kup_drawer_box_shadow);display:block;height:100vh;left:calc(var(--kup-drawer-width) * -1);position:fixed;top:0;transition:left var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1), right var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1);width:var(--kup-drawer-width);z-index:var(--kup-drawer-zindex)}#kup-component{height:100%;width:100%}.backdrop{background:var(--kup_drawer_backdrop);display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:var(--kup-drawer-zindex)}.drawer{height:100%;position:fixed;width:var(--kup-drawer-width);z-index:calc(var(--kup-drawer-zindex) + 1)}.drawer__content{background-color:var(--kup_drawer_background_color);box-sizing:border-box;height:100%;overflow-y:auto;width:100%}.drawer ::slotted(*){--kup-button-primary-color:var(--kup_drawer_slotted_color);--kup-button-primary-color-rgb:var(--kup_drawer_slotted_color-rgb);--kup-button-primary-color-h:var(--kup_drawer_slotted_color-h);--kup-button-primary-color-s:var(--kup_drawer_slotted_color-s);--kup-button-primary-color-l:var(--kup_drawer_slotted_color-l);--kup-switch-label-color:var(--kup_drawer_slotted_color);--kup-switch-primary-color:var(--kup_drawer_slotted_color);--kup-switch-primary-color-rgb:var(--kup_drawer_slotted_color-rgb);--kup-textfield-color:var(--kup_drawer_slotted_color);--kup-textfield-color-rgb:var(--kup_drawer_slotted_color-rgb);--kup-textfield-primary-color:var(--kup_drawer_slotted_color);--kup-textfield-primary-color-rgb:var(--kup_drawer_slotted_color-rgb);--kup-tree-color:var(--kup_drawer_slotted_color);--kup-tree-color-rgb:var(--kup_drawer_slotted_color-rgb);--kup-tree-filter-background-color:var(--kup-drawer-background-color);--kup-tree-icon-color:var(--kup_drawer_slotted_color);color:var(--kup_drawer_slotted_color);fill:var(--kup_drawer_slotted_color)}:host([kup-opened]){left:0}:host([kup-opened]) .backdrop{display:block}:host(.kup-right){left:unset;right:-100%}:host([kup-opened].kup-right){right:0}:host(.kup-permanent){box-shadow:unset;transition:all 250ms}:host(.kup-permanent) .backdrop{display:none}:host(.kup-permanent) .drawer{position:relative}:host(.kup-permanent) .drawer__content{border-right:var(--kup_drawer_permanent_border)}";const u=h;const f=class{constructor(e){t(this,e);this.kupDrawerClose=r(this,"kup-drawer-close",6);this.kupDrawerOpen=r(this,"kup-drawer-open",6);this.kupDrawerReady=r(this,"kup-drawer-ready",6);this.kupManager=n();this.opened=false;this.customStyle=""}async close(){this.opened=false;this.kupDrawerClose.emit({comp:this,id:this.rootElement.id})}async getProps(t){return p(this,c,t)}async isOpened(){return this.opened}async open(){this.opened=true;this.kupDrawerOpen.emit({comp:this,id:this.rootElement.id})}async refresh(){e(this)}async setProps(t){s(this,c,t)}async toggle(){if(this.opened){this.close()}else{this.open()}}content(){const t=[];const r=Array.prototype.slice.call(this.rootElement.children,0);const e=[];for(let e=0;e<r.length;e++){t.push(o("slot",null))}e.push(o("div",{class:`${d}__content`},t));return e}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.theme.register(this)}componentDidLoad(){this.kupDrawerReady.emit({comp:this,id:this.rootElement.id});this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){return o(a,{key:"47b6e1195efa7ac6696505f19808aaeed8804c81","kup-opened":this.opened},o("style",{key:"2ae05ab9c05ad338fa42f7ea827139883dc370c9"},this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{key:"9574a0c126fbedb4022932c0388d96874bca3a71",class:"backdrop",onClick:t=>{t.preventDefault();t.stopPropagation()},onPointerDown:t=>{t.preventDefault();t.stopPropagation();this.close()},onTouchStart:t=>{t.preventDefault();t.stopPropagation()}}),o("div",{key:"bb38d8793e68860b78c53a82e067e5ee765db93b",id:l},o("div",{key:"fb7a2c5bc9cd9fcac56a6e7e73066995e31e78b3",class:d},this.content())))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return i(this)}};f.style=u;export{f as kup_drawer};
|
|
2
|
+
//# sourceMappingURL=p-a3ae1c57.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as i,h as t,d as e}from"./p-d7c15b0e.js";import{k as o}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as i,h as t,d as e}from"./p-d7c15b0e.js";import{k as o}from"./p-54f6e4df.js";import"./p-029c7cbe.js";const n=".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}.kup-qlik-container-fluid{width:100%}.kup-qlik-container{width:100%}@media (min-width: 576px){.kup-qlik-container{width:576px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 768px){.kup-qlik-container{width:768px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 992px){.kup-qlik-container{width:992px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 1200px){.kup-qlik-container{width:1200px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}.kup-qlik-row{display:flex;display:ms-flexbox;flex-wrap:wrap;-ms-flex-wrap:wrap;margin-bottom:5px}.kup-qlik-row .size-M{height:var(--lyo_obj-height)}.kup-qlik-row .size-S{height:calc(var(--lyo_obj-height) / 2)}.kup-qlik-row .size-XS{height:calc(var(--lyo_obj-height) / 3)}.kup-qlik-row .size-L{height:calc(var(--lyo_obj-height) * 2)}.kup-qlik-row .size-XL{height:calc(var(--lyo_obj-height) * 3)}.kup-qlik-row .bordered{border:1px solid var(--kup-border-subtle, #969696)}.kup-qlik-row .width-1{width:8.3333%}.kup-qlik-row .width-2{width:16.6666%}.kup-qlik-row .width-3{width:25%}.kup-qlik-row .width-4{width:33.3333%}.kup-qlik-row .width-5{width:41.6666%}.kup-qlik-row .width-6{width:50%}.kup-qlik-row .width-7{width:58.3333%}.kup-qlik-row .width-8{width:66.6666%}.kup-qlik-row .width-9{width:75%}.kup-qlik-row .width-10{width:83.3333%}.kup-qlik-row .width-11{width:91.6666%}.kup-qlik-row .width-12{width:100%}";const p=n;const h=class{constructor(t){i(this,t);this.kupManager=o();this.config=undefined;this.qlik=undefined;this.appid="";this.app=false;this.grid=[];this.debug=false;this.fluid=false;this.bordered=false;this.defobjsize="400px";this.divlist=[]}getObjects(i){let t;return new Promise((e=>{i.rows.forEach((i=>{i.columns.forEach((i=>{t=false;if(i.noSelections)t=i.noSelections;this.app.getObject(i.obj,i.obj,{noInteraction:false,noSelections:t})}))}));e(true)}))}doSelection(i){return new Promise((t=>{if(i.selections){i.selections.forEach((i=>{this.app.field(i.field).selectValues(i.values,false,true)}))}t(true)}))}setRender(i){return new Promise((e=>{this.divlist=[];i.rows.forEach((i=>{let e=[];i.columns.forEach((i=>{let o="qvobject ";if(this.bordered){o=o+"bordered "}o=o+"width-"+i.colDim+" size-"+i.size;if(i.obj!="")e.push(t("div",{id:i.obj,class:o}));else e.push(t("div",{class:o}))}));this.divlist.push(t("div",{class:"kup-qlik-row"},e))}));e(true)}))}componentWillLoad(){this.kupManager.debug.logLoad(this,false)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false);this.setRender(this.grid)}render(){let i=null;let e=null;if(this.fluid){i={["kup-qlik-container-fluid"]:true}}else{i={["kup-qlik-container"]:true}}e={["--lyo_obj-height"]:this.defobjsize};return t("div",{key:"3014bd82bd94053748127d5913f9ff4bda8ef3e1",class:i,style:e},this.divlist)}componentDidRender(){if(this.debug){console.log("Grid",this.grid)}if(this.qlik){if(this.appid!=""&&!this.app){this.app=this.qlik.openApp(this.appid,this.config)}else{if(this.debug){console.log("App already open:",this.app)}}if(this.app){this.getObjects(this.grid).then((()=>{this.doSelection(this.grid)}))}}this.kupManager.debug.logRender(this,true)}get rootElement(){return e(this)}};h.style=p;export{h as kup_qlik};
|
|
2
|
+
//# sourceMappingURL=p-b2e6fcf9.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as n,H as o,d as f}from"./p-d7c15b0e.js";import{k as a,g as p,s}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,f as i,h as n,H as o,d as f}from"./p-d7c15b0e.js";import{k as a,g as p,s}from"./p-54f6e4df.js";import{c as h}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var r;(function(t){t["data"]="Data of the component containing text"})(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{height:100%;width:100%;display:block;color:var(--kup-text-color);font-family:var(--kup-font-family);font-size:var(--kup-font-size)}#kup-component{height:100%}";const c=l;var g=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,n){if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?n:i==="a"?n.call(t):n?n.value:e.get(t)};var m;const u="\r\n";const d=class{constructor(i){t(this,i);this.kupReady=e(this,"kup-txt-ready",6);m.set(this,a());this.data=undefined}async getProps(t){return p(this,r,t)}async refresh(){i(this)}async setProps(t){s(this,r,t)}getValue(){var t;const e=((t=this.data)===null||t===void 0?void 0:t.value)||"";return e.replace(new RegExp(`${u}`,"g"),"<br />")}componentWillLoad(){g(this,m,"f").debug.logLoad(this,false);g(this,m,"f").theme.register(this)}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id});g(this,m,"f").debug.logLoad(this,true)}componentWillRender(){g(this,m,"f").debug.logRender(this,false)}componentDidRender(){g(this,m,"f").debug.logRender(this,true)}render(){const t=this.getValue();return n(o,{key:"2b3302932ded7426fa41fd6ec43fc8b1172730c9"},n("style",{key:"66b219951c64f2574ac124119d0194518ecf7d29"},g(this,m,"f").theme.setKupStyle(this.rootElement)),n("div",{key:"37a176ec66fcde4a6990c1ebcd6cdffcb2e0816a",id:h},n("div",{key:"73349832e622e018134d63f7ef779e3ea817a961",innerHTML:t})))}disconnectedCallback(){g(this,m,"f").theme.unregister(this)}get rootElement(){return f(this)}};m=new WeakMap;d.style=c;export{d as kup_txt};
|
|
2
|
+
//# sourceMappingURL=p-b3bee19d.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as i,f as e,h as n,H as o,d as s}from"./p-d7c15b0e.js";import{F as a}from"./p-10dfd311.js";import{F as r}from"./p-5d03c077.js";import{F as l}from"./p-a61546b9.js";import{F as h}from"./p-c4054aba.js";import{k as c,g as f,s as p,at as d,h as u,R as m,e as g}from"./p-f1ccd876.js";import{c as x}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-2b519589.js";import"./p-d4a879fc.js";import"./p-029c7cbe.js";var y;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="The data of the component.";t["enableDesign"]="When set to true, the component is in design mode and it is draggable."})(y||(y={}));const b=".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{width:100%;height:100%}#kup-component{height:100%}.header{display:flex;flex-direction:row;justify-content:center}.header>*{margin-left:0.5em}.form{display:grid;height:100%}.form-dropzone{padding:1em;grid-gap:0.5em;border:1px solid var(--kup-primary-color);height:auto}.section{display:flex;flex-direction:column;overflow:auto}.section-header{display:flex;flex-direction:column}.section-header>*{width:100%;display:flex;flex-direction:row}.section-header>*>.section-header-actions{display:flex;justify-content:end}.section-header>*>.section-header-actions>*{margin-top:auto;margin-bottom:auto}.section-body{display:grid}.section-dropzone{border:1px solid var(--kup-primary-color)}.section-draggable{border:1px solid var(--kup-secondary-color);padding:1em}.section-placeholder{background-color:rgba(var(--kup-secondary-color-rgb), 0.5);min-height:1em;min-width:1em}.component{height:fit-content;padding:1em;margin:0.5em}.layout-row{grid-auto-flow:column;grid-template-columns:min-content}.layout-column{grid-auto-flow:row;grid-template-rows:min-content}";const k=b;const v=class{constructor(e){t(this,e);this.kupSave=i(this,"kup-dashboard-save",6);this.kupManager=c();this.internalData=null;this.internalDataBackup=null;this.resetInternalData=false;this.customStyle="";this.data=null;this.enableDesign=false}onKupSave(){this.kupSave.emit({comp:this,id:this.rootElement.id,data:this.internalData})}dataChanged(){this.resetData()}async getProps(t){return f(this,y,t)}async refresh(){e(this)}async setProps(t){p(this,y,t)}buildGuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var i=Math.random()*16|0,e=t==="x"?i:i&3|8;return e.toString(16)}))}buildHeader(){const t={icon:"cancel",label:this.kupManager.language.translate(d.RESET),secondary:true,onClick:()=>{this.resetData()}};const i={icon:"save",label:this.kupManager.language.translate(d.SAVE),onClick:()=>this.onKupSave()};return n("div",{class:"header"},this.enableDesign?n(a,Object.assign({},t)):undefined,this.enableDesign?n(a,Object.assign({},i)):undefined)}buildForm(t,i){const e={form:true,"layout-column":t&&t.layout=="column","layout-row":t&&t.layout=="row","form-dropzone":this.enableDesign&&t&&t.sections!=null&&t.sections.length>0};return t?n("div",{class:e,style:this.getGridStyle(t),ref:e=>{if(!e)return;const n=e;n.kupData={parent:i,form:t}}},t.sections.map((i=>this.buildSection(i,t)))):n("div",null,this.kupManager.language.translate(u.EMPTY_DATA))}buildSectionHeader(t,i){const e={value:t.dim,label:this.kupManager.language.translate(d.DIMENSION),onChange:i=>{const{target:e}=i;t.dim=e.value;this.refresh()}};const o={icon:"add",slim:true,onClick:()=>{if(!t.sections){t.sections=[]}const i={id:t.id+(t.sections.length+1),loaded:t.loaded,layout:t.layout};t.sections.push(i);this.resetData(this.internalData)}};const s={icon:"remove",slim:true,secondary:true,onClick:()=>{const e=i.sections.indexOf(t);i.sections.splice(e,1);this.resetData(this.internalData)}};const h={checked:t.loaded,label:this.kupManager.language.translate(d.LOADED),onChange:()=>{t.loaded=!t.loaded;this.refresh()}};const c={checked:t.layout=="column",label:this.kupManager.language.translate(d.VERTICAL),onChange:()=>{t.layout=t.layout=="column"?"row":"column";this.refresh()}};return n("div",{class:"section-header"},n("div",null,t.id," - ",t.layout),n("div",null,n("div",{class:"section-header-actions"},n(l,Object.assign({},e)),n(r,Object.assign({},h)),n(r,Object.assign({},c)),n(a,Object.assign({},o)),n(a,Object.assign({},s)))))}buildSection(t,i){const e={section:true,"section-draggable":this.enableDesign,"section-dropzone":this.enableDesign};const o={"section-body":true,"layout-column":t&&t.layout=="column","layout-row":t&&t.layout=="row"};return n("div",{class:e,ref:e=>{if(!e)return;const n=e;n.kupData={parent:i,section:t}}},this.enableDesign?this.buildSectionHeader(t,i):undefined,n("div",{class:o,style:this.getGridStyle(t)},!this.enableDesign&&t.loaded&&(!t.sections||t.sections.length==0)?n("slot",{name:t.id}):undefined,t.sections&&(t.loaded||this.enableDesign)?t.sections.map((i=>this.buildSection(i,t))):undefined))}calcSectionPosition(t,i,e,n,o){let s=n;for(let n=0;n<o.length;n++){const a=o[n];const r=a.getBoundingClientRect();if(e&&t<r.y){s=n;break}else if(!e&&i<r.x){s=n;break}}return s}didRenderInteractables(){try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-draggable").forEach((i=>t.push(i)));t.forEach((t=>{this.kupManager.interact.draggable(t,null,null,m.CLONE)}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-dropzone").forEach((i=>t.push(i)));this.rootElement.shadowRoot.querySelectorAll(".form-dropzone").forEach((i=>t.push(i)));t.forEach((t=>{this.kupManager.interact.dropzone(t,{ondropdeactivate:()=>{this.removeSectionPlaceHolder()},ondropmove:t=>{this.removeSectionPlaceHolder();this.dragEnter(t.dragEvent.clientY,t.dragEvent.clientX,t.currentTarget)}},null,{drop:t=>{this.dropped(t,t.currentTarget,t.relatedTarget)}})}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}}dragEnter(t,i,e){if(e.kupData.form){const n=this.calcSectionPosition(t,i,e.kupData.form.layout=="column",e.kupData.form.sections.length,e.children);this.setSectionPlaceHolder(e,n)}else if(e.kupData.section){const n=this.calcSectionPosition(t,i,e.kupData.section.layout=="column",e.kupData.section.sections.length,e.lastElementChild.children);this.setSectionPlaceHolder(e.lastElementChild,n)}}dropped(t,i,e){const n=e.kupData.parent.sections.indexOf(e.kupData.section);e.kupData.parent.sections.splice(n,1);if(i.kupData.form){if(!i.kupData.form.sections)i.kupData.form.sections=[];const n=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,i.kupData.form.layout=="column",i.kupData.form.sections.length,i.children);i.kupData.form.sections.splice(n,0,e.kupData.section);e.kupData.parent=i.kupData.form}else if(i.kupData.section){if(!i.kupData.section.sections||i.kupData.section.sections.length==0){const t=JSON.parse(JSON.stringify(i.kupData.section));t.dim=null;e.kupData.section.dim=null;i.kupData.section.id=this.buildGuid();i.kupData.section.sections=[];i.kupData.section.sections.push(t)}const n=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,i.kupData.section.layout=="column",i.kupData.section.sections.length,i.lastElementChild.children);i.kupData.section.sections.splice(n,0,e.kupData.section);e.kupData.parent=i.kupData.section}this.resetData(this.internalData)}getGridStyle(t){let i={};if(t.sections){let e="";t.sections.forEach((t=>{if(this.enableDesign||!t.dim)e+=" 1fr";else e+=t.dim.indexOf("%")<0?" "+t.dim+"px":" "+t.dim}));if(t.layout=="column")i["gridTemplateRows"]=e;if(t.layout=="row")i["gridTemplateColumns"]=e}return i}setSectionPlaceHolder(t,i){const e=document.createElement("div");e.className="section-placeholder";t.insertBefore(e,t.childNodes[i])}removeSectionPlaceHolder(){const t=this.rootElement.shadowRoot.querySelector(".section-placeholder");if(t)t.parentElement.removeChild(t)}resetData(t=null){if(t)this.internalDataBackup=t;this.resetInternalData=true;setTimeout((()=>{if(this.internalDataBackup){this.internalData=this.internalDataBackup;this.internalDataBackup=null}this.resetInternalData=false}),250)}unregisterInteractables(){this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-dropzone")));this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-draggable")));this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".form-dropzone")))}componentWillLoad(){this.kupManager.dates.register(this);this.kupManager.debug.logLoad(this,false);this.kupManager.language.register(this);this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false);if(this.resetInternalData){this.internalData=null;this.unregisterInteractables()}else if(!this.internalData)this.internalData=JSON.parse(JSON.stringify(this.data))}componentDidRender(){this.kupManager.debug.logRender(this,true);const t=this.rootElement.shadowRoot;if(t){const i=t.querySelectorAll(".f-text-field");if(i)i.forEach((t=>{h(t)}))}this.didRenderInteractables()}render(){return n(o,{key:"2a5f7d91b832041e5c68460409f8723bcae04c25"},n("style",{key:"00165eccb43eb45e9519e50ae383b6f237b6d293"},this.kupManager.theme.setKupStyle(this.rootElement)),n("div",{key:"66a90a4032f46aec89e48e2e8c3c95d948dee416",id:x},this.buildHeader(),this.buildForm(this.internalData,null)))}disconnectedCallback(){this.unregisterInteractables();this.kupManager.dates.unregister(this);this.kupManager.language.unregister(this);this.kupManager.theme.unregister(this)}get rootElement(){return s(this)}static get watchers(){return{data:["dataChanged"]}}};v.style=k;export{v as kup_dashboard};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,f as i,h as n,H as o,d as s}from"./p-d7c15b0e.js";import{F as a}from"./p-10dfd311.js";import{F as r}from"./p-5d03c077.js";import{F as l}from"./p-2acd1e25.js";import{F as h}from"./p-c4054aba.js";import{k as c,g as f,s as p,at as d,h as u,R as m,e as g}from"./p-54f6e4df.js";import{c as x}from"./p-635bb4b3.js";import"./p-e3062c19.js";import"./p-2b519589.js";import"./p-d4a879fc.js";import"./p-029c7cbe.js";var y;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="The data of the component.";t["enableDesign"]="When set to true, the component is in design mode and it is draggable."})(y||(y={}));const b=".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{width:100%;height:100%}#kup-component{height:100%}.header{display:flex;flex-direction:row;justify-content:center}.header>*{margin-left:0.5em}.form{display:grid;height:100%}.form-dropzone{padding:1em;grid-gap:0.5em;border:1px solid var(--kup-primary-color);height:auto}.section{display:flex;flex-direction:column;overflow:auto}.section-header{display:flex;flex-direction:column}.section-header>*{width:100%;display:flex;flex-direction:row}.section-header>*>.section-header-actions{display:flex;justify-content:end}.section-header>*>.section-header-actions>*{margin-top:auto;margin-bottom:auto}.section-body{display:grid}.section-dropzone{border:1px solid var(--kup-primary-color)}.section-draggable{border:1px solid var(--kup-secondary-color);padding:1em}.section-placeholder{background-color:rgba(var(--kup-secondary-color-rgb), 0.5);min-height:1em;min-width:1em}.component{height:fit-content;padding:1em;margin:0.5em}.layout-row{grid-auto-flow:column;grid-template-columns:min-content}.layout-column{grid-auto-flow:row;grid-template-rows:min-content}";const k=b;const v=class{constructor(i){t(this,i);this.kupSave=e(this,"kup-dashboard-save",6);this.kupManager=c();this.internalData=null;this.internalDataBackup=null;this.resetInternalData=false;this.customStyle="";this.data=null;this.enableDesign=false}onKupSave(){this.kupSave.emit({comp:this,id:this.rootElement.id,data:this.internalData})}dataChanged(){this.resetData()}async getProps(t){return f(this,y,t)}async refresh(){i(this)}async setProps(t){p(this,y,t)}buildGuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=Math.random()*16|0,i=t==="x"?e:e&3|8;return i.toString(16)}))}buildHeader(){const t={icon:"cancel",label:this.kupManager.language.translate(d.RESET),secondary:true,onClick:()=>{this.resetData()}};const e={icon:"save",label:this.kupManager.language.translate(d.SAVE),onClick:()=>this.onKupSave()};return n("div",{class:"header"},this.enableDesign?n(a,Object.assign({},t)):undefined,this.enableDesign?n(a,Object.assign({},e)):undefined)}buildForm(t,e){const i={form:true,"layout-column":t&&t.layout=="column","layout-row":t&&t.layout=="row","form-dropzone":this.enableDesign&&t&&t.sections!=null&&t.sections.length>0};return t?n("div",{class:i,style:this.getGridStyle(t),ref:i=>{if(!i)return;const n=i;n.kupData={parent:e,form:t}}},t.sections.map((e=>this.buildSection(e,t)))):n("div",null,this.kupManager.language.translate(u.EMPTY_DATA))}buildSectionHeader(t,e){const i={value:t.dim,label:this.kupManager.language.translate(d.DIMENSION),onChange:e=>{const{target:i}=e;t.dim=i.value;this.refresh()}};const o={icon:"add",slim:true,onClick:()=>{if(!t.sections){t.sections=[]}const e={id:t.id+(t.sections.length+1),loaded:t.loaded,layout:t.layout};t.sections.push(e);this.resetData(this.internalData)}};const s={icon:"remove",slim:true,secondary:true,onClick:()=>{const i=e.sections.indexOf(t);e.sections.splice(i,1);this.resetData(this.internalData)}};const h={checked:t.loaded,label:this.kupManager.language.translate(d.LOADED),onChange:()=>{t.loaded=!t.loaded;this.refresh()}};const c={checked:t.layout=="column",label:this.kupManager.language.translate(d.VERTICAL),onChange:()=>{t.layout=t.layout=="column"?"row":"column";this.refresh()}};return n("div",{class:"section-header"},n("div",null,t.id," - ",t.layout),n("div",null,n("div",{class:"section-header-actions"},n(l,Object.assign({},i)),n(r,Object.assign({},h)),n(r,Object.assign({},c)),n(a,Object.assign({},o)),n(a,Object.assign({},s)))))}buildSection(t,e){const i={section:true,"section-draggable":this.enableDesign,"section-dropzone":this.enableDesign};const o={"section-body":true,"layout-column":t&&t.layout=="column","layout-row":t&&t.layout=="row"};return n("div",{class:i,ref:i=>{if(!i)return;const n=i;n.kupData={parent:e,section:t}}},this.enableDesign?this.buildSectionHeader(t,e):undefined,n("div",{class:o,style:this.getGridStyle(t)},!this.enableDesign&&t.loaded&&(!t.sections||t.sections.length==0)?n("slot",{name:t.id}):undefined,t.sections&&(t.loaded||this.enableDesign)?t.sections.map((e=>this.buildSection(e,t))):undefined))}calcSectionPosition(t,e,i,n,o){let s=n;for(let n=0;n<o.length;n++){const a=o[n];const r=a.getBoundingClientRect();if(i&&t<r.y){s=n;break}else if(!i&&e<r.x){s=n;break}}return s}didRenderInteractables(){try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-draggable").forEach((e=>t.push(e)));t.forEach((t=>{this.kupManager.interact.draggable(t,null,null,m.CLONE)}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}try{const t=[];this.rootElement.shadowRoot.querySelectorAll(".section-dropzone").forEach((e=>t.push(e)));this.rootElement.shadowRoot.querySelectorAll(".form-dropzone").forEach((e=>t.push(e)));t.forEach((t=>{this.kupManager.interact.dropzone(t,{ondropdeactivate:()=>{this.removeSectionPlaceHolder()},ondropmove:t=>{this.removeSectionPlaceHolder();this.dragEnter(t.dragEvent.clientY,t.dragEvent.clientX,t.currentTarget)}},null,{drop:t=>{this.dropped(t,t.currentTarget,t.relatedTarget)}})}))}catch(t){this.kupManager.debug.logMessage(this,t,g.ERROR)}}dragEnter(t,e,i){if(i.kupData.form){const n=this.calcSectionPosition(t,e,i.kupData.form.layout=="column",i.kupData.form.sections.length,i.children);this.setSectionPlaceHolder(i,n)}else if(i.kupData.section){const n=this.calcSectionPosition(t,e,i.kupData.section.layout=="column",i.kupData.section.sections.length,i.lastElementChild.children);this.setSectionPlaceHolder(i.lastElementChild,n)}}dropped(t,e,i){const n=i.kupData.parent.sections.indexOf(i.kupData.section);i.kupData.parent.sections.splice(n,1);if(e.kupData.form){if(!e.kupData.form.sections)e.kupData.form.sections=[];const n=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,e.kupData.form.layout=="column",e.kupData.form.sections.length,e.children);e.kupData.form.sections.splice(n,0,i.kupData.section);i.kupData.parent=e.kupData.form}else if(e.kupData.section){if(!e.kupData.section.sections||e.kupData.section.sections.length==0){const t=JSON.parse(JSON.stringify(e.kupData.section));t.dim=null;i.kupData.section.dim=null;e.kupData.section.id=this.buildGuid();e.kupData.section.sections=[];e.kupData.section.sections.push(t)}const n=this.calcSectionPosition(t.dragEvent.clientY,t.dragEvent.clientX,e.kupData.section.layout=="column",e.kupData.section.sections.length,e.lastElementChild.children);e.kupData.section.sections.splice(n,0,i.kupData.section);i.kupData.parent=e.kupData.section}this.resetData(this.internalData)}getGridStyle(t){let e={};if(t.sections){let i="";t.sections.forEach((t=>{if(this.enableDesign||!t.dim)i+=" 1fr";else i+=t.dim.indexOf("%")<0?" "+t.dim+"px":" "+t.dim}));if(t.layout=="column")e["gridTemplateRows"]=i;if(t.layout=="row")e["gridTemplateColumns"]=i}return e}setSectionPlaceHolder(t,e){const i=document.createElement("div");i.className="section-placeholder";t.insertBefore(i,t.childNodes[e])}removeSectionPlaceHolder(){const t=this.rootElement.shadowRoot.querySelector(".section-placeholder");if(t)t.parentElement.removeChild(t)}resetData(t=null){if(t)this.internalDataBackup=t;this.resetInternalData=true;setTimeout((()=>{if(this.internalDataBackup){this.internalData=this.internalDataBackup;this.internalDataBackup=null}this.resetInternalData=false}),250)}unregisterInteractables(){this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-dropzone")));this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".section-draggable")));this.kupManager.interact.unregister(Array.from(this.rootElement.shadowRoot.querySelectorAll(".form-dropzone")))}componentWillLoad(){this.kupManager.dates.register(this);this.kupManager.debug.logLoad(this,false);this.kupManager.language.register(this);this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false);if(this.resetInternalData){this.internalData=null;this.unregisterInteractables()}else if(!this.internalData)this.internalData=JSON.parse(JSON.stringify(this.data))}componentDidRender(){this.kupManager.debug.logRender(this,true);const t=this.rootElement.shadowRoot;if(t){const e=t.querySelectorAll(".f-text-field");if(e)e.forEach((t=>{h(t)}))}this.didRenderInteractables()}render(){return n(o,{key:"2a5f7d91b832041e5c68460409f8723bcae04c25"},n("style",{key:"00165eccb43eb45e9519e50ae383b6f237b6d293"},this.kupManager.theme.setKupStyle(this.rootElement)),n("div",{key:"66a90a4032f46aec89e48e2e8c3c95d948dee416",id:x},this.buildHeader(),this.buildForm(this.internalData,null)))}disconnectedCallback(){this.unregisterInteractables();this.kupManager.dates.unregister(this);this.kupManager.language.unregister(this);this.kupManager.theme.unregister(this)}get rootElement(){return s(this)}static get watchers(){return{data:["dataChanged"]}}};v.style=k;export{v as kup_dashboard};
|
|
2
|
+
//# sourceMappingURL=p-b413dbae.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as a,H as l,d as r}from"./p-d7c15b0e.js";import{F as n}from"./p-10dfd311.js";import{a as o}from"./p-e3062c19.js";import{F as s}from"./p-2b519589.js";import{k as f,g as _,s as h,h as p,N as m}from"./p-f1ccd876.js";import{c}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var u;(function(t){t["autofitOnExpand"]="The component will autofit everytime a node is expanded.";t["autofitOnLoad"]="The component's initial render will fit the container by invoking the runAutofit method.";t["cardData"]="Used to render the family tree boxes as kup-cards (through kup-box).";t["collapsible"]="Nodes can be expanded/collapsed.";t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the component";t["layout"]="Layout of the boxes.";t["stackedLeaves"]="Child nodes that have no children are arranged vertically."})(u||(u={}));const d='.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_familytree_item_background_color:var(\n --kup-layer-1,\n var(--kup-layer-1)\n );--kup_familytree_border_color:var(\n --kup-familytree-border-color,\n var(--kup-info-color-50)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-color)\n );--kup_familytree_item_height:var(--kup-familytree-item-height, 80px);--kup_familytree_item_h_padding:var(\n --kup-familytree-item-h-padding,\n var(--kup-space-03)\n );--kup_familytree_item_v_padding:var(\n --kup-familytree-item-v-padding,\n var(--kup-space-03)\n );--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-subtle)\n );display:block;overflow:hidden}.family-tree{cursor:grab;display:flex;transform:scale(var(--kup_familytree_scale, 1));transform-origin:0px 0px}.family-tree--dragging{cursor:grabbing}.family-tree__node{border-collapse:collapse;margin:auto}.family-tree__node--stacked{margin-bottom:4px}.family-tree__node__staff{align-items:center;display:flex;flex-direction:column;height:0;transform:translateX(calc((var(--kup_familytree_item_width) + var(--kup_familytree_item_h_padding) * 2) / 2)) translateY(calc(0px - (var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)))}.family-tree__node__staff__item{padding:var(--kup_familytree_item_v_padding);text-align:left}.family-tree__node__staff__item:before{border-top:2px solid var(--kup_familytree_lines_color);content:"";position:absolute;transform:translateX(calc(100% + 2px)) translateY(calc(var(--kup_familytree_item_height) / 2));width:var(--kup_familytree_item_h_padding)}.family-tree__node td{vertical-align:top;padding:0}.family-tree__line--left{border-left:2px solid var(--kup_familytree_lines_color)}.family-tree__line--placeholder{height:calc(var(--kup_familytree_item_height) / 2)}.family-tree__line--staff{height:calc(var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)}.family-tree__line--right{border-right:2px solid var(--kup_familytree_lines_color)}.family-tree__line--top{border-top:2px solid var(--kup_familytree_lines_color)}.family-tree__line--vertical{background-color:var(--kup_familytree_lines_color);margin-left:auto;margin-right:auto;width:2px}.family-tree__item{display:flex}.family-tree__item__wrapper{margin:auto}.family-tree__item__wrapper kup-box{margin:0 auto;overflow:hidden;padding:0 18px;width:var(--kup_familytree_item_width);z-index:1}.family-tree__item__wrapper .f-button{--kup-button-primary-color:var(--kup-text-color);--kup-button-primary-color-rgb:var(--kup-text-color-rgb);--kup-button-primary-color-h:var(--kup-text-color-h);--kup-button-primary-color-s:var(--kup-text-color-s);--kup-button-primary-color-l:var(--kup-text-color-l);margin:0 auto;width:max-content}.family-tree__item__wrapper .f-button button{height:32px;width:32px}.family-tree__item__layout{background-color:var(--kup_familytree_item_background_color);box-sizing:border-box;display:flex;height:var(--kup_familytree_item_height);margin:0 18px;width:var(--kup_familytree_item_width)}.family-tree__item__layout--1{justify-content:center;color:var(--kup_familytree_item_color)}.family-tree__item__layout--1>.family-tree__item__layout__text__title{margin-top:auto;margin-bottom:auto}.family-tree__item__layout--2{background-color:var(--kup_familytree_item_background_color);justify-content:flex-start}.family-tree__item__layout__color{background-color:var(--kup_familytree_border_color);height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto var(--kup-space-03)}.family-tree__item__layout__image img{border-radius:50px;object-fit:cover}.family-tree__item__layout__text{display:flex;flex-direction:column;justify-content:center}.family-tree__item__layout__text__title{font-size:18px;margin-bottom:5px}.family-tree__item__layout__text__subtitle{font-size:14px}.family-tree__item__layout__text__title,.family-tree__item__layout__text__subtitle{max-width:calc(var(--kup_familytree_item_width) - 30%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}';const y=d;var k=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(t):a?a.value:e.get(t)};var g=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,a,l){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?l.call(t,i):l?l.value=i:e.set(t,i),i};var v,x,b,w,z,j,C,E,T,W,M,S,D,L,O,P,R,A,F,X,Y,H,N,$,B;const U=class{constructor(i){t(this,i);this.kupClick=e(this,"kup-familytree-click",6);this.kupContextMenu=e(this,"kup-familytree-contextmenu",6);this.kupDblClick=e(this,"kup-familytree-dblclick",6);v.add(this);x.set(this,[]);b.set(this,false);w.set(this,0);z.set(this,0);j.set(this,[]);C.set(this,f());E.set(this,(t=>{const e=t.clientX-k(this,w,"f");const i=t.clientY-k(this,z,"f");this.rootElement.scrollTop-=i;this.rootElement.scrollLeft-=e;g(this,w,t.clientX,"f");g(this,z,t.clientY,"f")}));T.set(this,false);W.set(this,null);this.autofitOnExpand=true;this.autofitOnLoad=true;this.cardData=null;this.collapsible=true;this.customStyle="";this.data=null;this.layout=null;this.stackedLeaves=false}async collapseAll(t=this.data.rows){k(this,C,"f").data.node.setProperties(t,{isExpanded:false},true);this.refresh()}async expandAll(t=this.data.rows){k(this,C,"f").data.node.setProperties(t,{isExpanded:true},true);this.refresh()}async getProps(t){return _(this,u,t)}async refresh(){i(this)}async runAutofit(){const t=k(this,W,"f").clientWidth;const e=k(this,W,"f").children[0].clientWidth;const i=.01;const a=85/100*t;const l=95/100*t;let r=1;let n=2e3;let o=e;while((o<a||o>l)&&n>0&&r>i){n--;if(o<a){r=r+i}else if(o>l){r=r-i}else{n=0}o=e*r}k(this,W,"f").style.setProperty("--kup_familytree_scale",r<=1?r.toFixed(2):"1")}async setProps(t){h(this,u,t)}componentWillLoad(){k(this,C,"f").debug.logLoad(this,false);k(this,C,"f").language.register(this);k(this,C,"f").theme.register(this)}componentDidLoad(){k(this,v,"m",$).call(this);if(this.autofitOnLoad){this.runAutofit()}k(this,C,"f").debug.logLoad(this,true)}componentWillRender(){k(this,C,"f").debug.logRender(this,false)}componentDidRender(){if(k(this,T,"f")){g(this,T,false,"f");this.runAutofit()}k(this,C,"f").debug.logRender(this,true)}render(){return a(l,{key:"602bb95f29dfe9e017313b01a3fc485c23dd2f97",onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault();k(this,v,"m",F).call(this,t)},onWheel:t=>{k(this,v,"m",B).call(this,t)}},a("style",{key:"becb707b0e477aff23e752bbb7ce335c01b428bd"},k(this,C,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"aa50336a80b5499f3241b277639bb234c9e3eee5",id:c},k(this,v,"m",R).call(this)))}disconnectedCallback(){k(this,C,"f").language.unregister(this);k(this,C,"f").theme.unregister(this)}get rootElement(){return r(this)}};x=new WeakMap,b=new WeakMap,w=new WeakMap,z=new WeakMap,j=new WeakMap,C=new WeakMap,E=new WeakMap,T=new WeakMap,W=new WeakMap,v=new WeakSet,M=function t(e,i,l,r){const n=[];n.push(a("td",{class:{"family-tree__line":true,"family-tree__line--right":!e,"family-tree__line--top":!e}},a("div",{class:"family-tree__line--placeholder"})));n.push(a("td",{class:{"family-tree__line":true,"family-tree__line--left":e,"family-tree__line--top":e&&!l||r&&!i}},a("div",{class:"family-tree__line--placeholder"})));return n},S=function t(e){var i;let l=null;let r=null;if(!this.collapsible||this.collapsible&&e.isExpanded){(i=e.children)===null||i===void 0?void 0:i.forEach((t=>{if(t.isStaff){if(!r){r=[]}r.push(t)}else{if(!l){l=[]}l.push(t)}}))}const s=this.stackedLeaves&&l&&l.every((t=>!t.children||t.children.length==0));const f=l?l.length*2:1;const _={"family-tree__line":true,"family-tree__line--placeholder":!!(l||r),"family-tree__line--vertical":!!(l||r)};const h={columns:[{name:"*TREECOL",title:"Fake column",visible:false},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]};const m=e.layout||this.layout||1;const c={icon:e.isExpanded?"remove":"plus",shaped:true,slim:true,styling:o.OUTLINED,title:`${k(this,C,"f").language.translate(p.EXPAND)}/${k(this,C,"f").language.translate(p.COLLAPSE)} (CTRL + Click)`,onClick:t=>{if(t.ctrlKey&&e.children&&e.children.length>0){if(e.isExpanded){this.collapseAll(e.children)}else{this.expandAll(e.children)}}e.isExpanded=!e.isExpanded;if(this.autofitOnExpand){g(this,T,true,"f")}this.refresh()},wrapperClass:"family-tree__item__expand"};let u=null;if(k(this,v,"m",A).call(this,m)){u=a("kup-box",{class:"kup-borderless kup-paddingless",customStyle:"#kup-component { background: var(--kup_familytree_item_background_color); border: 2px solid var(--kup_familytree_lines_color); box-sizing: border-box; height: var(--kup_familytree_item_height); padding: 0 var(--kup_familytree_item_h_padding); } #kup-component .box-component { background: var(--kup_familytree_item_background_color); box-sizing: border-box; height: 100%;} #kup-component .f-cell__text { color: var(--kup_familytree_item_color); }",data:h,cardData:this.cardData,layout:this.cardData?null:m,showSelection:false})}const d=a("div",{class:"family-tree__item"},a("div",{class:"family-tree__item__wrapper"},k(this,v,"m",A).call(this,m)?u:k(this,v,"m",D).call(this,e,m),this.collapsible&&e.children&&e.children.length>0?a(n,Object.assign({},c)):undefined));const y={["--kup_familytree_staffchildren"]:(r===null||r===void 0?void 0:r.length.toString())||"0"};return a("table",{class:{"family-tree__node":true,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||e.children.length==0)}},a("tr",null,a("td",{"data-row":e,colSpan:f},d)),a("tr",null,a("td",{colSpan:f},a("div",{class:_}))),r?[a("tr",null,a("td",{colSpan:f},a("div",{class:Object.assign(Object.assign({},_),{"family-tree__line--staff":true}),style:y}),a("div",{class:"family-tree__node__staff",style:y},r.map((e=>[a("div",{class:"family-tree__node__staff__item"},k(this,v,"m",t).call(this,e))])))))]:null,r&&l?[a("tr",null,a("td",{colSpan:f},a("div",{class:_})))]:null,l?[a("tr",null,s?a("td",{colSpan:f},a("div",{class:_})):l.map((t=>k(this,v,"m",M).call(this,l.indexOf(t)==0,l.indexOf(t)==l.length-1,l.length==1,l.length>2)))),a("tr",null,s?a("td",{colSpan:f},l.map((e=>k(this,v,"m",t).call(this,e)))):l.map((e=>a("td",{colSpan:2},k(this,v,"m",t).call(this,e)))))]:undefined)},D=function t(e,i){switch(i){case 2:return k(this,v,"m",O).call(this,e);default:return k(this,v,"m",L).call(this,e)}},L=function t(e){return a("div",{class:`family-tree__item__layout family-tree__item__layout--1`},a("div",{class:"family-tree__item__layout__text__title"},e.value))},O=function t(e){return a("div",{class:`family-tree__item__layout family-tree__item__layout--2`},a("div",{class:"family-tree__item__layout__color"}),a("div",{class:"family-tree__item__layout__image"},a(s,{resource:e.icon,placeholderResource:e.placeholderIcon,sizeX:"48px",sizeY:"48px"})),a("div",{class:"family-tree__item__layout__text"},a("div",{class:"family-tree__item__layout__text__title"},e.value),e.title?a("div",{class:"family-tree__item__layout__text__subtitle"},e.title):null))},P=function t(e){return e.map((t=>k(this,v,"m",S).call(this,t)))},R=function t(){const e=!this.data||!this.data.rows||!this.data.rows.length;return a("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>g(this,W,t,"f")},e?a("div",null,k(this,C,"f").language.translate(p.EMPTY_DATA)):k(this,v,"m",P).call(this,this.data.rows))},A=function t(e){const i=e;return!!this.cardData||i&&i.sections&&i.sections.length>0},F=function t(e){g(this,w,e.clientX,"f");g(this,z,e.clientY,"f");k(this,W,"f").classList.add("family-tree--dragging");const i=()=>{document.removeEventListener("pointermove",k(this,E,"f"));document.removeEventListener("pointerup",i);k(this,W,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",k(this,E,"f"));document.addEventListener("pointerup",i)},X=function t(e,i){let a;let l;if(e){for(let t=e.length-1;t>=0;t--){const i=e[t];if(!i.tagName){continue}if(i.classList.contains("family-tree__item__expand")){a=i}switch(i.tagName.toUpperCase()){case"TD":{l=i;break}}}}let r=null,n=null,o=null;if(l){r=l["data-cell"];n=l["data-column"];o=l["data-row"]}return{cell:r?r:null,column:n?n:null,expandButton:a?a:null,originalEvent:i,row:o?o:null,td:l?l:null}},Y=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},H=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},N=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},$=function t(){k(this,j,"f").push(this.rootElement);const e=t=>{if(k(this,b,"f")){g(this,b,false,"f");return}switch(t.button){case 0:const e={};for(const i in t){e[i]=t[i]}k(this,x,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",Y).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",H).call(this,t)});break}};const i=t=>{switch(t.button){case 0:for(let t=0;t<k(this,x,"f").length;t++){clearTimeout(k(this,x,"f")[t]);k(this,C,"f").debug.logMessage(this,"Cleared clickHandler timeout("+k(this,x,"f")[t]+").")}g(this,x,[],"f");this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",N).call(this,t)});break}};const a=t=>{if(t.pointerType==="pen"||t.pointerType==="touch"){g(this,b,true,"f");this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",H).call(this,t)})}};k(this,C,"f").interact.on(this.rootElement,m.TAP,e);k(this,C,"f").interact.on(this.rootElement,m.DOUBLETAP,i);k(this,C,"f").interact.on(this.rootElement,m.HOLD,a)},B=function t(e){if(e.ctrlKey){e.preventDefault();const t=parseFloat(k(this,W,"f").style.getPropertyValue("--kup_familytree_scale"))||1;const i=.05;let a=e.deltaY>0?t-i:t+i;if(a<i){a=i}k(this,W,"f").style.setProperty("--kup_familytree_scale",a.toFixed(2))}};U.style=y;export{U as kup_family_tree};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,f as i,h as a,H as l,d as r}from"./p-d7c15b0e.js";import{F as n}from"./p-10dfd311.js";import{a as o}from"./p-e3062c19.js";import{F as s}from"./p-2b519589.js";import{k as f,g as _,s as h,h as p,N as m}from"./p-54f6e4df.js";import{c}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var u;(function(t){t["autofitOnExpand"]="The component will autofit everytime a node is expanded.";t["autofitOnLoad"]="The component's initial render will fit the container by invoking the runAutofit method.";t["cardData"]="Used to render the family tree boxes as kup-cards (through kup-box).";t["collapsible"]="Nodes can be expanded/collapsed.";t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the component";t["layout"]="Layout of the boxes.";t["stackedLeaves"]="Child nodes that have no children are arranged vertically."})(u||(u={}));const d='.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_familytree_item_background_color:var(\n --kup-layer-1,\n var(--kup-layer-1)\n );--kup_familytree_border_color:var(\n --kup-familytree-border-color,\n var(--kup-info-color-50)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-color)\n );--kup_familytree_item_height:var(--kup-familytree-item-height, 80px);--kup_familytree_item_h_padding:var(\n --kup-familytree-item-h-padding,\n var(--kup-space-03)\n );--kup_familytree_item_v_padding:var(\n --kup-familytree-item-v-padding,\n var(--kup-space-03)\n );--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-subtle)\n );display:block;overflow:hidden}.family-tree{cursor:grab;display:flex;transform:scale(var(--kup_familytree_scale, 1));transform-origin:0px 0px}.family-tree--dragging{cursor:grabbing}.family-tree__node{border-collapse:collapse;margin:auto}.family-tree__node--stacked{margin-bottom:4px}.family-tree__node__staff{align-items:center;display:flex;flex-direction:column;height:0;transform:translateX(calc((var(--kup_familytree_item_width) + var(--kup_familytree_item_h_padding) * 2) / 2)) translateY(calc(0px - (var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)))}.family-tree__node__staff__item{padding:var(--kup_familytree_item_v_padding);text-align:left}.family-tree__node__staff__item:before{border-top:2px solid var(--kup_familytree_lines_color);content:"";position:absolute;transform:translateX(calc(100% + 2px)) translateY(calc(var(--kup_familytree_item_height) / 2));width:var(--kup_familytree_item_h_padding)}.family-tree__node td{vertical-align:top;padding:0}.family-tree__line--left{border-left:2px solid var(--kup_familytree_lines_color)}.family-tree__line--placeholder{height:calc(var(--kup_familytree_item_height) / 2)}.family-tree__line--staff{height:calc(var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * var(--kup_familytree_item_v_padding) * 2)}.family-tree__line--right{border-right:2px solid var(--kup_familytree_lines_color)}.family-tree__line--top{border-top:2px solid var(--kup_familytree_lines_color)}.family-tree__line--vertical{background-color:var(--kup_familytree_lines_color);margin-left:auto;margin-right:auto;width:2px}.family-tree__item{display:flex}.family-tree__item__wrapper{margin:auto}.family-tree__item__wrapper kup-box{margin:0 auto;overflow:hidden;padding:0 18px;width:var(--kup_familytree_item_width);z-index:1}.family-tree__item__wrapper .f-button{--kup-button-primary-color:var(--kup-text-color);--kup-button-primary-color-rgb:var(--kup-text-color-rgb);--kup-button-primary-color-h:var(--kup-text-color-h);--kup-button-primary-color-s:var(--kup-text-color-s);--kup-button-primary-color-l:var(--kup-text-color-l);margin:0 auto;width:max-content}.family-tree__item__wrapper .f-button button{height:32px;width:32px}.family-tree__item__layout{background-color:var(--kup_familytree_item_background_color);box-sizing:border-box;display:flex;height:var(--kup_familytree_item_height);margin:0 18px;width:var(--kup_familytree_item_width)}.family-tree__item__layout--1{justify-content:center;color:var(--kup_familytree_item_color)}.family-tree__item__layout--1>.family-tree__item__layout__text__title{margin-top:auto;margin-bottom:auto}.family-tree__item__layout--2{background-color:var(--kup_familytree_item_background_color);justify-content:flex-start}.family-tree__item__layout__color{background-color:var(--kup_familytree_border_color);height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto var(--kup-space-03)}.family-tree__item__layout__image img{border-radius:50px;object-fit:cover}.family-tree__item__layout__text{display:flex;flex-direction:column;justify-content:center}.family-tree__item__layout__text__title{font-size:18px;margin-bottom:5px}.family-tree__item__layout__text__subtitle{font-size:14px}.family-tree__item__layout__text__title,.family-tree__item__layout__text__subtitle{max-width:calc(var(--kup_familytree_item_width) - 30%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}';const y=d;var k=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(t):a?a.value:e.get(t)};var g=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,a,l){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?l.call(t,i):l?l.value=i:e.set(t,i),i};var v,x,b,w,z,j,C,E,T,W,M,S,D,L,O,P,R,A,F,X,Y,H,N,$,B;const U=class{constructor(i){t(this,i);this.kupClick=e(this,"kup-familytree-click",6);this.kupContextMenu=e(this,"kup-familytree-contextmenu",6);this.kupDblClick=e(this,"kup-familytree-dblclick",6);v.add(this);x.set(this,[]);b.set(this,false);w.set(this,0);z.set(this,0);j.set(this,[]);C.set(this,f());E.set(this,(t=>{const e=t.clientX-k(this,w,"f");const i=t.clientY-k(this,z,"f");this.rootElement.scrollTop-=i;this.rootElement.scrollLeft-=e;g(this,w,t.clientX,"f");g(this,z,t.clientY,"f")}));T.set(this,false);W.set(this,null);this.autofitOnExpand=true;this.autofitOnLoad=true;this.cardData=null;this.collapsible=true;this.customStyle="";this.data=null;this.layout=null;this.stackedLeaves=false}async collapseAll(t=this.data.rows){k(this,C,"f").data.node.setProperties(t,{isExpanded:false},true);this.refresh()}async expandAll(t=this.data.rows){k(this,C,"f").data.node.setProperties(t,{isExpanded:true},true);this.refresh()}async getProps(t){return _(this,u,t)}async refresh(){i(this)}async runAutofit(){const t=k(this,W,"f").clientWidth;const e=k(this,W,"f").children[0].clientWidth;const i=.01;const a=85/100*t;const l=95/100*t;let r=1;let n=2e3;let o=e;while((o<a||o>l)&&n>0&&r>i){n--;if(o<a){r=r+i}else if(o>l){r=r-i}else{n=0}o=e*r}k(this,W,"f").style.setProperty("--kup_familytree_scale",r<=1?r.toFixed(2):"1")}async setProps(t){h(this,u,t)}componentWillLoad(){k(this,C,"f").debug.logLoad(this,false);k(this,C,"f").language.register(this);k(this,C,"f").theme.register(this)}componentDidLoad(){k(this,v,"m",$).call(this);if(this.autofitOnLoad){this.runAutofit()}k(this,C,"f").debug.logLoad(this,true)}componentWillRender(){k(this,C,"f").debug.logRender(this,false)}componentDidRender(){if(k(this,T,"f")){g(this,T,false,"f");this.runAutofit()}k(this,C,"f").debug.logRender(this,true)}render(){return a(l,{key:"602bb95f29dfe9e017313b01a3fc485c23dd2f97",onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault();k(this,v,"m",F).call(this,t)},onWheel:t=>{k(this,v,"m",B).call(this,t)}},a("style",{key:"becb707b0e477aff23e752bbb7ce335c01b428bd"},k(this,C,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"aa50336a80b5499f3241b277639bb234c9e3eee5",id:c},k(this,v,"m",R).call(this)))}disconnectedCallback(){k(this,C,"f").language.unregister(this);k(this,C,"f").theme.unregister(this)}get rootElement(){return r(this)}};x=new WeakMap,b=new WeakMap,w=new WeakMap,z=new WeakMap,j=new WeakMap,C=new WeakMap,E=new WeakMap,T=new WeakMap,W=new WeakMap,v=new WeakSet,M=function t(e,i,l,r){const n=[];n.push(a("td",{class:{"family-tree__line":true,"family-tree__line--right":!e,"family-tree__line--top":!e}},a("div",{class:"family-tree__line--placeholder"})));n.push(a("td",{class:{"family-tree__line":true,"family-tree__line--left":e,"family-tree__line--top":e&&!l||r&&!i}},a("div",{class:"family-tree__line--placeholder"})));return n},S=function t(e){var i;let l=null;let r=null;if(!this.collapsible||this.collapsible&&e.isExpanded){(i=e.children)===null||i===void 0?void 0:i.forEach((t=>{if(t.isStaff){if(!r){r=[]}r.push(t)}else{if(!l){l=[]}l.push(t)}}))}const s=this.stackedLeaves&&l&&l.every((t=>!t.children||t.children.length==0));const f=l?l.length*2:1;const _={"family-tree__line":true,"family-tree__line--placeholder":!!(l||r),"family-tree__line--vertical":!!(l||r)};const h={columns:[{name:"*TREECOL",title:"Fake column",visible:false},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]};const m=e.layout||this.layout||1;const c={icon:e.isExpanded?"remove":"plus",shaped:true,slim:true,styling:o.OUTLINED,title:`${k(this,C,"f").language.translate(p.EXPAND)}/${k(this,C,"f").language.translate(p.COLLAPSE)} (CTRL + Click)`,onClick:t=>{if(t.ctrlKey&&e.children&&e.children.length>0){if(e.isExpanded){this.collapseAll(e.children)}else{this.expandAll(e.children)}}e.isExpanded=!e.isExpanded;if(this.autofitOnExpand){g(this,T,true,"f")}this.refresh()},wrapperClass:"family-tree__item__expand"};let u=null;if(k(this,v,"m",A).call(this,m)){u=a("kup-box",{class:"kup-borderless kup-paddingless",customStyle:"#kup-component { background: var(--kup_familytree_item_background_color); border: 2px solid var(--kup_familytree_lines_color); box-sizing: border-box; height: var(--kup_familytree_item_height); padding: 0 var(--kup_familytree_item_h_padding); } #kup-component .box-component { background: var(--kup_familytree_item_background_color); box-sizing: border-box; height: 100%;} #kup-component .f-cell__text { color: var(--kup_familytree_item_color); }",data:h,cardData:this.cardData,layout:this.cardData?null:m,showSelection:false})}const d=a("div",{class:"family-tree__item"},a("div",{class:"family-tree__item__wrapper"},k(this,v,"m",A).call(this,m)?u:k(this,v,"m",D).call(this,e,m),this.collapsible&&e.children&&e.children.length>0?a(n,Object.assign({},c)):undefined));const y={["--kup_familytree_staffchildren"]:(r===null||r===void 0?void 0:r.length.toString())||"0"};return a("table",{class:{"family-tree__node":true,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||e.children.length==0)}},a("tr",null,a("td",{"data-row":e,colSpan:f},d)),a("tr",null,a("td",{colSpan:f},a("div",{class:_}))),r?[a("tr",null,a("td",{colSpan:f},a("div",{class:Object.assign(Object.assign({},_),{"family-tree__line--staff":true}),style:y}),a("div",{class:"family-tree__node__staff",style:y},r.map((e=>[a("div",{class:"family-tree__node__staff__item"},k(this,v,"m",t).call(this,e))])))))]:null,r&&l?[a("tr",null,a("td",{colSpan:f},a("div",{class:_})))]:null,l?[a("tr",null,s?a("td",{colSpan:f},a("div",{class:_})):l.map((t=>k(this,v,"m",M).call(this,l.indexOf(t)==0,l.indexOf(t)==l.length-1,l.length==1,l.length>2)))),a("tr",null,s?a("td",{colSpan:f},l.map((e=>k(this,v,"m",t).call(this,e)))):l.map((e=>a("td",{colSpan:2},k(this,v,"m",t).call(this,e)))))]:undefined)},D=function t(e,i){switch(i){case 2:return k(this,v,"m",O).call(this,e);default:return k(this,v,"m",L).call(this,e)}},L=function t(e){return a("div",{class:`family-tree__item__layout family-tree__item__layout--1`},a("div",{class:"family-tree__item__layout__text__title"},e.value))},O=function t(e){return a("div",{class:`family-tree__item__layout family-tree__item__layout--2`},a("div",{class:"family-tree__item__layout__color"}),a("div",{class:"family-tree__item__layout__image"},a(s,{resource:e.icon,placeholderResource:e.placeholderIcon,sizeX:"48px",sizeY:"48px"})),a("div",{class:"family-tree__item__layout__text"},a("div",{class:"family-tree__item__layout__text__title"},e.value),e.title?a("div",{class:"family-tree__item__layout__text__subtitle"},e.title):null))},P=function t(e){return e.map((t=>k(this,v,"m",S).call(this,t)))},R=function t(){const e=!this.data||!this.data.rows||!this.data.rows.length;return a("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>g(this,W,t,"f")},e?a("div",null,k(this,C,"f").language.translate(p.EMPTY_DATA)):k(this,v,"m",P).call(this,this.data.rows))},A=function t(e){const i=e;return!!this.cardData||i&&i.sections&&i.sections.length>0},F=function t(e){g(this,w,e.clientX,"f");g(this,z,e.clientY,"f");k(this,W,"f").classList.add("family-tree--dragging");const i=()=>{document.removeEventListener("pointermove",k(this,E,"f"));document.removeEventListener("pointerup",i);k(this,W,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",k(this,E,"f"));document.addEventListener("pointerup",i)},X=function t(e,i){let a;let l;if(e){for(let t=e.length-1;t>=0;t--){const i=e[t];if(!i.tagName){continue}if(i.classList.contains("family-tree__item__expand")){a=i}switch(i.tagName.toUpperCase()){case"TD":{l=i;break}}}}let r=null,n=null,o=null;if(l){r=l["data-cell"];n=l["data-column"];o=l["data-row"]}return{cell:r?r:null,column:n?n:null,expandButton:a?a:null,originalEvent:i,row:o?o:null,td:l?l:null}},Y=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},H=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},N=function t(e){const i=k(this,v,"m",X).call(this,k(this,C,"f").getEventPath(e.target,this.rootElement),e);return i},$=function t(){k(this,j,"f").push(this.rootElement);const e=t=>{if(k(this,b,"f")){g(this,b,false,"f");return}switch(t.button){case 0:const e={};for(const i in t){e[i]=t[i]}k(this,x,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",Y).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",H).call(this,t)});break}};const i=t=>{switch(t.button){case 0:for(let t=0;t<k(this,x,"f").length;t++){clearTimeout(k(this,x,"f")[t]);k(this,C,"f").debug.logMessage(this,"Cleared clickHandler timeout("+k(this,x,"f")[t]+").")}g(this,x,[],"f");this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",N).call(this,t)});break}};const a=t=>{if(t.pointerType==="pen"||t.pointerType==="touch"){g(this,b,true,"f");this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:k(this,v,"m",H).call(this,t)})}};k(this,C,"f").interact.on(this.rootElement,m.TAP,e);k(this,C,"f").interact.on(this.rootElement,m.DOUBLETAP,i);k(this,C,"f").interact.on(this.rootElement,m.HOLD,a)},B=function t(e){if(e.ctrlKey){e.preventDefault();const t=parseFloat(k(this,W,"f").style.getPropertyValue("--kup_familytree_scale"))||1;const i=.05;let a=e.deltaY>0?t-i:t+i;if(a<i){a=i}k(this,W,"f").style.setProperty("--kup_familytree_scale",a.toFixed(2))}};U.style=y;export{U as kup_family_tree};
|
|
2
|
+
//# sourceMappingURL=p-b44cdd98.entry.js.map
|
|
@@ -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,aw as g,V as m,E as k}from"./p-f1ccd876.js";import{f as w,p as v,s as y}from"./p-69b1117e.js";import{F as _}from"./p-2b519589.js";import{c as j}from"./p-41373d28.js";import{c as C}from"./p-635bb4b3.js";import{F as z}from"./p-7142f2cb.js";import{p as P,r as M,F as R}from"./p-c4ff4d97.js";import{F as A}from"./p-c4054aba.js";import"./p-029c7cbe.js";import"./p-e3062c19.js";import"./p-5d03c077.js";import"./p-a61546b9.js";import"./p-10dfd311.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,aw as g,V as m,E as k}from"./p-54f6e4df.js";import{f as w,p as v,s as y}from"./p-d5ec4d2e.js";import{F as _}from"./p-2b519589.js";import{c as j}from"./p-0facfbaf.js";import{c as C}from"./p-635bb4b3.js";import{F as z}from"./p-6b225612.js";import{p as P,r as M,F as R}from"./p-df8c4398.js";import{F as A}from"./p-c4054aba.js";import"./p-029c7cbe.js";import"./p-e3062c19.js";import"./p-5d03c077.js";import"./p-2acd1e25.js";import"./p-10dfd311.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-b6589b6a.entry.js.map
|