@sme.up/ketchup 11.0.0-SNAPSHOT-20241016091107 → 11.0.0-SNAPSHOT-20241017090851
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-8eca61f9.js → f-cell-047a1ebb.js} +23 -8
- package/dist/cjs/f-cell-047a1ebb.js.map +1 -0
- package/dist/cjs/{f-chip-657a698b.js → f-chip-a213a741.js} +2 -2
- package/dist/cjs/{f-chip-657a698b.js.map → f-chip-a213a741.js.map} +1 -1
- package/dist/cjs/{f-paginator-utils-e8954368.js → f-paginator-utils-a4a45bfc.js} +2 -2
- package/dist/cjs/{f-paginator-utils-e8954368.js.map → f-paginator-utils-a4a45bfc.js.map} +1 -1
- package/dist/cjs/{f-text-field-a489112a.js → f-text-field-78547f53.js} +2 -2
- package/dist/cjs/{f-text-field-a489112a.js.map → f-text-field-78547f53.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_27.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 +162 -5
- package/dist/cjs/kup-cell.cjs.entry.js.map +1 -1
- package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
- package/dist/cjs/{kup-data-table-helper-e665fbe5.js → kup-data-table-helper-cf31cb4e.js} +2 -2
- package/dist/cjs/{kup-data-table-helper-e665fbe5.js.map → kup-data-table-helper-cf31cb4e.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-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-22be97c0.js → kup-manager-59aafed4.js} +3 -2
- package/dist/cjs/kup-manager-59aafed4.js.map +1 -0
- 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-typography-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography.cjs.entry.js +1 -1
- package/dist/collection/assets/radio.js +20 -0
- package/dist/collection/components/kup-cell/kup-cell.js +2 -2
- package/dist/collection/components/kup-cell/kup-cell.js.map +1 -1
- package/dist/collection/f-components/f-cell/f-cell-declarations.js.map +1 -1
- package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.declarations.js +2 -0
- package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.declarations.js.map +1 -0
- package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.js +162 -0
- package/dist/collection/f-components/f-cell-options.tsx/f-cell-options.js.map +1 -0
- package/dist/collection/f-components/f-radio/f-radio-declarations.js +5 -1
- package/dist/collection/f-components/f-radio/f-radio-declarations.js.map +1 -1
- package/dist/collection/f-components/f-radio/f-radio.js +15 -4
- package/dist/collection/f-components/f-radio/f-radio.js.map +1 -1
- package/dist/collection/managers/kup-data/kup-data-declarations.js.map +1 -1
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js.map +1 -1
- package/dist/components/kup-autocomplete2.js +20 -5
- package/dist/components/kup-autocomplete2.js.map +1 -1
- package/dist/components/kup-cell.js +162 -5
- package/dist/components/kup-cell.js.map +1 -1
- package/dist/components/kup-manager.js +2 -1
- package/dist/components/kup-manager.js.map +1 -1
- package/dist/esm/{f-cell-582be39b.js → f-cell-355ccc61.js} +24 -9
- package/dist/esm/f-cell-355ccc61.js.map +1 -0
- package/dist/esm/{f-chip-add4a0ae.js → f-chip-6fa3ec06.js} +2 -2
- package/dist/esm/{f-chip-add4a0ae.js.map → f-chip-6fa3ec06.js.map} +1 -1
- package/dist/esm/{f-paginator-utils-7b5c0780.js → f-paginator-utils-bd49fb29.js} +2 -2
- package/dist/esm/{f-paginator-utils-7b5c0780.js.map → f-paginator-utils-bd49fb29.js.map} +1 -1
- package/dist/esm/{f-text-field-f2ed44a9.js → f-text-field-25b1eec2.js} +2 -2
- package/dist/esm/{f-text-field-f2ed44a9.js.map → f-text-field-25b1eec2.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_27.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 +164 -7
- package/dist/esm/kup-cell.entry.js.map +1 -1
- package/dist/esm/kup-dashboard.entry.js +2 -2
- package/dist/esm/{kup-data-table-helper-1be99de5.js → kup-data-table-helper-6b828446.js} +2 -2
- package/dist/esm/{kup-data-table-helper-1be99de5.js.map → kup-data-table-helper-6b828446.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-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-82161dea.js → kup-manager-84ac466d.js} +3 -2
- package/dist/esm/kup-manager-84ac466d.js.map +1 -0
- 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-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-39478ede.entry.js → p-060781c0.entry.js} +2 -2
- package/dist/ketchup/{p-b563176c.js → p-06fe42ee.js} +2 -2
- package/dist/ketchup/{p-ab432adb.entry.js → p-0bce5b56.entry.js} +2 -2
- package/dist/ketchup/{p-178c8a26.js → p-0d2bf291.js} +2 -2
- package/dist/ketchup/{p-2e4de380.entry.js → p-10c91f9b.entry.js} +2 -2
- package/dist/ketchup/{p-131dfa03.entry.js → p-1223c713.entry.js} +2 -2
- package/dist/ketchup/{p-1a6acdad.entry.js → p-131be87e.entry.js} +2 -2
- package/dist/ketchup/{p-5340e384.entry.js → p-1be7bf16.entry.js} +2 -2
- package/dist/ketchup/{p-d8c17372.entry.js → p-219488f4.entry.js} +2 -2
- package/dist/ketchup/{p-ac0c9718.entry.js → p-2219138a.entry.js} +2 -2
- package/dist/ketchup/{p-06c56ec4.entry.js → p-2a792585.entry.js} +2 -2
- package/dist/ketchup/{p-2214607f.entry.js → p-35802f68.entry.js} +2 -2
- package/dist/ketchup/{p-c6f65088.entry.js → p-3bb0e4b3.entry.js} +2 -2
- package/dist/ketchup/{p-d002f625.js → p-454b6065.js} +2 -2
- package/dist/ketchup/{p-102bc318.entry.js → p-53fab0f5.entry.js} +2 -2
- package/dist/ketchup/{p-f1fa3169.entry.js → p-5540decd.entry.js} +2 -2
- package/dist/ketchup/{p-bf3b655e.entry.js → p-556618b0.entry.js} +2 -2
- package/dist/ketchup/{p-83dd1290.entry.js → p-56855d4f.entry.js} +2 -2
- package/dist/ketchup/p-68f82cb0.js +2 -0
- package/dist/ketchup/p-68f82cb0.js.map +1 -0
- package/dist/ketchup/{p-11c3f3be.entry.js → p-6c6fc868.entry.js} +2 -2
- package/dist/ketchup/{p-e18a5f0c.entry.js → p-718900c1.entry.js} +2 -2
- package/dist/ketchup/{p-6a87e1d2.entry.js → p-8084cec5.entry.js} +2 -2
- package/dist/ketchup/{p-24b02a70.entry.js → p-81a042dc.entry.js} +2 -2
- package/dist/ketchup/{p-d0774afd.entry.js → p-8aa58b0f.entry.js} +2 -2
- package/dist/ketchup/{p-3788598c.js → p-a670a42e.js} +2 -2
- package/dist/ketchup/p-a670a42e.js.map +1 -0
- package/dist/ketchup/{p-a04245a4.entry.js → p-c8ec502a.entry.js} +2 -2
- package/dist/ketchup/{p-9333a3e6.entry.js → p-dc959676.entry.js} +2 -2
- package/dist/ketchup/p-deea2b0f.entry.js +2 -0
- package/dist/ketchup/p-deea2b0f.entry.js.map +1 -0
- package/dist/ketchup/p-df055087.js +2 -0
- package/dist/ketchup/{p-f106458a.js.map → p-df055087.js.map} +1 -1
- package/dist/ketchup/{p-d57db62b.entry.js → p-e5b4c8ca.entry.js} +2 -2
- package/dist/ketchup/{p-557f3e37.entry.js → p-ef160adf.entry.js} +2 -2
- package/dist/ketchup/{p-e0a0a49c.entry.js → p-f57c4edf.entry.js} +2 -2
- package/dist/ketchup/{p-60c73c17.entry.js → p-ffa43222.entry.js} +2 -2
- package/dist/ketchup/{p-a0875191.entry.js → p-ffbbd115.entry.js} +2 -2
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -1
- package/dist/types/f-components/f-cell-options.tsx/f-cell-options.d.ts +3 -0
- package/dist/types/f-components/f-cell-options.tsx/f-cell-options.declarations.d.ts +19 -0
- package/dist/types/f-components/f-radio/f-radio-declarations.d.ts +5 -0
- package/dist/types/f-components/f-radio/f-radio.d.ts +1 -1
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +3 -0
- package/package.json +1 -1
- package/dist/cjs/f-cell-8eca61f9.js.map +0 -1
- package/dist/cjs/kup-manager-22be97c0.js.map +0 -1
- package/dist/esm/f-cell-582be39b.js.map +0 -1
- package/dist/esm/kup-manager-82161dea.js.map +0 -1
- package/dist/ketchup/p-3788598c.js.map +0 -1
- package/dist/ketchup/p-5dd13932.entry.js +0 -2
- package/dist/ketchup/p-5dd13932.entry.js.map +0 -1
- package/dist/ketchup/p-c42a79a7.js +0 -2
- package/dist/ketchup/p-c42a79a7.js.map +0 -1
- package/dist/ketchup/p-f106458a.js +0 -2
- /package/dist/ketchup/{p-39478ede.entry.js.map → p-060781c0.entry.js.map} +0 -0
- /package/dist/ketchup/{p-b563176c.js.map → p-06fe42ee.js.map} +0 -0
- /package/dist/ketchup/{p-ab432adb.entry.js.map → p-0bce5b56.entry.js.map} +0 -0
- /package/dist/ketchup/{p-178c8a26.js.map → p-0d2bf291.js.map} +0 -0
- /package/dist/ketchup/{p-2e4de380.entry.js.map → p-10c91f9b.entry.js.map} +0 -0
- /package/dist/ketchup/{p-131dfa03.entry.js.map → p-1223c713.entry.js.map} +0 -0
- /package/dist/ketchup/{p-1a6acdad.entry.js.map → p-131be87e.entry.js.map} +0 -0
- /package/dist/ketchup/{p-5340e384.entry.js.map → p-1be7bf16.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d8c17372.entry.js.map → p-219488f4.entry.js.map} +0 -0
- /package/dist/ketchup/{p-ac0c9718.entry.js.map → p-2219138a.entry.js.map} +0 -0
- /package/dist/ketchup/{p-06c56ec4.entry.js.map → p-2a792585.entry.js.map} +0 -0
- /package/dist/ketchup/{p-2214607f.entry.js.map → p-35802f68.entry.js.map} +0 -0
- /package/dist/ketchup/{p-c6f65088.entry.js.map → p-3bb0e4b3.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d002f625.js.map → p-454b6065.js.map} +0 -0
- /package/dist/ketchup/{p-102bc318.entry.js.map → p-53fab0f5.entry.js.map} +0 -0
- /package/dist/ketchup/{p-f1fa3169.entry.js.map → p-5540decd.entry.js.map} +0 -0
- /package/dist/ketchup/{p-bf3b655e.entry.js.map → p-556618b0.entry.js.map} +0 -0
- /package/dist/ketchup/{p-83dd1290.entry.js.map → p-56855d4f.entry.js.map} +0 -0
- /package/dist/ketchup/{p-11c3f3be.entry.js.map → p-6c6fc868.entry.js.map} +0 -0
- /package/dist/ketchup/{p-e18a5f0c.entry.js.map → p-718900c1.entry.js.map} +0 -0
- /package/dist/ketchup/{p-6a87e1d2.entry.js.map → p-8084cec5.entry.js.map} +0 -0
- /package/dist/ketchup/{p-24b02a70.entry.js.map → p-81a042dc.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d0774afd.entry.js.map → p-8aa58b0f.entry.js.map} +0 -0
- /package/dist/ketchup/{p-a04245a4.entry.js.map → p-c8ec502a.entry.js.map} +0 -0
- /package/dist/ketchup/{p-9333a3e6.entry.js.map → p-dc959676.entry.js.map} +0 -0
- /package/dist/ketchup/{p-d57db62b.entry.js.map → p-e5b4c8ca.entry.js.map} +0 -0
- /package/dist/ketchup/{p-557f3e37.entry.js.map → p-ef160adf.entry.js.map} +0 -0
- /package/dist/ketchup/{p-e0a0a49c.entry.js.map → p-f57c4edf.entry.js.map} +0 -0
- /package/dist/ketchup/{p-60c73c17.entry.js.map → p-ffa43222.entry.js.map} +0 -0
- /package/dist/ketchup/{p-a0875191.entry.js.map → p-ffbbd115.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as a,H as s,d as o}from"./p-d7c15b0e.js";import{k as n,g as r,s as c,t as h,ae as l}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,f as i,h as a,H as s,d as o}from"./p-d7c15b0e.js";import{k as n,g as r,s as c,t as h,ae as l}from"./p-a670a42e.js";import{c as p}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var f;(function(t){t["columnsNumber"]="Sets the number of columns.";t["customStyle"]="Custom style of the component.";t["data"]="Actual data of the component.";t["decvalueCol"]="Sets the decimal value column.";t["descrCol"]="Sets the description column.";t["fullWidth"]="Sets whether the component occupies all available width.";t["horizontal"]="Sets whether the cards are placed horizontally or not.";t["iconCol"]="Sets the icon column.";t["iconcolorCol"]="Sets the icon color column.";t["intvalueCol"]="Sets the integer value column.";t["isClickable"]="Sets whether a single card is clickable or not.";t["layoutCol"]="Sets the layout column.";t["measureCol"]="Sets the unit of measure column.";t["textcolorCol"]="Sets the text color column.";t["valueCol"]="Sets the value column.";t["valuecolorCol"]="Sets the value color column."})(f||(f={}));const u=".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_cardlist_cards_max_height:var(--kup-cardlist-cards-max-height, unset);--kup_cardlist_cards_min_height:var(--kup-cardlist-cards-min-height, unset);--kup_cardlist_cards_max_width:var(--kup-cardlist-cards-max-width, unset);--kup_cardlist_cards_min_width:var(--kup-cardlist-cards-min-width, unset);display:block;height:100%;width:100%}#kup-component{height:100%;width:100%}kup-card{max-height:var(--kup_cardlist_cards_max_height);min-height:var(--kup_cardlist_cards_min_height);max-width:var(--kup_cardlist_cards_max_width);min-width:var(--kup_cardlist_cards_min_width)}kup-card.is-clickable{cursor:pointer}kup-grid{--kup-grid-padding:0}";const m=u;var d=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 k;const g=class{constructor(i){t(this,i);this.kupCardListClickEvent=e(this,"kup-cardlist-click",7);k.set(this,n());this.columnsNumber=1;this.customStyle="";this.data=null;this.fullWidth=true;this.horizontal=false;this.descrCol="";this.iconCol="";this.valueCol="";this.measureCol="";this.intvalueCol="";this.decvalueCol="";this.textcolorCol="";this.valuecolorCol="";this.iconcolorCol="";this.layoutCol="";this.isClickable=false}async getProps(t){return r(this,f,t)}async refresh(){i(this)}async setProps(t){c(this,f,t)}componentWillLoad(){d(this,k,"f").debug.logLoad(this,false);d(this,k,"f").theme.register(this)}componentDidLoad(){d(this,k,"f").debug.logLoad(this,true)}componentDidRender(){d(this,k,"f").debug.logRender(this,true)}render(){if(!this.data||!this.data.columns||!this.data.columns.length){return}const t=[];let e,i,o,n,r,c,f,u,m,g;for(let t=0;t<this.data.columns.length;t++){const a=this.data.columns[t];if(a.name){switch(a.name){case this.decvalueCol:e=a;break;case this.descrCol:i=a;break;case this.iconCol:o=a;break;case this.iconcolorCol:n=a;break;case this.intvalueCol:r=a;break;case this.layoutCol:c=a;break;case this.measureCol:f=a;break;case this.textcolorCol:u=a;break;case this.valueCol:m=a;break;case this.valuecolorCol:g=a;break}}}for(let s=0;s<this.data.rows.length;s++){const p=this.data.rows[s];const x={color:[],image:[],text:[]};const y=c&&p.cells[c.name].value?parseInt(p.cells[c.name].value):1;const b=a("kup-card",{class:this.isClickable?"is-clickable":"",customStyle:"#kup-component, .scalable-card { min-height: var(--kup_cardlist_cardsminheight) }",data:x,layoutFamily:h.SCALABLE,layoutNumber:y,key:s,"onKup-card-click":()=>{if(this.isClickable){this.kupCardListClickEvent.emit({comp:this,id:this.rootElement.id,index:s,row:p})}},slot:s.toString()});const w=(t,e,i)=>{if(t){const a=p.cells[t.name];if(a){const s=a.value;switch(e){case"color":x[e][i]=d(this,k,"f").theme.colorCheck(s).hexColor;break;case"image":x[e][i]={resource:s};break;default:x[e][i]=l(t,a);break}}}};switch(y){case 1:w(u,"color",0);w(g,"color",1);w(i,"text",0);w(m,"text",1);break;case 2:w(n,"color",0);w(g,"color",1);w(o,"image",0);w(r,"text",0);w(e,"text",1);w(f,"text",2);break;case 3:w(g,"color",0);w(u,"color",1);w(m,"text",0);w(i,"text",1);break;case 4:w(n,"color",0);w(g,"color",1);w(u,"color",2);w(o,"image",0);w(r,"text",0);w(e,"text",1);w(f,"text",2);w(i,"text",3);break;case 5:w(n,"color",0);w(u,"color",1);w(g,"color",2);w(o,"image",0);w(i,"text",0);w(m,"text",1);break;case 6:w(n,"color",0);w(g,"color",1);w(u,"color",2);w(o,"image",0);w(m,"text",0);w(i,"text",1);break;case 7:w(n,"color",0);w(g,"color",1);w(u,"color",2);w(o,"image",0);w(m,"text",0);w(i,"text",1);break;case 8:w(n,"color",0);w(g,"color",1);w(u,"color",2);w(o,"image",0);w(m,"text",0);w(i,"text",1);break}t.push(b)}return a(s,null,a("style",null,d(this,k,"f").theme.setKupStyle(this.rootElement)),a("div",{id:p},a("kup-grid",{class:`${this.fullWidth?"kup-full-width":""} scalable-cards`,columns:this.columnsNumber,singleLine:this.horizontal},t)))}disconnectedCallback(){d(this,k,"f").theme.unregister(this)}get rootElement(){return o(this)}};k=new WeakMap;g.style=m;export{g as kup_card_list};
|
|
2
|
+
//# sourceMappingURL=p-2219138a.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as s,f as t,h as i,H as e,d as h}from"./p-d7c15b0e.js";import{k as l}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as s,f as t,h as i,H as e,d as h}from"./p-d7c15b0e.js";import{k as l}from"./p-a670a42e.js";import{c as o}from"./p-635bb4b3.js";import"./p-029c7cbe.js";const c=class{constructor(t){s(this,t);this.kupManager=l();this.startTime=performance.now();this.featuresStartTime=null;this.endTime=null;this.content=null;this.customStyle="";this.features={debug:false,language:false,longCycleProp:false,longCycleVar:false,objects:false,objectsFunction:false,theme:false}}async printLifecycleTime(){const s=this.endTime-this.featuresStartTime;const t=this.endTime-this.startTime;this.content="Full lifecycle of this probe ("+this.rootElement.tagName+"#"+this.rootElement.id+") took "+t+"ms, while features took "+s+"ms.";return{id:this.rootElement.id,fullTime:t,featuresTime:s}}async refresh(){t(this)}longCycleProp(){}longCycleVar(){}longCycleObjects(){for(let s=0;s<1e6;s++){this.kupManager.objects.isNumber({t:"NR",p:"",k:""})}}longCycleObjectsFunction(){}componentWillLoad(){this.featuresStartTime=performance.now();if(this.features.debug){this.kupManager.debug.logLoad(this,false)}if(this.features.language){this.kupManager.language.register(this)}if(this.features.longCycleProp){this.longCycleProp()}if(this.features.longCycleVar){this.longCycleVar()}if(this.features.objects){this.longCycleObjects()}if(this.features.objectsFunction){this.longCycleObjectsFunction()}if(this.features.theme){this.kupManager.theme.register(this)}}componentDidLoad(){if(this.features.debug){this.kupManager.debug.logLoad(this,true)}this.endTime=performance.now()}componentWillRender(){if(this.features.debug){this.kupManager.debug.logRender(this,false)}}componentDidRender(){if(this.features.debug){this.kupManager.debug.logRender(this,true)}}render(){let s=null;if(this.features.theme){s=this.kupManager.theme.setKupStyle(this.rootElement)}return i(e,{key:"996ddafe0d4e6423ce2479b9cac0ae323939cb71"},s?i("style",null,s):null,i("div",{key:"39eae7739d080800145c30fa1ce713d131d3352f",id:o},this.content))}disconnectedCallback(){if(this.features.language){this.kupManager.language.unregister(this)}if(this.features.theme){this.kupManager.theme.unregister(this)}}get rootElement(){return h(this)}};export{c as kup_probe};
|
|
2
|
+
//# sourceMappingURL=p-2a792585.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as n,F as a,H as o,d as r}from"./p-d7c15b0e.js";import{k as s,g as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,f as i,h as n,F as a,H as o,d as r}from"./p-d7c15b0e.js";import{k as s,g as p,s as c,ae as l}from"./p-a670a42e.js";import{c as m}from"./p-635bb4b3.js";import{F as f}from"./p-2b519589.js";import{s as h}from"./p-454b6065.js";import"./p-029c7cbe.js";var d;(function(t){t["data"]="Dataset containing the activities list";t["dateColumn"]="Column containing dates";t["timeColumn"]="Column containing times";t["sortOrder"]="Order for sorting"})(d||(d={}));var u;(function(t){t["onClick"]="onClick";t["onRightClick"]="onRightClick"})(u||(u={}));const g='.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}.atm-container{color:var(--kup-gray-color-70)}.atm-container.clickable{cursor:pointer}.atm-container .atm-event{margin-bottom:10px;padding-bottom:25px;display:flex;position:relative;width:100%}.atm-container .atm-event:after{content:"";display:inline-block;width:1px;left:15px;position:absolute;top:0;bottom:0;z-index:1;background:var(--kup-primary-color)}.atm-container .atm-event .atm-icon-wrapper{margin-top:10px}.atm-container .atm-event .atm-thumb{background:var(--kup-primary-color);display:inline-block;vertical-align:top;width:32px;height:32px;border:none;border-radius:var(--kup-radius-00);text-align:center;z-index:10;position:relative;border-bottom-width:2px}.atm-container .atm-event .atm-thumb>span.-atm-icon{vertical-align:middle;line-height:32px;color:white;font-size:20px}.atm-container .atm-event .atm-content{display:inline-block;padding:0 6px 0 10px;vertical-align:top;width:calc(100% - 45px)}.atm-container .atm-event .atm-content .atm-content-header h3.atm-title{margin:0;font-size:15px;line-height:16px;float:left;width:calc(100% - 100px)}.atm-container .atm-event .atm-content .atm-content-header .atm-datetime{font-style:italic;font-size:11px;line-height:16px;float:right;width:100px;text-align:right}.atm-container .atm-event .atm-content .atm-row{max-width:calc(100% - 30px);width:100%;display:grid;grid-template-columns:repeat(8, 1fr);grid-gap:0px 0px;padding-bottom:10px}.atm-container .atm-event .atm-content .atm-row .atm-col{display:flex;align-items:baseline;justify-content:center;gap:3px;width:100%}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col{width:50%}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col h3{margin-bottom:7px;font-size:12px;word-break:break-word;padding-right:6px;font-weight:400}.atm-container .atm-event .atm-content .atm-row .atm-col .atm-inner-col p{font-size:12px;word-break:break-word;text-decoration:underline;color:var(--kup-primary-color);cursor:pointer}@media (max-width: 1799px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(4, 1fr)}.atm-container .atm-event .atm-content .atm-row .atm-col{justify-content:start}}@media (max-width: 1365px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(3, 1fr)}}@media (max-width: 991px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(2, 1fr)}}@media (max-width: 575px){.atm-container .atm-event .atm-content .atm-row{grid-template-columns:repeat(1, 1fr)}}';const x=g;var v=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 y,k,w;const b=class{constructor(i){t(this,i);this.kupClick=e(this,"kup-activitytimeline-click",6);this.kupContextMenu=e(this,"kup-activitytimeline-contextmenu",6);this.kupReady=e(this,"kup-activitytimeline-ready",6);y.add(this);k.set(this,s());this.timeline=[];this.data=undefined;this.dateColumn=undefined;this.sort=[];this.timeColumn=undefined}async getProps(t){return p(this,d,t)}async refresh(){i(this)}async setProps(t){c(this,d,t)}getActivity(t){return{column:this.data.columns.find((e=>e.name===t.columnName)),row:this.data.rows.find((e=>e.id===t.rowId))}}onActivityClick(t,e){this.kupClick.emit({comp:this,id:this.rootElement.id,details:Object.assign(Object.assign({},this.getActivity(e)),{originalEvent:t,type:u.onClick})})}onActivityContextMenu(t,e){this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:Object.assign(Object.assign({},this.getActivity(e)),{originalEvent:t,type:u.onRightClick})})}activityItem(t){return n("div",{class:"atm-row"},t.columns.map((t=>n("div",{class:"atm-col"},n("div",{class:"atm-inner-col"},n("h3",null,t.title,":")),n("div",{class:"atm-inner-col",onClick:e=>{e.stopPropagation();this.onActivityClick(e,t)},onContextMenu:e=>{this.onActivityContextMenu(e,t)}},n("p",null,t.value))))))}calendarIcon(){return n(f,{color:"white",resource:"calendar",wrapperClass:"activity-timeline-item__icon",sizeX:"20px",sizeY:"32px"})}componentWillLoad(){v(this,k,"f").debug.logLoad(this,false);v(this,k,"f").theme.register(this)}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id});v(this,k,"f").debug.logLoad(this,true)}componentWillRender(){v(this,k,"f").debug.logRender(this,false)}componentDidRender(){v(this,k,"f").debug.logRender(this,true)}render(){this.timeline=v(this,y,"m",w).call(this,this.data);return n(o,{key:"19e1cc99991f8eeebf06295ff52cb9c94a6ea470"},n("style",{key:"120f8b51d484c8f41b16b485b4fc205f3d79ea19"},v(this,k,"f").theme.setKupStyle(this.rootElement)),n("div",{key:"655881a54afceccf22a2775b403e57d126894cfc",id:m},n("div",{key:this.rootElement.id,class:"kup-activity-timeline",onContextMenu:t=>{t.preventDefault()}},this.timeline.map((t=>n("div",{class:"atm-container",key:t.date},n("div",{class:"atm-event"},n("div",{class:"atm-icon-wrapper"},n("div",{class:"atm-thumb"},this.calendarIcon())),n("div",{class:"atm-content"},n("div",null,n("h3",null,n("span",null,t.date))),t.activities.map((t=>n(a,null,this.activityItem(t))))))))))))}disconnectedCallback(){v(this,k,"f").theme.unregister(this)}get rootElement(){return r(this)}};k=new WeakMap,y=new WeakSet,w=function t(e){const{columns:i,rows:n}=e;const a=i.find((t=>t.name===this.dateColumn));const o=i.find((t=>t.name===this.timeColumn));if(!a||!o)return[];const r=h(n,this.sort).reduce(((t,e)=>{const n=l(a,e.cells[a.name]);const r=l(o,e.cells[o.name]);const s=`${n} ${r}`;t[s]=t[s]||[];t[s].push({columns:i.filter((t=>t.visible!==false)).map((t=>({title:t.title,value:l(t,e.cells[t.name]),columnName:t.name,rowId:e.id})))});return t}),{});return Object.entries(r).map((([t,e])=>({date:t,activities:e})))};b.style=x;export{b as kup_activity_timeline};
|
|
2
|
+
//# sourceMappingURL=p-35802f68.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{k as a,g as p,s as f,e as h}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
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{k as a,g as p,s as f,e as h}from"./p-a670a42e.js";import"./p-029c7cbe.js";var r;(function(t){t["buttonData"]="Props of the button (when isButton is set to true).";t["isButton"]="The component will be rendered as a button, which opens the link associated to the iframe in another tab when clicked.";t["src"]="The address the iframe should be referencing to."})(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}iframe{box-sizing:border-box;height:100%;width:100%}:host([is-iframe]){box-sizing:border-box;display:block;height:100%;width:100%}";const g=l;const u=class{constructor(e){t(this,e);this.kupIframeError=i(this,"kup-iframe-error",6);this.kupIframeLoad=i(this,"kup-iframe-load",6);this.kupManager=a();this.buttonData={};this.isButton=false;this.src=undefined}onKupIframeError(){this.kupIframeError.emit({comp:this,id:this.rootElement.id})}onKupIframeLoad(){this.kupIframeLoad.emit({comp:this,id:this.rootElement.id})}async getProps(t){return p(this,r,t)}async refresh(){e(this)}async setProps(t){f(this,r,t)}openInNew(){window.open(this.src,"_blank")}componentWillLoad(){this.kupManager.debug.logLoad(this,false)}componentDidLoad(){this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){if(this.src===undefined||this.src===null||this.src===""){let t="Resource undefined, not rendering!";this.kupManager.debug.logMessage(this,t,h.WARNING);return}if(!this.buttonData["icon"]){this.buttonData["icon"]="open_in_new"}if(!this.buttonData["label"]){this.buttonData["label"]="Open in new tab"}return!this.isButton?n(o,{"is-iframe":true},n("iframe",{onError:this.onKupIframeError.bind(this),onLoad:this.onKupIframeLoad.bind(this),src:this.src})):n(o,{"is-button":true},n("kup-button",Object.assign({},this.buttonData,{"onkup-button-click":()=>this.openInNew()})))}get rootElement(){return s(this)}};u.style=g;export{u as kup_iframe};
|
|
2
|
+
//# sourceMappingURL=p-3bb0e4b3.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as e,H as t,D as l,B as n,ae as i,v as r,x as s,ag as o,ah as a,J as u,e as f,F as c,ai as h,aj as d,ak as b,al as p,am as m,a1 as v}from"./p-3788598c.js";import{K as F}from"./p-029c7cbe.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,false)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,true)}_getTextFilterValue(e={},t,l){let n="";if(e==null){return n}let i=e[t];if(i==null){return n}n=l?i.textFieldTmp:i.textField;return n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,false)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,true)}_hasFiltersForColumn(e={},t,l){if(!t){return false}let n=this._getTextFilterValue(e,t.name,l);if(n!=null&&n.trim()!=""){return true}if(this._hasIntervalTextFieldFilterValues(e,t,l)){return true}let i=this.getCheckBoxFilterValues(e,t.name);if(i==null||i.length<1){return false}return true}getCheckBoxFilterValues(e={},t){let l=[];if(e==null){return l}let n=e[t];if(n==null){return l}if(n.checkBoxes==null){return l}l=n.checkBoxes;return l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,false)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,true)}_hasIntervalTextFieldFilterValues(e={},l,n){if(l==null){return false}if(!this.isColumnFiltrableByInterval(l)){return false}let i=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(i!=null&&i.trim()!=""){return true}let r=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);if(r!=null&&r.trim()!=""){return true}return false}addCheckboxFilter(t={},l,n){if(t==null){return}let i=t[l];if(i==null){i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};t[l]=i}if(i.checkBoxes==null){i.checkBoxes=[]}if(n==null||n.value==null){i.checkBoxes=[]}else{if(!e.valuesArrayContainsValue(i.checkBoxes,n.value)){i.checkBoxes[i.checkBoxes.length]=n}}}removeCheckboxFilter(t={},l,n){if(t==null||n==null){return}let i=t[l];if(i==null){return}if(i.checkBoxes==null){i.checkBoxes=[]}let r=e.indexOfValueInValuesArray(i.checkBoxes,n);if(r>=0){let e=[];for(let t=0;t<i.checkBoxes.length;t++){if(t!=r){e[e.length]=i.checkBoxes[t]}}i.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,false)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,true)}_getIntervalTextFieldFilterValues(e={},l,n){if(!this._hasIntervalTextFieldFilterValues(e,l,n)){return["",""]}let i=[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)];return i}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,false)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,true)}_getIntervalTextFieldFilterValue(e={},t,l,n){let i="";if(e==null){return i}let r=e[t];if(r==null){return i}if(n&&r.intervalTmp==null){return i}if(!n&&r.interval==null){return i}i=n?r.intervalTmp[l]:r.interval[l];return i}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,true)}_setTextFieldFilterValue(e={},t,l,n){if(e==null){return}let i=e[t];if(i==null){i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};e[t]=i}if(n){i.textFieldTmp=l!=null?l.trim():l}else{i.textField=l!=null?l.trim():l}}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,true)}_setIntervalTextFieldFilterValue(e={},t,l,n,i){if(e==null){return}let r=e[t];if(r==null){r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};e[t]=r}if(r.interval==null){r.interval=[];r.interval.push("","")}if(r.intervalTmp==null){r.intervalTmp=[];r.intervalTmp.push("","")}if(i){r.intervalTmp[n]=l!=null?l.trim():l}else{r.interval[n]=l!=null?l.trim():l}}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),false);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,false);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,false)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),true);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,true);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,true)}getFilterValueForTooltip(e={},i){let r=this.getTextFilterValue(e,i.name);let s=this.getIntervalTextFieldFilterValues(e,i);let o=this.getCheckBoxFilterValues(e,i.name);let a="";let u=l(r,i.obj,i.decimals);if(r!=""){a=" AND "}if(s[t.FROM]!=""){u+=a+"(>= "+l(s[t.FROM],i.obj,i.decimals)+")";a=" AND "}if(s[t.TO]!=""){u+=a+"(<= "+l(s[t.TO],i.obj,i.decimals)+")";a=" AND "}a="";let f="";o.forEach((e=>{f+=a+n(e,i);a=" OR "}));if(f!=""){f="("+f+")";if(u!=""){f=" AND "+f}}f=u+f;return f}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var x;(function(e){e["asAccordion"]="When enabled, the first level of depth will give an accordion look to nodes.";e["columns"]="The columns of the tree when tree visualization is active.";e["customStyle"]="Custom style of the component.";e["data"]="The json data used to populate the tree view: the basic, always visible tree nodes.";e["density"]="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.";e["dynamicExpansionCallback"]="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.";e["enableExtraColumns"]="Enables adding extra columns.";e["expanded"]="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.";e["expansionMode"]="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.";e["filters"]="List of filters set by the user.";e["globalFilter"]="When set to true it activates the global filter.";e["globalFilterValue"]="The value of the global filter.";e["globalFilterMode"]="The mode of the global filter.";e["removableColumns"]="Sets the possibility to remove the selected column.";e["preventXScroll"]="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.";e["ripple"]="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).";e["scrollOnHover"]="Activates the scroll on hover function.";e["showColumns"]="Shows the tree data as a table.";e["showFilters"]="When set to true enables the column filters.";e["showFooter"]="When set to true shows the footer.";e["showHeader"]="Flag: shows the header of the tree when the tree is displayed as a table.";e["showIcons"]="Shows the icons of the nodes.";e["stateId"]="";e["store"]="";e["totals"]="Defines the current totals options.";e["useDynamicExpansion"]="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."})(x||(x={}));const T="TREE_COLUMN";var k;(function(e){e["DROPDOWN"]="dropdown";e["NODE"]="node"})(k||(k={}));const g=document.documentElement;const j=g.ketchup?g.ketchup.objects:new s;const y=g.ketchup?g.ketchup.data:new o;class O extends e{isFilterCompliantForCell(e,t,l){if(!e){return false}return this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){if(!e){return false}if(!e.obj){return false}return this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=false,i=[],r){return this.areCellsCompliant(e.cells,t,l,n,i,r)}areCellsCompliant(e,t={},l="",n=false,s=[],o){if(n){let t=true;if(s&&s!=null&&s.length>0){t=false;let n=this.filterIsNegative(l);for(let r=0;r<s.length;r++){if(s[r].visible==false){continue}const o=e[s[r].name];if(o==null){continue}t=this.isFilterCompliantForValue(o.value,l);let a=i(s[r],o);if(a!=o.value){t=t||this.isFilterCompliantForValue(a,l)}if(t==true&&!n){break}if(t==false&&n){break}}}if(!t){return false}}if(o==null){o=new w}if(!this.hasFilters(t,s,o)){return true}let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const i=e[n];if(!i){return false}let u=o.getTextFilterValue(t,n);let f=o.getIntervalTextFieldFilterValues(t,r(s,n));const c=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(i,u,f);let d=c;if(!j.isNumber(i.obj)&&!j.isDate(i.obj)&&!j.isTime(i.obj)&&!j.isTimestamp(i.obj)){d=this.isFilterCompliantForCellObj(i,u,f)}if(c){if(!h||!d){return false}}else{if(!h&&!d){return false}}let b=o.getCheckBoxFilterValues(t,n);if(b.length==0){continue}let p=false;for(let e=0;e<b.length;e++){let t=b[e];if(t==null||t.value==null){continue}if(i.value!=null){if(i.value.toLowerCase().trim()==t.value.toLowerCase().trim()){p=true;break}}if(i.obj!=null){if(i.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){p=true;break}}}if(!p){return false}}return true}hasFilters(e={},t,l){if(e==null){return false}let n=Object.keys(e);if(n==null||n.length<1){return false}if(l==null){l=new w}for(let i=0;i<n.length;i++){let s=n[i];let o=null;if(s===T){o={name:T,title:""}}else{o=r(t,s)}if(l.hasFiltersForColumn(e,o)){return true}}return false}filterRows(e=[],t={},l="",n=[],i){if(!e||e==null){return[]}let r=[];const s=!!(l&&n);if(this.hasFilters(t,n,i)||s){for(let o=0;o<e.length;o++){let a=e[o];if(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,s,n,i)){r[r.length]=a}}}else{r=[...e]}return r}getColumnValues(t,n,i,r){let s=new Array;if(r==null){r=new w}let o=r.getTextFilterValueTmp(t.filters,n.name);let a=r.getIntervalTextFieldFilterValuesTmp(t.filters,n);let u=r.getCheckBoxFilterValues(t.filters,n.name);if(n.valuesForFilter!=null&&n.valuesForFilter.length>0){n.valuesForFilter.forEach((t=>{let i=t;if(e.valuesArrayContainsValue(u,i)||o==""||r.isFilterCompliantForSimpleValue(i,n.obj,o,a)){s.push({value:i,displayedValue:l(i,n.obj,n.decimals)})}}));return s}let f=Object.assign({},t.filters);f[n.name]={textField:o,textFieldTmp:o,checkBoxes:[],interval:a,intervalTmp:a};let c=this.filterRows(t.getRows(),f,i,t.getVisibleColumns(),r);for(let e=0;e<u.length;e++){s.push(u[e])}return y.cell.getUnivocalValue({rows:c},n,true)}}const V=document.documentElement;function C(e=[],t=[]){if(!e||e.length===0){return[]}if(e[0].group){return I(e,t)}if(!t||t.length===0){return e}const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const i=M(e,n,t[l]);if(i!==0){return i}}return 0}else{return M(e,n,t[0])}}))}function I(e=[],t=[]){if(!e||e.length===0){return[]}const l=e[0].group.column;let n=B(l,t);if(!n){n={column:l,sortMode:v.A}}e.sort(((e,t)=>{const l={obj:e.group.obj,value:e.group.id};const i={obj:t.group.obj,value:t.group.id};return a(l,i,n.sortMode)}));e.forEach((e=>{e.group.children=C(e.group.children,t)}));return e}function B(e="",t=[]){if(!e||!t||t.length===0){return null}for(let l of t){if(l.column===e){return l}}return null}function M(e,t,l){const n=e.cells[l.column];const i=t.cells[l.column];if(!n&&!i){return 0}if(!n){return 1}if(!i){return-1}return a(n,i,l.sortMode)}function N(e=[],t={},l="",n=[],i,r){if(r==null){r=new O}return r.filterRows(e,t,l,n,i)}function _(e=[],t=[],l=[],n={}){if(!t){return[]}if(!l||l.length===0||!e||e.length===0){return t}const s={};const o=l.filter((({column:t})=>{for(let{name:l,title:n}of e){if(l===t){s[l]=n;return true}}return false}));if(o.length===0){return t}const a=[];let f={};t.forEach((t=>{const l=o[0].column;const u=t.cells[l];if(u){const c=r(e,l);const h=i(c,u);const d=u.value;let b=null;for(let e of a){if(e.group.label===h){b=e;break}}if(b===null){b={group:{id:d,parent:null,column:l,columnLabel:s[l],expanded:false,label:h,children:[],obj:u.obj,totals:{}},cells:{}};a.push(b)}for(let l=1;l<o.length;l++){const n=o[l];const a=t.cells[n.column];if(a){const t=r(e,n.column);const l=i(t,a);const o=a.value;let u=null;for(let e=0;e<b.group.children.length;e++){const t=b.group.children[e];const n=t.group.label;if(n===l){u=t;break}}if(!u){u={cells:{},group:{id:o,parent:b,column:n.column,columnLabel:s[n.column],children:[],expanded:false,label:l,totals:{},obj:a.obj}};R(u);b.group.children.push(u)}b=u}}b.group.children.push(t);A(b,n,t,f)}}));D(a,n,f);S(a,u.AVERAGE,n);S(a,u.MATH,n);return a}function A(e,t,l,n){if(!e||!t){return}const i=Object.keys(t);if(i.length===0){return}i.forEach((i=>{const r=l.cells[i];if(r){const l=V.ketchup.objects.isNumber(r.obj);const s=t[i];switch(s){case u.COUNT:let t=e.group.totals[i]||0;e.group.totals[i]=++t;let o=e.group.parent;while(o!=null){let e=o.group.totals[i]||0;o.group.totals[i]=++e;o=o.group.parent}break;case u.DISTINCT:let a;if(l){a=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value))}else{a=r.value}let f=n[e.group.id];if(!f){n[e.group.id]={};n[e.group.id][i]=[];n[e.group.id][i].push(a)}else{let t=n[e.group.id][i];if(!t){n[e.group.id][i]=[];n[e.group.id][i].push(a)}else{t.push(a)}}let c=e.group.parent;while(c!=null){let e=n[c.group.id];if(!e){n[c.group.id]={};n[c.group.id][i]=[];n[c.group.id][i].push(a)}else{let e=n[c.group.id][i];if(!e){n[c.group.id][i]=[];n[c.group.id][i].push(a)}else{e.push(a)}}c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l&&r.value){const t=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));const l=e.group.totals[i]||0;e.group.totals[i]=t+l;let n=e.group.parent;while(n!=null){const e=V.ketchup.math.numberify(n.group.totals[i]||0);n.group.totals[i]=t+e;n=n.group.parent}}break;case u.MIN:if(l&&r.value){const t=e.group.totals[i];const l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));if(t){e.group.totals[i]=Math.min(t,l)}else{e.group.totals[i]=l}let n=e.group.parent;while(n!=null){const e=n.group.totals[i];if(e){n.group.totals[i]=Math.min(e,l)}else{n.group.totals[i]=l}n=n.group.parent}}else if(r.value&&V.ketchup.objects.isDate(r.obj)){if(V.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[i];if(t){let l=[];l.push(a);l.push(V.ketchup.dates.toDayjs(t));e.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.min(l),F.ISO_DATE)}else{e.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}let l=e.group.parent;while(l!=null){const e=l.group.totals[i];if(e){let t=[];t.push(a);t.push(V.ketchup.dates.toDayjs(e));l.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else{l.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}l=l.group.parent}}}break;case u.MAX:if(l&&r.value){const t=e.group.totals[i];const l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));if(t){e.group.totals[i]=Math.max(t,l)}else{e.group.totals[i]=l}let n=e.group.parent;while(n!=null){const e=n.group.totals[i];if(e){n.group.totals[i]=Math.max(e,l)}else{n.group.totals[i]=l}n=n.group.parent}}else if(r.value&&V.ketchup.objects.isDate(r.obj)){if(V.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[i];if(t){let l=[];l.push(a);l.push(V.ketchup.dates.toDayjs(t));e.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.max(l),F.ISO_DATE)}else{e.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}let l=e.group.parent;while(l!=null){const e=l.group.totals[i];if(e){let t=[];t.push(a);t.push(V.ketchup.dates.toDayjs(e));l.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else{l.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}l=l.group.parent}}}break;default:{if(s.indexOf(u.MATH)!=0){console.warn(`invalid total mode: ${s}`)}break}}}}))}function D(e,t,l){if(!e||!t){return}const n=Object.keys(t);if(e.length===0||!e[0].group||n.length===0){return}let i=n.filter((e=>u.DISTINCT===t[e]));if(i.length>0){e.filter((e=>e.group.children.length>0)).forEach((e=>W(e,i,l)))}}function S(e,t,l){if(!e||!l){return}const n=Object.keys(l);if(e.length===0||!e[0].group||n.length===0){return}let i;if(t==u.AVERAGE){i=n.filter((e=>u.AVERAGE===l[e]))}if(t==u.MATH){i=n.filter((e=>l[e].indexOf(u.MATH)==0))}if(i.length>0){e.filter((e=>e.group.children.length>0)).forEach((e=>E(e,t,i,l)))}}function W(e,t,l){const n=e.group.children;if(n.length===0){return}if(n[0].group){n.forEach((e=>{W(e,t,l)}))}t.forEach((t=>{const n=l[e.group.id][t];e.group.totals[t]=new Set(n).size}))}function E(e,t,l,n){const i=e.group.children;if(i.length===0){return 0}let r=0;if(i[0].group){i.forEach((e=>{r+=E(e,t,l,n)}))}else{r=i.length}l.forEach((l=>{if(t==u.AVERAGE){e.group.totals[l]=e.group.totals[l]/r}if(t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=V.ketchup.math.formulas.custom(t,e.group.totals)}}));return r}function L(e,t){if(t){const l=Object.assign(t);t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];if(l&&e.obj&&!l.obj){l.obj={t:e.obj.t,p:e.obj.p,k:l.value}}}}))}));return l}else{return undefined}}function $(e=[],t={}){if(V.ketchup.objects.isEmptyJsObject(e)||V.ketchup.objects.isEmptyJsObject(t)){return{}}const l=Object.keys(t);const n={};const i=new Array;let r=l.length===0||l.every((e=>t[e]===u.COUNT));if(r){l.forEach((t=>n[t]=e.length))}else{let r={};e.forEach(((e,s,o)=>{l.filter((e=>u.COUNT!==t[e]&&t[e].indexOf(u.MATH)!=0)).forEach((l=>{const a=e.cells[l];if(a){if(t[l]===u.DISTINCT){let e;if(V.ketchup.objects.isNumber(a.obj)){e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value))}else{e=a.value}let t=r[l];if(!t){r[l]=[];r[l].push(e)}else{t.push(e)}}else if(V.ketchup.objects.isNumber(a.obj)){const e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value));let i=n[l];switch(true){case t[l]===u.MIN:if(i){n[l]=Math.min(i,e)}else{n[l]=e}break;case t[l]===u.MAX:if(i){n[l]=Math.max(i,e)}else{n[l]=e}break;default:i=n[l]||0;n[l]=e+V.ketchup.math.numberify(i)}}else if(V.ketchup.objects.isDate(a.obj)){if(i.indexOf(l)==-1){i.push(l)}if(V.ketchup.dates.isValidFormattedStringDate(a.value)){const e=V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(a.value));const i=n[l]?V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(n[l])):null;switch(true){case t[l]===u.MIN:if(i){let t=[];t.push(e);t.push(i);n[l]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else{n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}break;case t[l]===u.MAX:if(i){let t=[];t.push(e);t.push(i);n[l]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else{n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}break}}}}if(s===o.length-1&&t[l]===u.DISTINCT){n[l]=new Set(r[l]).size;r[l]=[]}}))}))}for(let r of l){switch(true){case t[r]===u.AVERAGE:const l=n[r];if(l&&e.length>0){n[r]=l/e.length}break;case t[r]===u.COUNT:n[r]=e.length;break;case t[r].indexOf(u.MATH)==0:n[r]=V.ketchup.math.formulas.custom(t[r].substring(u.MATH.length),n);break}if(n[r]){if(i.indexOf(r)!=-1){n[r]=V.ketchup.dates.format(n[r])}else if(V.ketchup.math.isNumber(n[r])){n[r]=+n[r].toFixed(2)}}}return n}function R(e){if(!e.group){return}let t=e.group.id;let l=e.group.parent;while(l!==null){t=`${l.group.id};${t}`;l=l.group.parent}e.group.id=t}function q(e,t,l,n){const i=t*l-l;const r=i+Number(l);if(n==false){return e.slice(i,r)}let s=[];z(e,s,i,Number(l),0);return s}function z(e,t,l,n,i){let r=false;for(let s=0;s<e.length;s++){let o=e[s];let a=J(e[s]);if(o.group!=null&&o.group.children!=null&&o.group.children.length>0){a.group.children=[];let e=z(o.group.children,a.group.children,l,n,i);i=e.ci;r=e.added;if(r==true){t[t.length]=a}}else{if(i>=l){t[t.length]=a;r=true}i++}if(i>=l+n){break}}return{ci:i,added:r}}function J(e){if(e==null){return null}else{return{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:H(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}}function K(e){if(e==null){return null}let t=[];for(let l=0;l<e.length;l++){t[t.length]=J(e[l])}return t}function H(e){if(e==null){return null}let t={id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:K(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)};return t}function U(e,t,l=false){const n={columns:t.columns,rows:[]};for(const i of t.rows){const r={cells:{},id:i.id};for(const l of t.columns){const t=l.name;const n=i.cells[t];const s=e.rows.find((e=>e.id===i.id));const o=s?s.cells[t]:null;if(!o||n.value!==o.value){r.cells[t]=n}}if(Object.keys(r.cells).length>0||l){n.rows.push(r)}}return n}function G(e){var t;(t=e.rows)===null||t===void 0?void 0:t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var l;let n=e.cells[t];const i=n.value;const r=n["options"];n.isEditable=(l=n.isEditable)!==null&&l!==void 0?l:n["editable"];if(r){const e={[c.AUTOCOMPLETE]:()=>h(i,"",r),[c.COMBOBOX]:()=>h(i,"",r),[c.RADIO]:()=>d(i,r),[c.CHECKBOX]:()=>b(i,r),[c.CHIP]:()=>p(i),[c.SWITCH]:()=>m(i,"")};const t=e[n.shape];if(t){n.data=t()}else{if(n.shape){V.ketchup.debug.logMessage("kup-data",`Shape specified ${n.shape} in cell ${JSON.stringify(n)} unsupported`,f.WARNING)}}}}))}))}export{w as F,k as K,O as a,_ as b,$ as c,G as d,x as e,N as f,U as g,L as n,q as p,C as s,T as t};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{C as e,H as t,D as l,B as n,ae as i,v as r,x as s,ag as o,ah as a,J as u,e as f,F as c,ai as h,aj as d,ak as b,al as p,am as m,a1 as v}from"./p-a670a42e.js";import{K as F}from"./p-029c7cbe.js";class w extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,false)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,true)}_getTextFilterValue(e={},t,l){let n="";if(e==null){return n}let i=e[t];if(i==null){return n}n=l?i.textFieldTmp:i.textField;return n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,false)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,true)}_hasFiltersForColumn(e={},t,l){if(!t){return false}let n=this._getTextFilterValue(e,t.name,l);if(n!=null&&n.trim()!=""){return true}if(this._hasIntervalTextFieldFilterValues(e,t,l)){return true}let i=this.getCheckBoxFilterValues(e,t.name);if(i==null||i.length<1){return false}return true}getCheckBoxFilterValues(e={},t){let l=[];if(e==null){return l}let n=e[t];if(n==null){return l}if(n.checkBoxes==null){return l}l=n.checkBoxes;return l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,false)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,true)}_hasIntervalTextFieldFilterValues(e={},l,n){if(l==null){return false}if(!this.isColumnFiltrableByInterval(l)){return false}let i=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(i!=null&&i.trim()!=""){return true}let r=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);if(r!=null&&r.trim()!=""){return true}return false}addCheckboxFilter(t={},l,n){if(t==null){return}let i=t[l];if(i==null){i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};t[l]=i}if(i.checkBoxes==null){i.checkBoxes=[]}if(n==null||n.value==null){i.checkBoxes=[]}else{if(!e.valuesArrayContainsValue(i.checkBoxes,n.value)){i.checkBoxes[i.checkBoxes.length]=n}}}removeCheckboxFilter(t={},l,n){if(t==null||n==null){return}let i=t[l];if(i==null){return}if(i.checkBoxes==null){i.checkBoxes=[]}let r=e.indexOfValueInValuesArray(i.checkBoxes,n);if(r>=0){let e=[];for(let t=0;t<i.checkBoxes.length;t++){if(t!=r){e[e.length]=i.checkBoxes[t]}}i.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,false)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,true)}_getIntervalTextFieldFilterValues(e={},l,n){if(!this._hasIntervalTextFieldFilterValues(e,l,n)){return["",""]}let i=[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)];return i}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,false)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,true)}_getIntervalTextFieldFilterValue(e={},t,l,n){let i="";if(e==null){return i}let r=e[t];if(r==null){return i}if(n&&r.intervalTmp==null){return i}if(!n&&r.interval==null){return i}i=n?r.intervalTmp[l]:r.interval[l];return i}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,true)}_setTextFieldFilterValue(e={},t,l,n){if(e==null){return}let i=e[t];if(i==null){i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};e[t]=i}if(n){i.textFieldTmp=l!=null?l.trim():l}else{i.textField=l!=null?l.trim():l}}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,true)}_setIntervalTextFieldFilterValue(e={},t,l,n,i){if(e==null){return}let r=e[t];if(r==null){r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null};e[t]=r}if(r.interval==null){r.interval=[];r.interval.push("","")}if(r.intervalTmp==null){r.intervalTmp=[];r.intervalTmp.push("","")}if(i){r.intervalTmp[n]=l!=null?l.trim():l}else{r.interval[n]=l!=null?l.trim():l}}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),false);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,false);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,false)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),true);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,true);this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,true)}getFilterValueForTooltip(e={},i){let r=this.getTextFilterValue(e,i.name);let s=this.getIntervalTextFieldFilterValues(e,i);let o=this.getCheckBoxFilterValues(e,i.name);let a="";let u=l(r,i.obj,i.decimals);if(r!=""){a=" AND "}if(s[t.FROM]!=""){u+=a+"(>= "+l(s[t.FROM],i.obj,i.decimals)+")";a=" AND "}if(s[t.TO]!=""){u+=a+"(<= "+l(s[t.TO],i.obj,i.decimals)+")";a=" AND "}a="";let f="";o.forEach((e=>{f+=a+n(e,i);a=" OR "}));if(f!=""){f="("+f+")";if(u!=""){f=" AND "+f}}f=u+f;return f}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var x;(function(e){e["asAccordion"]="When enabled, the first level of depth will give an accordion look to nodes.";e["columns"]="The columns of the tree when tree visualization is active.";e["customStyle"]="Custom style of the component.";e["data"]="The json data used to populate the tree view: the basic, always visible tree nodes.";e["density"]="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.";e["dynamicExpansionCallback"]="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.";e["enableExtraColumns"]="Enables adding extra columns.";e["expanded"]="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.";e["expansionMode"]="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.";e["filters"]="List of filters set by the user.";e["globalFilter"]="When set to true it activates the global filter.";e["globalFilterValue"]="The value of the global filter.";e["globalFilterMode"]="The mode of the global filter.";e["removableColumns"]="Sets the possibility to remove the selected column.";e["preventXScroll"]="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.";e["ripple"]="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).";e["scrollOnHover"]="Activates the scroll on hover function.";e["showColumns"]="Shows the tree data as a table.";e["showFilters"]="When set to true enables the column filters.";e["showFooter"]="When set to true shows the footer.";e["showHeader"]="Flag: shows the header of the tree when the tree is displayed as a table.";e["showIcons"]="Shows the icons of the nodes.";e["stateId"]="";e["store"]="";e["totals"]="Defines the current totals options.";e["useDynamicExpansion"]="When the component must use the dynamic expansion feature to open its nodes, it means that not all the nodes of the tree have been passed inside the data property. Therefore, when expanding a node, the tree must emit an event (or run a given callback) and wait for the child nodes to be downloaded from the server."})(x||(x={}));const T="TREE_COLUMN";var k;(function(e){e["DROPDOWN"]="dropdown";e["NODE"]="node"})(k||(k={}));const g=document.documentElement;const j=g.ketchup?g.ketchup.objects:new s;const y=g.ketchup?g.ketchup.data:new o;class O extends e{isFilterCompliantForCell(e,t,l){if(!e){return false}return this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){if(!e){return false}if(!e.obj){return false}return this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=false,i=[],r){return this.areCellsCompliant(e.cells,t,l,n,i,r)}areCellsCompliant(e,t={},l="",n=false,s=[],o){if(n){let t=true;if(s&&s!=null&&s.length>0){t=false;let n=this.filterIsNegative(l);for(let r=0;r<s.length;r++){if(s[r].visible==false){continue}const o=e[s[r].name];if(o==null){continue}t=this.isFilterCompliantForValue(o.value,l);let a=i(s[r],o);if(a!=o.value){t=t||this.isFilterCompliantForValue(a,l)}if(t==true&&!n){break}if(t==false&&n){break}}}if(!t){return false}}if(o==null){o=new w}if(!this.hasFilters(t,s,o)){return true}let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const i=e[n];if(!i){return false}let u=o.getTextFilterValue(t,n);let f=o.getIntervalTextFieldFilterValues(t,r(s,n));const c=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(i,u,f);let d=c;if(!j.isNumber(i.obj)&&!j.isDate(i.obj)&&!j.isTime(i.obj)&&!j.isTimestamp(i.obj)){d=this.isFilterCompliantForCellObj(i,u,f)}if(c){if(!h||!d){return false}}else{if(!h&&!d){return false}}let b=o.getCheckBoxFilterValues(t,n);if(b.length==0){continue}let p=false;for(let e=0;e<b.length;e++){let t=b[e];if(t==null||t.value==null){continue}if(i.value!=null){if(i.value.toLowerCase().trim()==t.value.toLowerCase().trim()){p=true;break}}if(i.obj!=null){if(i.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){p=true;break}}}if(!p){return false}}return true}hasFilters(e={},t,l){if(e==null){return false}let n=Object.keys(e);if(n==null||n.length<1){return false}if(l==null){l=new w}for(let i=0;i<n.length;i++){let s=n[i];let o=null;if(s===T){o={name:T,title:""}}else{o=r(t,s)}if(l.hasFiltersForColumn(e,o)){return true}}return false}filterRows(e=[],t={},l="",n=[],i){if(!e||e==null){return[]}let r=[];const s=!!(l&&n);if(this.hasFilters(t,n,i)||s){for(let o=0;o<e.length;o++){let a=e[o];if(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,s,n,i)){r[r.length]=a}}}else{r=[...e]}return r}getColumnValues(t,n,i,r){let s=new Array;if(r==null){r=new w}let o=r.getTextFilterValueTmp(t.filters,n.name);let a=r.getIntervalTextFieldFilterValuesTmp(t.filters,n);let u=r.getCheckBoxFilterValues(t.filters,n.name);if(n.valuesForFilter!=null&&n.valuesForFilter.length>0){n.valuesForFilter.forEach((t=>{let i=t;if(e.valuesArrayContainsValue(u,i)||o==""||r.isFilterCompliantForSimpleValue(i,n.obj,o,a)){s.push({value:i,displayedValue:l(i,n.obj,n.decimals)})}}));return s}let f=Object.assign({},t.filters);f[n.name]={textField:o,textFieldTmp:o,checkBoxes:[],interval:a,intervalTmp:a};let c=this.filterRows(t.getRows(),f,i,t.getVisibleColumns(),r);for(let e=0;e<u.length;e++){s.push(u[e])}return y.cell.getUnivocalValue({rows:c},n,true)}}const V=document.documentElement;function C(e=[],t=[]){if(!e||e.length===0){return[]}if(e[0].group){return I(e,t)}if(!t||t.length===0){return e}const l=t.length>1;return e.slice(0).sort(((e,n)=>{if(l){for(let l=0;l<t.length;l++){const i=M(e,n,t[l]);if(i!==0){return i}}return 0}else{return M(e,n,t[0])}}))}function I(e=[],t=[]){if(!e||e.length===0){return[]}const l=e[0].group.column;let n=B(l,t);if(!n){n={column:l,sortMode:v.A}}e.sort(((e,t)=>{const l={obj:e.group.obj,value:e.group.id};const i={obj:t.group.obj,value:t.group.id};return a(l,i,n.sortMode)}));e.forEach((e=>{e.group.children=C(e.group.children,t)}));return e}function B(e="",t=[]){if(!e||!t||t.length===0){return null}for(let l of t){if(l.column===e){return l}}return null}function M(e,t,l){const n=e.cells[l.column];const i=t.cells[l.column];if(!n&&!i){return 0}if(!n){return 1}if(!i){return-1}return a(n,i,l.sortMode)}function N(e=[],t={},l="",n=[],i,r){if(r==null){r=new O}return r.filterRows(e,t,l,n,i)}function _(e=[],t=[],l=[],n={}){if(!t){return[]}if(!l||l.length===0||!e||e.length===0){return t}const s={};const o=l.filter((({column:t})=>{for(let{name:l,title:n}of e){if(l===t){s[l]=n;return true}}return false}));if(o.length===0){return t}const a=[];let f={};t.forEach((t=>{const l=o[0].column;const u=t.cells[l];if(u){const c=r(e,l);const h=i(c,u);const d=u.value;let b=null;for(let e of a){if(e.group.label===h){b=e;break}}if(b===null){b={group:{id:d,parent:null,column:l,columnLabel:s[l],expanded:false,label:h,children:[],obj:u.obj,totals:{}},cells:{}};a.push(b)}for(let l=1;l<o.length;l++){const n=o[l];const a=t.cells[n.column];if(a){const t=r(e,n.column);const l=i(t,a);const o=a.value;let u=null;for(let e=0;e<b.group.children.length;e++){const t=b.group.children[e];const n=t.group.label;if(n===l){u=t;break}}if(!u){u={cells:{},group:{id:o,parent:b,column:n.column,columnLabel:s[n.column],children:[],expanded:false,label:l,totals:{},obj:a.obj}};R(u);b.group.children.push(u)}b=u}}b.group.children.push(t);A(b,n,t,f)}}));D(a,n,f);S(a,u.AVERAGE,n);S(a,u.MATH,n);return a}function A(e,t,l,n){if(!e||!t){return}const i=Object.keys(t);if(i.length===0){return}i.forEach((i=>{const r=l.cells[i];if(r){const l=V.ketchup.objects.isNumber(r.obj);const s=t[i];switch(s){case u.COUNT:let t=e.group.totals[i]||0;e.group.totals[i]=++t;let o=e.group.parent;while(o!=null){let e=o.group.totals[i]||0;o.group.totals[i]=++e;o=o.group.parent}break;case u.DISTINCT:let a;if(l){a=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value))}else{a=r.value}let f=n[e.group.id];if(!f){n[e.group.id]={};n[e.group.id][i]=[];n[e.group.id][i].push(a)}else{let t=n[e.group.id][i];if(!t){n[e.group.id][i]=[];n[e.group.id][i].push(a)}else{t.push(a)}}let c=e.group.parent;while(c!=null){let e=n[c.group.id];if(!e){n[c.group.id]={};n[c.group.id][i]=[];n[c.group.id][i].push(a)}else{let e=n[c.group.id][i];if(!e){n[c.group.id][i]=[];n[c.group.id][i].push(a)}else{e.push(a)}}c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l&&r.value){const t=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));const l=e.group.totals[i]||0;e.group.totals[i]=t+l;let n=e.group.parent;while(n!=null){const e=V.ketchup.math.numberify(n.group.totals[i]||0);n.group.totals[i]=t+e;n=n.group.parent}}break;case u.MIN:if(l&&r.value){const t=e.group.totals[i];const l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));if(t){e.group.totals[i]=Math.min(t,l)}else{e.group.totals[i]=l}let n=e.group.parent;while(n!=null){const e=n.group.totals[i];if(e){n.group.totals[i]=Math.min(e,l)}else{n.group.totals[i]=l}n=n.group.parent}}else if(r.value&&V.ketchup.objects.isDate(r.obj)){if(V.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[i];if(t){let l=[];l.push(a);l.push(V.ketchup.dates.toDayjs(t));e.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.min(l),F.ISO_DATE)}else{e.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}let l=e.group.parent;while(l!=null){const e=l.group.totals[i];if(e){let t=[];t.push(a);t.push(V.ketchup.dates.toDayjs(e));l.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else{l.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}l=l.group.parent}}}break;case u.MAX:if(l&&r.value){const t=e.group.totals[i];const l=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(r.value));if(t){e.group.totals[i]=Math.max(t,l)}else{e.group.totals[i]=l}let n=e.group.parent;while(n!=null){const e=n.group.totals[i];if(e){n.group.totals[i]=Math.max(e,l)}else{n.group.totals[i]=l}n=n.group.parent}}else if(r.value&&V.ketchup.objects.isDate(r.obj)){if(V.ketchup.dates.isValidFormattedStringDate(r.value)){const t=e.group.totals[i];if(t){let l=[];l.push(a);l.push(V.ketchup.dates.toDayjs(t));e.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.max(l),F.ISO_DATE)}else{e.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}let l=e.group.parent;while(l!=null){const e=l.group.totals[i];if(e){let t=[];t.push(a);t.push(V.ketchup.dates.toDayjs(e));l.group.totals[i]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else{l.group.totals[i]=V.ketchup.dates.format(a,F.ISO_DATE)}l=l.group.parent}}}break;default:{if(s.indexOf(u.MATH)!=0){console.warn(`invalid total mode: ${s}`)}break}}}}))}function D(e,t,l){if(!e||!t){return}const n=Object.keys(t);if(e.length===0||!e[0].group||n.length===0){return}let i=n.filter((e=>u.DISTINCT===t[e]));if(i.length>0){e.filter((e=>e.group.children.length>0)).forEach((e=>W(e,i,l)))}}function S(e,t,l){if(!e||!l){return}const n=Object.keys(l);if(e.length===0||!e[0].group||n.length===0){return}let i;if(t==u.AVERAGE){i=n.filter((e=>u.AVERAGE===l[e]))}if(t==u.MATH){i=n.filter((e=>l[e].indexOf(u.MATH)==0))}if(i.length>0){e.filter((e=>e.group.children.length>0)).forEach((e=>E(e,t,i,l)))}}function W(e,t,l){const n=e.group.children;if(n.length===0){return}if(n[0].group){n.forEach((e=>{W(e,t,l)}))}t.forEach((t=>{const n=l[e.group.id][t];e.group.totals[t]=new Set(n).size}))}function E(e,t,l,n){const i=e.group.children;if(i.length===0){return 0}let r=0;if(i[0].group){i.forEach((e=>{r+=E(e,t,l,n)}))}else{r=i.length}l.forEach((l=>{if(t==u.AVERAGE){e.group.totals[l]=e.group.totals[l]/r}if(t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=V.ketchup.math.formulas.custom(t,e.group.totals)}}));return r}function L(e,t){if(t){const l=Object.assign(t);t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];if(l&&e.obj&&!l.obj){l.obj={t:e.obj.t,p:e.obj.p,k:l.value}}}}))}));return l}else{return undefined}}function $(e=[],t={}){if(V.ketchup.objects.isEmptyJsObject(e)||V.ketchup.objects.isEmptyJsObject(t)){return{}}const l=Object.keys(t);const n={};const i=new Array;let r=l.length===0||l.every((e=>t[e]===u.COUNT));if(r){l.forEach((t=>n[t]=e.length))}else{let r={};e.forEach(((e,s,o)=>{l.filter((e=>u.COUNT!==t[e]&&t[e].indexOf(u.MATH)!=0)).forEach((l=>{const a=e.cells[l];if(a){if(t[l]===u.DISTINCT){let e;if(V.ketchup.objects.isNumber(a.obj)){e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value))}else{e=a.value}let t=r[l];if(!t){r[l]=[];r[l].push(e)}else{t.push(e)}}else if(V.ketchup.objects.isNumber(a.obj)){const e=V.ketchup.math.numberify(V.ketchup.math.numberifySafe(a.value));let i=n[l];switch(true){case t[l]===u.MIN:if(i){n[l]=Math.min(i,e)}else{n[l]=e}break;case t[l]===u.MAX:if(i){n[l]=Math.max(i,e)}else{n[l]=e}break;default:i=n[l]||0;n[l]=e+V.ketchup.math.numberify(i)}}else if(V.ketchup.objects.isDate(a.obj)){if(i.indexOf(l)==-1){i.push(l)}if(V.ketchup.dates.isValidFormattedStringDate(a.value)){const e=V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(a.value));const i=n[l]?V.ketchup.dates.toDate(V.ketchup.dates.toDayjs(n[l])):null;switch(true){case t[l]===u.MIN:if(i){let t=[];t.push(e);t.push(i);n[l]=V.ketchup.dates.format(V.ketchup.dates.min(t),F.ISO_DATE)}else{n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}break;case t[l]===u.MAX:if(i){let t=[];t.push(e);t.push(i);n[l]=V.ketchup.dates.format(V.ketchup.dates.max(t),F.ISO_DATE)}else{n[l]=V.ketchup.dates.format(e,F.ISO_DATE)}break}}}}if(s===o.length-1&&t[l]===u.DISTINCT){n[l]=new Set(r[l]).size;r[l]=[]}}))}))}for(let r of l){switch(true){case t[r]===u.AVERAGE:const l=n[r];if(l&&e.length>0){n[r]=l/e.length}break;case t[r]===u.COUNT:n[r]=e.length;break;case t[r].indexOf(u.MATH)==0:n[r]=V.ketchup.math.formulas.custom(t[r].substring(u.MATH.length),n);break}if(n[r]){if(i.indexOf(r)!=-1){n[r]=V.ketchup.dates.format(n[r])}else if(V.ketchup.math.isNumber(n[r])){n[r]=+n[r].toFixed(2)}}}return n}function R(e){if(!e.group){return}let t=e.group.id;let l=e.group.parent;while(l!==null){t=`${l.group.id};${t}`;l=l.group.parent}e.group.id=t}function q(e,t,l,n){const i=t*l-l;const r=i+Number(l);if(n==false){return e.slice(i,r)}let s=[];z(e,s,i,Number(l),0);return s}function z(e,t,l,n,i){let r=false;for(let s=0;s<e.length;s++){let o=e[s];let a=J(e[s]);if(o.group!=null&&o.group.children!=null&&o.group.children.length>0){a.group.children=[];let e=z(o.group.children,a.group.children,l,n,i);i=e.ci;r=e.added;if(r==true){t[t.length]=a}}else{if(i>=l){t[t.length]=a;r=true}i++}if(i>=l+n){break}}return{ci:i,added:r}}function J(e){if(e==null){return null}else{return{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:H(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}}function K(e){if(e==null){return null}let t=[];for(let l=0;l<e.length;l++){t[t.length]=J(e[l])}return t}function H(e){if(e==null){return null}let t={id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:K(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)};return t}function U(e,t,l=false){const n={columns:t.columns,rows:[]};for(const i of t.rows){const r={cells:{},id:i.id};for(const l of t.columns){const t=l.name;const n=i.cells[t];const s=e.rows.find((e=>e.id===i.id));const o=s?s.cells[t]:null;if(!o||n.value!==o.value){r.cells[t]=n}}if(Object.keys(r.cells).length>0||l){n.rows.push(r)}}return n}function G(e){var t;(t=e.rows)===null||t===void 0?void 0:t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var l;let n=e.cells[t];const i=n.value;const r=n["options"];n.isEditable=(l=n.isEditable)!==null&&l!==void 0?l:n["editable"];if(r){const e={[c.AUTOCOMPLETE]:()=>h(i,"",r),[c.COMBOBOX]:()=>h(i,"",r),[c.RADIO]:()=>d(i,r),[c.CHECKBOX]:()=>b(i,r),[c.CHIP]:()=>p(i),[c.SWITCH]:()=>m(i,"")};const t=e[n.shape];if(t){n.data=t()}else{if(n.shape){V.ketchup.debug.logMessage("kup-data",`Shape specified ${n.shape} in cell ${JSON.stringify(n)} unsupported`,f.WARNING)}}}}))}))}export{w as F,k as K,O as a,_ as b,$ as c,G as d,x as e,N as f,U as g,L as n,q as p,C as s,T as t};
|
|
2
|
+
//# sourceMappingURL=p-454b6065.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-cc32b7a2.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-3788598c.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-cc32b7a2.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-a670a42e.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-53fab0f5.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-cc32b7a2.js";import{F as r}from"./p-5d03c077.js";import{F as l}from"./p-b563176c.js";import{F as h}from"./p-c4054aba.js";import{k as c,g as p,s as f,ao as d,h as u,R as m,e as g}from"./p-3788598c.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 p(this,y,t)}async refresh(){e(this)}async setProps(t){f(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-cc32b7a2.js";import{F as r}from"./p-5d03c077.js";import{F as l}from"./p-06fe42ee.js";import{F as h}from"./p-c4054aba.js";import{k as c,g as f,s as p,ao as d,h as u,R as m,e as g}from"./p-a670a42e.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-5540decd.entry.js.map
|