@sme.up/ketchup 11.0.0-SNAPSHOT-20250113103935 → 11.0.0-SNAPSHOT-20250113143938
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-69cd8414.js → f-cell-678cbf73.js} +4 -4
- package/dist/cjs/{f-chip-b6daef61.js → f-chip-40c7dc40.js} +1 -1
- package/dist/cjs/{f-object-field-3ab3a653.js → f-object-field-2d8bb33e.js} +2 -2
- package/dist/cjs/{f-paginator-utils-d91da197.js → f-paginator-utils-6608eef4.js} +1 -1
- package/dist/cjs/{f-text-field-3a3030b6.js → f-text-field-08565d18.js} +4 -6
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
- package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_28.cjs.entry.js +7 -7
- package/dist/cjs/kup-box.cjs.entry.js +7 -7
- 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 +5 -5
- package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
- package/dist/cjs/{kup-data-table-helper-29b63a16.js → kup-data-table-helper-704e3306.js} +1 -1
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +1 -1
- package/dist/cjs/kup-editor.cjs.entry.js +1 -1
- package/dist/cjs/kup-family-tree.cjs.entry.js +1 -1
- package/dist/cjs/kup-grid.cjs.entry.js +1 -1
- package/dist/cjs/kup-htm.cjs.entry.js +1 -1
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +5 -5
- package/dist/cjs/kup-input-panel.cjs.entry.js +5 -5
- 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-8dc4e7a0.js → kup-manager-ecd2adbe.js} +4 -1
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
- package/dist/cjs/kup-object-field.cjs.entry.js +3 -3
- package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
- package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
- package/dist/cjs/kup-planner.cjs.entry.js +2 -2
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
- package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/kup-txt.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-typography.cjs.entry.js +1 -1
- package/dist/collection/f-components/f-text-field/f-text-field.js +3 -5
- package/dist/collection/managers/kup-keys-binding/kup-keys-binding.js +4 -1
- package/dist/components/index.js +1 -1
- package/dist/components/kup-accordion.js +2 -2
- package/dist/components/kup-activity-timeline.js +2 -2
- package/dist/components/kup-autocomplete.js +1 -1
- package/dist/components/kup-badge.js +1 -1
- package/dist/components/kup-box.js +1 -1
- package/dist/components/kup-button-list.js +1 -1
- package/dist/components/kup-button.js +1 -1
- package/dist/components/kup-calendar.js +2 -2
- package/dist/components/kup-card-list.js +3 -3
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +2 -2
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dashboard.js +2 -2
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +2 -2
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart.js +1 -1
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-family-tree.js +3 -3
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid.js +1 -1
- package/dist/components/kup-htm.js +2 -2
- package/dist/components/kup-iframe.js +2 -2
- package/dist/components/kup-image-list.js +2 -2
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-input-panel.js +3 -3
- package/dist/components/kup-lazy.js +2 -2
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +4 -4
- package/dist/components/kup-nav-bar.js +2 -2
- package/dist/components/kup-numeric-picker.js +2 -2
- package/dist/components/kup-object-field.js +2 -2
- package/dist/components/kup-pdf.js +2 -2
- package/dist/components/kup-photo-frame.js +2 -2
- package/dist/components/kup-planner.js +2 -2
- package/dist/components/kup-probe.js +2 -2
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +2 -2
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +2 -2
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-toolbar.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/components/kup-txt.js +2 -2
- package/dist/components/kup-typography-list.js +2 -2
- package/dist/components/kup-typography.js +2 -2
- package/dist/components/{p-4002ddaf.js → p-11e02b9a.js} +2 -2
- package/dist/components/{p-4ff91853.js → p-2f300dd9.js} +4 -1
- package/dist/components/{p-05848551.js → p-39d13f44.js} +4 -6
- package/dist/components/{p-82478057.js → p-626b058a.js} +2 -2
- package/dist/components/{p-a57a4bed.js → p-8ed169fb.js} +2 -2
- package/dist/components/{p-1b29941a.js → p-fa512a4c.js} +2 -2
- package/dist/esm/{f-cell-aa6cc1bd.js → f-cell-bc052e6c.js} +4 -4
- package/dist/esm/{f-chip-e8fcb4ae.js → f-chip-f8521c5b.js} +1 -1
- package/dist/esm/{f-object-field-8144b91d.js → f-object-field-f4af8e9c.js} +2 -2
- package/dist/esm/{f-paginator-utils-0f9ead11.js → f-paginator-utils-a2672de1.js} +1 -1
- package/dist/esm/{f-text-field-16a189e9.js → f-text-field-7462723f.js} +4 -6
- package/dist/esm/index.js +1 -1
- package/dist/esm/kup-accordion.entry.js +1 -1
- package/dist/esm/kup-activity-timeline.entry.js +2 -2
- package/dist/esm/kup-autocomplete_28.entry.js +7 -7
- package/dist/esm/kup-box.entry.js +7 -7
- 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 +5 -5
- package/dist/esm/kup-dashboard.entry.js +2 -2
- package/dist/esm/{kup-data-table-helper-7d21a6f5.js → kup-data-table-helper-8befc9f5.js} +1 -1
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +1 -1
- package/dist/esm/kup-editor.entry.js +1 -1
- package/dist/esm/kup-family-tree.entry.js +1 -1
- package/dist/esm/kup-grid.entry.js +1 -1
- package/dist/esm/kup-htm.entry.js +1 -1
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +5 -5
- package/dist/esm/kup-input-panel.entry.js +5 -5
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +1 -1
- package/dist/esm/{kup-manager-9e3d5aec.js → kup-manager-a7e59109.js} +4 -1
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +2 -2
- package/dist/esm/kup-object-field.entry.js +3 -3
- package/dist/esm/kup-pdf.entry.js +1 -1
- package/dist/esm/kup-photo-frame.entry.js +1 -1
- package/dist/esm/kup-planner.entry.js +2 -2
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +1 -1
- package/dist/esm/kup-snackbar.entry.js +1 -1
- package/dist/esm/kup-txt.entry.js +1 -1
- package/dist/esm/kup-typography-list.entry.js +1 -1
- package/dist/esm/kup-typography.entry.js +1 -1
- package/dist/ketchup/index.esm.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-e22856a8.entry.js → p-0ca77eb5.entry.js} +1 -1
- package/dist/ketchup/{p-1e557974.entry.js → p-0dd4e87b.entry.js} +1 -1
- package/dist/ketchup/{p-c08bce5d.js → p-0ecffca2.js} +1 -1
- package/dist/ketchup/{p-745cbb86.entry.js → p-3c3b3b65.entry.js} +1 -1
- package/dist/ketchup/{p-5ea23d5c.entry.js → p-3d0178c2.entry.js} +1 -1
- package/dist/ketchup/{p-0f12b295.js → p-40ebfd27.js} +1 -1
- package/dist/ketchup/{p-1e09c216.entry.js → p-4c077363.entry.js} +1 -1
- package/dist/ketchup/{p-e285b680.js → p-4c655693.js} +1 -1
- package/dist/ketchup/{p-27d83af8.entry.js → p-58c4b3e7.entry.js} +1 -1
- package/dist/ketchup/{p-cc354795.entry.js → p-5b5d4197.entry.js} +1 -1
- package/dist/ketchup/{p-32b9be7d.entry.js → p-5c07296d.entry.js} +1 -1
- package/dist/ketchup/{p-0a66628a.entry.js → p-638af911.entry.js} +1 -1
- package/dist/ketchup/{p-16931130.js → p-64087c91.js} +1 -1
- package/dist/ketchup/{p-e16bd528.entry.js → p-66d9c407.entry.js} +1 -1
- package/dist/ketchup/{p-20f14ee6.entry.js → p-7127822c.entry.js} +1 -1
- package/dist/ketchup/p-75c0cdfc.entry.js +1 -0
- package/dist/ketchup/{p-6e9ab0c1.entry.js → p-78db9fc9.entry.js} +1 -1
- package/dist/ketchup/{p-4f912f88.js → p-7d047a5b.js} +1 -1
- package/dist/ketchup/{p-e576092d.entry.js → p-902c8897.entry.js} +1 -1
- package/dist/ketchup/{p-06eb3160.js → p-931c6219.js} +1 -1
- package/dist/ketchup/{p-ed92fa6f.entry.js → p-98cf408b.entry.js} +1 -1
- package/dist/ketchup/{p-0864e672.entry.js → p-9a7f98a3.entry.js} +1 -1
- package/dist/ketchup/{p-85c49fd1.entry.js → p-9b2e0e34.entry.js} +1 -1
- package/dist/ketchup/{p-00c5de94.entry.js → p-9b34a4af.entry.js} +1 -1
- package/dist/ketchup/{p-0fa8ae8a.entry.js → p-a591d76a.entry.js} +1 -1
- package/dist/ketchup/{p-f277b168.entry.js → p-abfbb011.entry.js} +1 -1
- package/dist/ketchup/p-adef8395.js +1 -0
- package/dist/ketchup/{p-5d6dd2c2.entry.js → p-b26e0930.entry.js} +1 -1
- package/dist/ketchup/{p-77f0f5c0.entry.js → p-b2d3a6b5.entry.js} +1 -1
- package/dist/ketchup/{p-e9e8074c.entry.js → p-b69eaea0.entry.js} +1 -1
- package/dist/ketchup/{p-ec6dea36.entry.js → p-bf259f1f.entry.js} +1 -1
- package/dist/ketchup/{p-d0a351b8.entry.js → p-c7e4053a.entry.js} +1 -1
- package/dist/ketchup/{p-ffc28f25.entry.js → p-cde7b444.entry.js} +1 -1
- package/dist/ketchup/{p-d46a6999.entry.js → p-cf524f2b.entry.js} +1 -1
- package/dist/ketchup/{p-978068e3.entry.js → p-d7fff237.entry.js} +1 -1
- package/dist/ketchup/{p-9f05dab9.entry.js → p-f678c01c.entry.js} +1 -1
- package/dist/ketchup/{p-0cba2bc5.entry.js → p-f8db0ac6.entry.js} +1 -1
- package/dist/ketchup/{p-34554410.entry.js → p-febdbdc1.entry.js} +1 -1
- package/package.json +1 -1
- package/dist/ketchup/p-7316ac8e.entry.js +0 -1
- package/dist/ketchup/p-8ec305eb.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as n,f as i,h as r,H as e,d as o,g as a}from"./p-b0368f88.js";import{k as s,g as u,s as l,d as f,e as h,v as c,o as v}from"./p-
|
|
1
|
+
import{r as t,c as n,f as i,h as r,H as e,d as o,g as a}from"./p-b0368f88.js";import{k as s,g as u,s as l,d as f,e as h,v as c,o as v}from"./p-40ebfd27.js";import{c as d}from"./p-635bb4b3.js";import"./p-1ee561ba.js";
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,f as e,h as n,H as o,d as a}from"./p-b0368f88.js";import{k as p,g as s,s as h,e as f}from"./p-
|
|
1
|
+
import{r as t,c as i,f as e,h as n,H as o,d as a}from"./p-b0368f88.js";import{k as p,g as s,s as h,e as f}from"./p-40ebfd27.js";import"./p-1ee561ba.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=class{constructor(e){t(this,e),this.kupIframeError=i(this,"kup-iframe-error",6),this.kupIframeLoad=i(this,"kup-iframe-load",6),this.kupManager=p(),this.buttonData={},this.isButton=!1,this.src=void 0}onKupIframeError(){this.kupIframeError.emit({comp:this,id:this.rootElement.id})}onKupIframeLoad(){this.kupIframeLoad.emit({comp:this,id:this.rootElement.id})}async getProps(t){return s(this,r,t)}async refresh(){e(this)}async setProps(t){h(this,r,t)}openInNew(){window.open(this.src,"_blank")}componentWillLoad(){this.kupManager.debug.logLoad(this,!1)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){if(null!=this.src&&""!==this.src)return this.buttonData.icon||(this.buttonData.icon="open_in_new"),this.buttonData.label||(this.buttonData.label="Open in new tab"),this.isButton?n(o,{"is-button":!0},n("kup-button",Object.assign({},this.buttonData,{"onkup-button-click":()=>this.openInNew()}))):n(o,{"is-iframe":!0},n("iframe",{onError:this.onKupIframeError.bind(this),onLoad:this.onKupIframeLoad.bind(this),src:this.src}));this.kupManager.debug.logMessage(this,"Resource undefined, not rendering!",f.WARNING)}get rootElement(){return a(this)}};l.style=".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%}";export{l as kup_iframe}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,f as e,h as s,H as a,d as o}from"./p-b0368f88.js";import{F as i}from"./p-931c6219.js";import{k as r,g as n}from"./p-40ebfd27.js";import{c as f}from"./p-635bb4b3.js";import"./p-504fe614.js";import"./p-e3062c19.js";import"./p-f2213e00.js";import"./p-adef8395.js";import"./p-1ee561ba.js";var c;!function(t){t.customStyle="Custom style of the component.",t.data="Actual data of the component."}(c||(c={}));var h,p=function(t,e,s,a){if("a"===s&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?a:"a"===s?a.call(t):a?a.value:e.get(t)};const d=class{constructor(e){t(this,e),h.set(this,r()),this.inputValue="",this.customStyle="",this.data={}}async getValue(){return this.inputValue}async getProps(t){return n(this,c,t)}async refresh(){e(this)}async setValue(t){this.inputValue=t}componentWillLoad(){p(this,h,"f").debug.logLoad(this,!1),p(this,h,"f").theme.register(this)}componentDidLoad(){p(this,h,"f").debug.logLoad(this,!0)}componentWillRender(){p(this,h,"f").debug.logRender(this,!1)}componentDidRender(){p(this,h,"f").debug.logRender(this,!0)}render(){var t;const e={data:null!==(t=this.data)&&void 0!==t?t:{},inputValue:this.inputValue,onChange:null};return s(a,{key:"f3c9567c118b3ef39f24a7b89a0852379b5b50d3"},s("style",{key:"10b4329a4934fecca877b99814846422b162f4ff"},p(this,h,"f").theme.setKupStyle(this.rootElement)),s("div",{key:"054e8a048364d488fe117131fa0699c3d8e05d85",id:f},s(i,Object.assign({key:"4a28a96a773e739adc954fcee4a429633e00f5d4"},e))))}disconnectedCallback(){p(this,h,"f").theme.unregister(this)}get rootElement(){return o(this)}};h=new WeakMap,d.style="";export{d as kup_object_field}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,f as e,h as o,H as a,d as n}from"./p-b0368f88.js";import{k as s,c as p,g as h,s as r}from"./p-
|
|
1
|
+
import{r as t,c as i,f as e,h as o,H as a,d as n}from"./p-b0368f88.js";import{k as s,c as p,g as h,s as r}from"./p-40ebfd27.js";import{a as f,F as l}from"./p-60cfddce.js";import{c}from"./p-635bb4b3.js";import{F as u}from"./p-f2213e00.js";import"./p-1ee561ba.js";var g;!function(t){t.data="the text of the text",t.Style="it is the style of the text",t.Border="when true it will appear a border",t.BorderWidth="it is the width of the border",t.Align="text alignment",t.FontBold="when true it will display the bold font",t.FontItalic="when true it will display the italic ( cursive )",t.FontName="it is the name of the font",t.FontSize="it is the size of the font of the text",t.FontULine="when true it will show the underline",t.FontColor="it is the color of the font of the text",t.BackColor="it is the background color of the text",t.Type="it is the type of the font. It is an enum that can take from different variant such as body, heading1, caption and so on"}(g||(g={}));var y,m,d=function(t,i,e,o,a){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?t!==i||!a:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?a.call(t,e):a?a.value=e:i.set(t,e),e},k=function(t,i,e,o){if("a"===e&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!o:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?o:"a"===e?o.call(t):o?o.value:i.get(t)};const w=class{constructor(e){t(this,e),this.kupIconClick=i(this,"kup-typography-iconclick",6),this.kupClick=i(this,"kup-typography-click",6),this.kupItemClick=i(this,"kup-typography-itemclick",6),this.kupManager=s(),y.set(this,null),m.set(this,null),this.customStyle="",this.toolbar=!0,this.toolbarData=void 0,this.type=f.BODY_COMPACT,this.value=null}onKupClick(){this.kupClick.emit({comp:this,id:this.rootElement.id,value:this.value})}onKupIconClick(t){d(this,m,t,"f"),this.kupIconClick.emit({comp:this,id:this.rootElement.id}),this.createDropDownToolbarList()}onKupToolbarItemClick(t){this.kupItemClick.emit({comp:this,id:this.rootElement.id,value:this.value,node:t.detail.selected})}closeRowToolbarList(){this.toolbarList&&(this.kupManager.dynamicPosition.stop(this.toolbarList),this.kupManager.removeClickCallback(k(this,y,"f")),this.toolbarList.remove(),this.toolbarList=null)}createDropDownToolbarList(){this.toolbarList&&this.closeRowToolbarList();const t=document.createElement("kup-toolbar");t.data=this.toolbarData,t.addEventListener("kup-toolbar-click",(t=>{this.onKupToolbarItemClick(t),setTimeout((()=>{this.closeRowToolbarList()}),0)})),this.toolbarList=t,d(this,y,{cb:()=>{this.closeRowToolbarList()},el:this.toolbarList},"f"),this.kupManager.addClickCallback(k(this,y,"f"),!0),this.rootElement.shadowRoot.appendChild(this.toolbarList),requestAnimationFrame((()=>{this.kupManager.dynamicPosition.register(this.toolbarList,k(this,m,"f"),0,p.AUTO,!0),this.kupManager.dynamicPosition.start(this.toolbarList)}))}async getProps(t){return h(this,g,t)}async refresh(){e(this)}async setProps(t){r(this,g,t)}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){const t={toolbar:this.toolbar,value:this.value,type:this.type},i={"kup-typography--wrap":!!t.toolbar};return o(a,{key:"7012a19857bd8273e28ea6c7a945b3c820566722"},o("style",{key:"9034b5c151c79c7fb2717df206d3e6d341682047"},this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{key:"09ce1d82ef1b9c072266d6f180eef84ab44efb48",id:c,class:i,onClick:()=>this.onKupClick},o(l,Object.assign({key:"f936da0652096dac4805f67fbfe2d1fb53343d8c"},t)),o(u,Object.assign({key:"d9bdaad591d4f89b7d9ce6dead215bd8e2a0297a"},{color:"var(--kup-gray-color-70)",resource:"more_vert",sizeX:"16px",sizeY:"16px",wrapperClass:"image__iconToolbar"},{onClick:t=>{t.stopPropagation(),this.onKupIconClick(t.currentTarget)}}))))}disconnectedCallback(){this.kupManager.theme.unregister(this)}static get assetsDirs(){return["assets/fonts"]}get rootElement(){return n(this)}};y=new WeakMap,m=new WeakMap,w.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.kup-typography--wrap{display:flex;align-items:center;gap:var(--kup-space-03)}.kup-typography--wrap:hover .image__iconToolbar{opacity:0.3}.kup-typography--wrap:hover .image__iconToolbar:hover{cursor:pointer;opacity:1;background-color:var(--kup-gray-color-20-hover)}.kup-typography--wrap .image__iconToolbar{opacity:0.3;margin:0}:host{display:block}";export{w as kup_typography}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,H as t,D as l,B as n,ab as r,v as i,x as o,ac as s,ad as a,M as u,F as c,ae as f,af as h,ag as d,ah as b,ai as m,a2 as p}from"./p-0f12b295.js";import{K as v}from"./p-1ee561ba.js";class F extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,l){let n="";if(null==e)return n;let r=e[t];return null==r||(n=l?r.textFieldTmp:r.textField),n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,l){if(!t)return!1;let n=this._getTextFilterValue(e,t.name,l);if(null!=n&&""!=n.trim())return!0;if(this._hasIntervalTextFieldFilterValues(e,t,l))return!0;let r=this.getCheckBoxFilterValues(e,t.name);return!(null==r||r.length<1)}getCheckBoxFilterValues(e={},t){let l=[];if(null==e)return l;let n=e[t];return null==n||null==n.checkBoxes||(l=n.checkBoxes),l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!1)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!0)}_hasIntervalTextFieldFilterValues(e={},l,n){if(null==l)return!1;if(!this.isColumnFiltrableByInterval(l))return!1;let r=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(null!=r&&""!=r.trim())return!0;let i=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);return null!=i&&""!=i.trim()}addCheckboxFilter(t={},l,n){if(null==t)return;let r=t[l];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},t[l]=r),null==r.checkBoxes&&(r.checkBoxes=[]),null==n||null==n.value?r.checkBoxes=[]:e.valuesArrayContainsValue(r.checkBoxes,n.value)||(r.checkBoxes[r.checkBoxes.length]=n)}removeCheckboxFilter(t={},l,n){if(null==t||null==n)return;let r=t[l];if(null==r)return;null==r.checkBoxes&&(r.checkBoxes=[]);let i=e.indexOfValueInValuesArray(r.checkBoxes,n);if(i>=0){let e=[];for(let t=0;t<r.checkBoxes.length;t++)t!=i&&(e[e.length]=r.checkBoxes[t]);r.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!1)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!0)}_getIntervalTextFieldFilterValues(e={},l,n){return this._hasIntervalTextFieldFilterValues(e,l,n)?[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)]:["",""]}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!1)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!0)}_getIntervalTextFieldFilterValue(e={},t,l,n){let r="";if(null==e)return r;let i=e[t];return null==i||n&&null==i.intervalTmp?r:n||null!=i.interval?(r=n?i.intervalTmp[l]:i.interval[l],r):r}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,!0)}_setTextFieldFilterValue(e={},t,l,n){if(null==e)return;let r=e[t];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=r),n?r.textFieldTmp=null!=l?l.trim():l:r.textField=null!=l?l.trim():l}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,!0)}_setIntervalTextFieldFilterValue(e={},t,l,n,r){if(null==e)return;let i=e[t];null==i&&(i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=i),null==i.interval&&(i.interval=[],i.interval.push("","")),null==i.intervalTmp&&(i.intervalTmp=[],i.intervalTmp.push("","")),r?i.intervalTmp[n]=null!=l?l.trim():l:i.interval[n]=null!=l?l.trim():l}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,!1)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,!0)}getFilterValueForTooltip(e={},r){let i=this.getTextFilterValue(e,r.name),o=this.getIntervalTextFieldFilterValues(e,r),s=this.getCheckBoxFilterValues(e,r.name),a="",u=l(i,r.obj,r.decimals);""!=i&&(a=" AND "),""!=o[t.FROM]&&(u+=a+"(>= "+l(o[t.FROM],r.obj,r.decimals)+")",a=" AND "),""!=o[t.TO]&&(u+=a+"(<= "+l(o[t.TO],r.obj,r.decimals)+")",a=" AND "),a="";let c="";return s.forEach((e=>{c+=a+n(e,r),a=" OR "})),""!=c&&(c="("+c+")",""!=u&&(c=" AND "+c)),c=u+c,c}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.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.removableColumns="Sets the possibility to remove the selected 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 w="TREE_COLUMN";var T;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(T||(T={}));const g=document.documentElement,k=g.ketchup?g.ketchup.objects:new o,j=g.ketchup?g.ketchup.data:new s;class y extends e{isFilterCompliantForCell(e,t,l){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=!1,r=[],i){return this.areCellsCompliant(e.cells,t,l,n,r,i)}areCellsCompliant(e,t={},l="",n=!1,o=[],s){if(n){let t=!0;if(o&&null!=o&&o.length>0){t=!1;let n=this.filterIsNegative(l);for(let i=0;i<o.length;i++){if(0==o[i].visible)continue;const s=e[o[i].name];if(null==s)continue;t=this.isFilterCompliantForValue(s.value,l);let a=r(o[i],s);if(a!=s.value&&(t=t||this.isFilterCompliantForValue(a,l)),1==t&&!n)break;if(0==t&&n)break}}if(!t)return!1}if(null==s&&(s=new F),!this.hasFilters(t,o,s))return!0;let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const r=e[n];if(!r)return!1;let u=s.getTextFilterValue(t,n),c=s.getIntervalTextFieldFilterValues(t,i(o,n));const f=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(r,u,c),d=f;if(k.isNumber(r.obj)||k.isDate(r.obj)||k.isTime(r.obj)||k.isTimestamp(r.obj)||(d=this.isFilterCompliantForCellObj(r,u,c)),f){if(!h||!d)return!1}else if(!h&&!d)return!1;let b=s.getCheckBoxFilterValues(t,n);if(0==b.length)continue;let m=!1;for(let e=0;e<b.length;e++){let t=b[e];if(null!=t&&null!=t.value){if(null!=r.value&&r.value.toLowerCase().trim()==t.value.toLowerCase().trim()){m=!0;break}if(null!=r.obj&&r.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){m=!0;break}}}if(!m)return!1}return!0}hasFilters(e={},t,l){if(null==e)return!1;let n=Object.keys(e);if(null==n||n.length<1)return!1;null==l&&(l=new F);for(let r=0;r<n.length;r++){let o=n[r],s=null;if(s=o===w?{name:w,title:""}:i(t,o),l.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},l="",n=[],r){if(!e||null==e)return[];let i=[];const o=!(!l||!n);if(this.hasFilters(t,n,r)||o)for(let s=0;s<e.length;s++){let a=e[s];(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,o,n,r))&&(i[i.length]=a)}else i=[...e];return i}getColumnValues(t,n,r,i){let o=new Array;null==i&&(i=new F);let s=i.getTextFilterValueTmp(t.filters,n.name),a=i.getIntervalTextFieldFilterValuesTmp(t.filters,n),u=i.getCheckBoxFilterValues(t.filters,n.name);if(null!=n.valuesForFilter&&n.valuesForFilter.length>0)return n.valuesForFilter.forEach((t=>{let r=t;(e.valuesArrayContainsValue(u,r)||""==s||i.isFilterCompliantForSimpleValue(r,n.obj,s,a))&&o.push({value:r,displayedValue:l(r,n.obj,n.decimals)})})),o;let c=Object.assign({},t.filters);c[n.name]={textField:s,textFieldTmp:s,checkBoxes:[],interval:a,intervalTmp:a};let f=this.filterRows(t.getRows(),c,r,t.getVisibleColumns(),i);for(let e=0;e<u.length;e++)o.push(u[e]);return j.cell.getUnivocalValue({rows:f},n,!0)}}const O=document.documentElement;function V(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const l=e[0].group.column;let n=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let l of t)if(l.column===e)return l;return null}(l,t);return n||(n={column:l,sortMode:p.A}),e.sort(((e,t)=>a({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},n.sortMode))),e.forEach((e=>{e.group.children=V(e.group.children,t)})),e}(e,t);if(!t||0===t.length)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 r=C(e,n,t[l]);if(0!==r)return r}return 0}return C(e,n,t[0])}))}function C(e,t,l){const n=e.cells[l.column],r=t.cells[l.column];return n||r?n?r?a(n,r,l.sortMode):-1:1:0}function I(e=[],t={},l="",n=[],r,i){return null==i&&(i=new y),i.filterRows(e,t,l,n,r)}function M(e=[],t=[],l=[],n={}){if(!t)return[];if(!l||0===l.length||!e||0===e.length)return t;const o={},s=l.filter((({column:t})=>{for(let{name:l,title:n}of e)if(l===t)return o[l]=n,!0;return!1}));if(0===s.length)return t;const a=[];let c={};return t.forEach((t=>{const l=s[0].column,f=t.cells[l];if(f){const h=i(e,l),d=r(h,f),b=f.value;let m=null;for(let e of a)if(e.group.label===d){m=e;break}null===m&&(m={group:{id:b,parent:null,column:l,columnLabel:o[l],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},a.push(m));for(let l=1;l<s.length;l++){const n=s[l],a=t.cells[n.column];if(a){const t=i(e,n.column),l=r(t,a),s=a.value;let u=null;for(let e=0;e<m.group.children.length;e++){const t=m.group.children[e];if(t.group.label===l){u=t;break}}u||(u={cells:{},group:{id:s,parent:m,column:n.column,columnLabel:o[n.column],children:[],expanded:!1,label:l,totals:{},obj:a.obj}},W(u),m.group.children.push(u)),m=u}}m.group.children.push(t),function(e,t,l,n){if(!e||!t)return;const r=Object.keys(t);0!==r.length&&r.forEach((r=>{const i=l.cells[r];if(i){const l=O.ketchup.objects.isNumber(i.obj),o=t[r];switch(o){case u.COUNT:let t=e.group.totals[r]||0;e.group.totals[r]=++t;let s=e.group.parent;for(;null!=s;){let e=s.group.totals[r]||0;s.group.totals[r]=++e,s=s.group.parent}break;case u.DISTINCT:let a;if(a=l?O.ketchup.math.numberify(O.ketchup.math.numberifySafe(i.value)):i.value,n[e.group.id]){let t=n[e.group.id][r];t?t.push(a):(n[e.group.id][r]=[],n[e.group.id][r].push(a))}else n[e.group.id]={},n[e.group.id][r]=[],n[e.group.id][r].push(a);let c=e.group.parent;for(;null!=c;){if(n[c.group.id]){let e=n[c.group.id][r];e?e.push(a):(n[c.group.id][r]=[],n[c.group.id][r].push(a))}else n[c.group.id]={},n[c.group.id][r]=[],n[c.group.id][r].push(a);c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l&&i.value){const t=O.ketchup.math.numberify(O.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t+(e.group.totals[r]||0);let l=e.group.parent;for(;null!=l;){const e=O.ketchup.math.numberify(l.group.totals[r]||0);l.group.totals[r]=t+e,l=l.group.parent}}break;case u.MIN:if(l&&i.value){const t=e.group.totals[r],l=O.ketchup.math.numberify(O.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t?Math.min(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.min(e,l):l,n=n.group.parent}}else if(i.value&&O.ketchup.objects.isDate(i.obj)&&O.ketchup.dates.isValidFormattedStringDate(i.value)){const t=e.group.totals[r];if(t){let l=[];l.push(a),l.push(O.ketchup.dates.toDayjs(t)),e.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.min(l),v.ISO_DATE)}else e.group.totals[r]=O.ketchup.dates.format(a,v.ISO_DATE);let l=e.group.parent;for(;null!=l;){const e=l.group.totals[r];if(e){let t=[];t.push(a),t.push(O.ketchup.dates.toDayjs(e)),l.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.min(t),v.ISO_DATE)}else l.group.totals[r]=O.ketchup.dates.format(a,v.ISO_DATE);l=l.group.parent}}break;case u.MAX:if(l&&i.value){const t=e.group.totals[r],l=O.ketchup.math.numberify(O.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t?Math.max(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.max(e,l):l,n=n.group.parent}}else if(i.value&&O.ketchup.objects.isDate(i.obj)&&O.ketchup.dates.isValidFormattedStringDate(i.value)){const t=e.group.totals[r];if(t){let l=[];l.push(a),l.push(O.ketchup.dates.toDayjs(t)),e.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.max(l),v.ISO_DATE)}else e.group.totals[r]=O.ketchup.dates.format(a,v.ISO_DATE);let l=e.group.parent;for(;null!=l;){const e=l.group.totals[r];if(e){let t=[];t.push(a),t.push(O.ketchup.dates.toDayjs(e)),l.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.max(t),v.ISO_DATE)}else l.group.totals[r]=O.ketchup.dates.format(a,v.ISO_DATE);l=l.group.parent}}break;default:0!=o.indexOf(u.MATH)&&console.warn(`invalid total mode: ${o}`)}}}))}(m,n,t,c)}})),function(e,t,l){if(!e||!t)return;const n=Object.keys(t);if(0===e.length||!e[0].group||0===n.length)return;let r=n.filter((e=>u.DISTINCT===t[e]));r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>_(e,r,l)))}(a,n,c),B(a,u.AVERAGE,n),B(a,u.MATH,n),a}function B(e,t,l){if(!e||!l)return;const n=Object.keys(l);if(0===e.length||!e[0].group||0===n.length)return;let r;t==u.AVERAGE&&(r=n.filter((e=>u.AVERAGE===l[e]))),t==u.MATH&&(r=n.filter((e=>0==l[e].indexOf(u.MATH)))),r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>A(e,t,r,l)))}function _(e,t,l){const n=e.group.children;0!==n.length&&(n[0].group&&n.forEach((e=>{_(e,t,l)})),t.forEach((t=>{e.group.totals[t]=new Set(l[e.group.id][t]).size})))}function A(e,t,l,n){const r=e.group.children;if(0===r.length)return 0;let i=0;return r[0].group?r.forEach((e=>{i+=A(e,t,l,n)})):i=r.length,l.forEach((l=>{if(t==u.AVERAGE&&(e.group.totals[l]=e.group.totals[l]/i),t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=O.ketchup.math.formulas.custom(t,e.group.totals)}})),i}function D(e,t){if(t){const l=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];l&&e.obj&&!l.obj&&(l.obj={t:e.obj.t,p:e.obj.p,k:l.value})}}))})),l}}function N(e=[],t={}){if(O.ketchup.objects.isEmptyJsObject(e)||O.ketchup.objects.isEmptyJsObject(t))return{};const l=Object.keys(t),n={},r=new Array;if(0===l.length||l.every((e=>t[e]===u.COUNT)))l.forEach((t=>n[t]=e.length));else{let i={};e.forEach(((e,o,s)=>{l.filter((e=>u.COUNT!==t[e]&&0!=t[e].indexOf(u.MATH))).forEach((l=>{const a=e.cells[l];if(a)if(t[l]===u.DISTINCT){let e;e=O.ketchup.objects.isNumber(a.obj)?O.ketchup.math.numberify(O.ketchup.math.numberifySafe(a.value)):a.value;let t=i[l];t?t.push(e):(i[l]=[],i[l].push(e))}else if(O.ketchup.objects.isNumber(a.obj)){const e=O.ketchup.math.numberify(O.ketchup.math.numberifySafe(a.value));let r=n[l];switch(!0){case t[l]===u.MIN:n[l]=r?Math.min(r,e):e;break;case t[l]===u.MAX:n[l]=r?Math.max(r,e):e;break;default:r=n[l]||0,n[l]=e+O.ketchup.math.numberify(r)}}else if(O.ketchup.objects.isDate(a.obj)&&(-1==r.indexOf(l)&&r.push(l),O.ketchup.dates.isValidFormattedStringDate(a.value))){const e=O.ketchup.dates.toDate(O.ketchup.dates.toDayjs(a.value)),r=n[l]?O.ketchup.dates.toDate(O.ketchup.dates.toDayjs(n[l])):null;switch(!0){case t[l]===u.MIN:if(r){let t=[];t.push(e),t.push(r),n[l]=O.ketchup.dates.format(O.ketchup.dates.min(t),v.ISO_DATE)}else n[l]=O.ketchup.dates.format(e,v.ISO_DATE);break;case t[l]===u.MAX:if(r){let t=[];t.push(e),t.push(r),n[l]=O.ketchup.dates.format(O.ketchup.dates.max(t),v.ISO_DATE)}else n[l]=O.ketchup.dates.format(e,v.ISO_DATE)}}o===s.length-1&&t[l]===u.DISTINCT&&(n[l]=new Set(i[l]).size,i[l]=[])}))}))}for(let i of l){switch(!0){case t[i]===u.AVERAGE:const l=n[i];l&&e.length>0&&(n[i]=l/e.length);break;case t[i]===u.COUNT:n[i]=e.length;break;case 0==t[i].indexOf(u.MATH):n[i]=O.ketchup.math.formulas.custom(t[i].substring(u.MATH.length),n)}n[i]&&(-1!=r.indexOf(i)?n[i]=O.ketchup.dates.format(n[i]):O.ketchup.math.isNumber(n[i])&&(n[i]=+n[i].toFixed(2)))}return n}function W(e){if(!e.group)return;let t=e.group.id,l=e.group.parent;for(;null!==l;)t=`${l.group.id};${t}`,l=l.group.parent;e.group.id=t}function E(e,t,l,n){const r=t*l-l,i=r+Number(l);if(0==n)return e.slice(r,i);let o=[];return L(e,o,r,Number(l),0),o}function L(e,t,l,n,r){let i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=S(e[o]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=L(s.group.children,a.group.children,l,n,r);r=e.ci,i=e.added,1==i&&(t[t.length]=a)}else r>=l&&(t[t.length]=a,i=!0),r++;if(r>=l+n)break}return{ci:r,added:i}}function S(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:$(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function R(e){if(null==e)return null;let t=[];for(let l=0;l<e.length;l++)t[t.length]=S(e[l]);return t}function $(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:R(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function q(e,t,l=!1){const n={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const r of t.rows){const t={cells:{},id:r.id};for(const l of n.columns){const n=l.name,i=r.cells[n],o=e.rows.find((e=>e.id===r.id)),s=o?o.cells[n]:null;(!s&&i.value||s&&i.value!==s.value)&&(t.cells[n]=i)}(Object.keys(t.cells).length>0||l)&&n.rows.push(t)}return n}function z(e){var t;null===(t=e.rows)||void 0===t||t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var l;let n=e.cells[t];const r=n.value,i=n.options;n.isEditable=null!==(l=n.isEditable)&&void 0!==l?l:n.editable;const o={[c.AUTOCOMPLETE]:()=>f(r,"",i),[c.COMBOBOX]:()=>f(r,"",i),[c.RADIO]:()=>h(r,i),[c.CHECKBOX]:()=>d(r,""),[c.CHIP]:()=>b(r),[c.SWITCH]:()=>m(r,"")}[n.shape];o&&(n.data=Object.assign(Object.assign({},o()),n.data))}))}))}export{F,T as K,y as a,M as b,N as c,z as d,x as e,I as f,q as g,D as n,E as p,V as s,w as t}
|
|
1
|
+
import{C as e,H as t,D as l,B as n,ab as r,v as i,x as o,ac as s,ad as a,M as u,F as c,ae as f,af as h,ag as d,ah as b,ai as m,a2 as p}from"./p-40ebfd27.js";import{K as v}from"./p-1ee561ba.js";class F extends e{getTextFilterValue(e={},t){return this._getTextFilterValue(e,t,!1)}getTextFilterValueTmp(e={},t){return this._getTextFilterValue(e,t,!0)}_getTextFilterValue(e={},t,l){let n="";if(null==e)return n;let r=e[t];return null==r||(n=l?r.textFieldTmp:r.textField),n}hasFiltersForColumn(e={},t){return this._hasFiltersForColumn(e,t,!1)}hasFiltersForColumnTmp(e={},t){return this._hasFiltersForColumn(e,t,!0)}_hasFiltersForColumn(e={},t,l){if(!t)return!1;let n=this._getTextFilterValue(e,t.name,l);if(null!=n&&""!=n.trim())return!0;if(this._hasIntervalTextFieldFilterValues(e,t,l))return!0;let r=this.getCheckBoxFilterValues(e,t.name);return!(null==r||r.length<1)}getCheckBoxFilterValues(e={},t){let l=[];if(null==e)return l;let n=e[t];return null==n||null==n.checkBoxes||(l=n.checkBoxes),l}hasIntervalTextFieldFilterValues(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!1)}hasIntervalTextFieldFilterValuesTmp(e={},t){return this._hasIntervalTextFieldFilterValues(e,t,!0)}_hasIntervalTextFieldFilterValues(e={},l,n){if(null==l)return!1;if(!this.isColumnFiltrableByInterval(l))return!1;let r=this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n);if(null!=r&&""!=r.trim())return!0;let i=this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n);return null!=i&&""!=i.trim()}addCheckboxFilter(t={},l,n){if(null==t)return;let r=t[l];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},t[l]=r),null==r.checkBoxes&&(r.checkBoxes=[]),null==n||null==n.value?r.checkBoxes=[]:e.valuesArrayContainsValue(r.checkBoxes,n.value)||(r.checkBoxes[r.checkBoxes.length]=n)}removeCheckboxFilter(t={},l,n){if(null==t||null==n)return;let r=t[l];if(null==r)return;null==r.checkBoxes&&(r.checkBoxes=[]);let i=e.indexOfValueInValuesArray(r.checkBoxes,n);if(i>=0){let e=[];for(let t=0;t<r.checkBoxes.length;t++)t!=i&&(e[e.length]=r.checkBoxes[t]);r.checkBoxes=[...e]}}isColumnFiltrableByInterval(e){return this.isObjFiltrableByInterval(e.obj)}getIntervalTextFieldFilterValues(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!1)}getIntervalTextFieldFilterValuesTmp(e={},t){return this._getIntervalTextFieldFilterValues(e,t,!0)}_getIntervalTextFieldFilterValues(e={},l,n){return this._hasIntervalTextFieldFilterValues(e,l,n)?[this._getIntervalTextFieldFilterValue(e,l.name,t.FROM,n),this._getIntervalTextFieldFilterValue(e,l.name,t.TO,n)]:["",""]}getIntervalTextFieldFilterValue(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!1)}getIntervalTextFieldFilterValueTmp(e={},t,l){return this._getIntervalTextFieldFilterValue(e,t,l,!0)}_getIntervalTextFieldFilterValue(e={},t,l,n){let r="";if(null==e)return r;let i=e[t];return null==i||n&&null==i.intervalTmp?r:n||null!=i.interval?(r=n?i.intervalTmp[l]:i.interval[l],r):r}setTextFieldFilterValue(e={},t,l){this._setTextFieldFilterValue(e,t,l,!0)}_setTextFieldFilterValue(e={},t,l,n){if(null==e)return;let r=e[t];null==r&&(r={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=r),n?r.textFieldTmp=null!=l?l.trim():l:r.textField=null!=l?l.trim():l}setIntervalTextFieldFilterValue(e={},t,l,n){this._setIntervalTextFieldFilterValue(e,t,l,n,!0)}_setIntervalTextFieldFilterValue(e={},t,l,n,r){if(null==e)return;let i=e[t];null==i&&(i={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=i),null==i.interval&&(i.interval=[],i.interval.push("","")),null==i.intervalTmp&&(i.intervalTmp=[],i.intervalTmp.push("","")),r?i.intervalTmp[n]=null!=l?l.trim():l:i.interval[n]=null!=l?l.trim():l}saveTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValueTmp(e,l),!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.FROM),t.FROM,!1),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValueTmp(e,l,t.TO),t.TO,!1)}resetTextualFilters(e={},l){this._setTextFieldFilterValue(e,l,this.getTextFilterValue(e,l),!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.FROM),t.FROM,!0),this._setIntervalTextFieldFilterValue(e,l,this.getIntervalTextFieldFilterValue(e,l,t.TO),t.TO,!0)}getFilterValueForTooltip(e={},r){let i=this.getTextFilterValue(e,r.name),o=this.getIntervalTextFieldFilterValues(e,r),s=this.getCheckBoxFilterValues(e,r.name),a="",u=l(i,r.obj,r.decimals);""!=i&&(a=" AND "),""!=o[t.FROM]&&(u+=a+"(>= "+l(o[t.FROM],r.obj,r.decimals)+")",a=" AND "),""!=o[t.TO]&&(u+=a+"(<= "+l(o[t.TO],r.obj,r.decimals)+")",a=" AND "),a="";let c="";return s.forEach((e=>{c+=a+n(e,r),a=" OR "})),""!=c&&(c="("+c+")",""!=u&&(c=" AND "+c)),c=u+c,c}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.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.removableColumns="Sets the possibility to remove the selected 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 w="TREE_COLUMN";var T;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(T||(T={}));const g=document.documentElement,k=g.ketchup?g.ketchup.objects:new o,j=g.ketchup?g.ketchup.data:new s;class y extends e{isFilterCompliantForCell(e,t,l){return!!e&&this.isFilterCompliantForSimpleValue(e.value,e.obj,t,l)}isFilterCompliantForCellObj(e,t,l){return!!e&&!!e.obj&&this.isFilterCompliantForSimpleValue(e.obj.k,e.obj,t,l)}isRowCompliant(e,t={},l="",n=!1,r=[],i){return this.areCellsCompliant(e.cells,t,l,n,r,i)}areCellsCompliant(e,t={},l="",n=!1,o=[],s){if(n){let t=!0;if(o&&null!=o&&o.length>0){t=!1;let n=this.filterIsNegative(l);for(let i=0;i<o.length;i++){if(0==o[i].visible)continue;const s=e[o[i].name];if(null==s)continue;t=this.isFilterCompliantForValue(s.value,l);let a=r(o[i],s);if(a!=s.value&&(t=t||this.isFilterCompliantForValue(a,l)),1==t&&!n)break;if(0==t&&n)break}}if(!t)return!1}if(null==s&&(s=new F),!this.hasFilters(t,o,s))return!0;let a=Object.keys(t);for(let l=0;l<a.length;l++){let n=a[l];const r=e[n];if(!r)return!1;let u=s.getTextFilterValue(t,n),c=s.getIntervalTextFieldFilterValues(t,i(o,n));const f=this.filterIsNegative(u);let h=this.isFilterCompliantForCell(r,u,c),d=f;if(k.isNumber(r.obj)||k.isDate(r.obj)||k.isTime(r.obj)||k.isTimestamp(r.obj)||(d=this.isFilterCompliantForCellObj(r,u,c)),f){if(!h||!d)return!1}else if(!h&&!d)return!1;let b=s.getCheckBoxFilterValues(t,n);if(0==b.length)continue;let m=!1;for(let e=0;e<b.length;e++){let t=b[e];if(null!=t&&null!=t.value){if(null!=r.value&&r.value.toLowerCase().trim()==t.value.toLowerCase().trim()){m=!0;break}if(null!=r.obj&&r.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){m=!0;break}}}if(!m)return!1}return!0}hasFilters(e={},t,l){if(null==e)return!1;let n=Object.keys(e);if(null==n||n.length<1)return!1;null==l&&(l=new F);for(let r=0;r<n.length;r++){let o=n[r],s=null;if(s=o===w?{name:w,title:""}:i(t,o),l.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},l="",n=[],r){if(!e||null==e)return[];let i=[];const o=!(!l||!n);if(this.hasFilters(t,n,r)||o)for(let s=0;s<e.length;s++){let a=e[s];(a.id&&a.id.indexOf("insert_")>-1||this.isRowCompliant(a,t,l,o,n,r))&&(i[i.length]=a)}else i=[...e];return i}getColumnValues(t,n,r,i){let o=new Array;null==i&&(i=new F);let s=i.getTextFilterValueTmp(t.filters,n.name),a=i.getIntervalTextFieldFilterValuesTmp(t.filters,n),u=i.getCheckBoxFilterValues(t.filters,n.name);if(null!=n.valuesForFilter&&n.valuesForFilter.length>0)return n.valuesForFilter.forEach((t=>{let r=t;(e.valuesArrayContainsValue(u,r)||""==s||i.isFilterCompliantForSimpleValue(r,n.obj,s,a))&&o.push({value:r,displayedValue:l(r,n.obj,n.decimals)})})),o;let c=Object.assign({},t.filters);c[n.name]={textField:s,textFieldTmp:s,checkBoxes:[],interval:a,intervalTmp:a};let f=this.filterRows(t.getRows(),c,r,t.getVisibleColumns(),i);for(let e=0;e<u.length;e++)o.push(u[e]);return j.cell.getUnivocalValue({rows:f},n,!0)}}const O=document.documentElement;function V(e=[],t=[]){if(!e||0===e.length)return[];if(e[0].group)return function(e=[],t=[]){if(!e||0===e.length)return[];const l=e[0].group.column;let n=function(e="",t=[]){if(!e||!t||0===t.length)return null;for(let l of t)if(l.column===e)return l;return null}(l,t);return n||(n={column:l,sortMode:p.A}),e.sort(((e,t)=>a({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},n.sortMode))),e.forEach((e=>{e.group.children=V(e.group.children,t)})),e}(e,t);if(!t||0===t.length)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 r=C(e,n,t[l]);if(0!==r)return r}return 0}return C(e,n,t[0])}))}function C(e,t,l){const n=e.cells[l.column],r=t.cells[l.column];return n||r?n?r?a(n,r,l.sortMode):-1:1:0}function I(e=[],t={},l="",n=[],r,i){return null==i&&(i=new y),i.filterRows(e,t,l,n,r)}function M(e=[],t=[],l=[],n={}){if(!t)return[];if(!l||0===l.length||!e||0===e.length)return t;const o={},s=l.filter((({column:t})=>{for(let{name:l,title:n}of e)if(l===t)return o[l]=n,!0;return!1}));if(0===s.length)return t;const a=[];let c={};return t.forEach((t=>{const l=s[0].column,f=t.cells[l];if(f){const h=i(e,l),d=r(h,f),b=f.value;let m=null;for(let e of a)if(e.group.label===d){m=e;break}null===m&&(m={group:{id:b,parent:null,column:l,columnLabel:o[l],expanded:!1,label:d,children:[],obj:f.obj,totals:{}},cells:{}},a.push(m));for(let l=1;l<s.length;l++){const n=s[l],a=t.cells[n.column];if(a){const t=i(e,n.column),l=r(t,a),s=a.value;let u=null;for(let e=0;e<m.group.children.length;e++){const t=m.group.children[e];if(t.group.label===l){u=t;break}}u||(u={cells:{},group:{id:s,parent:m,column:n.column,columnLabel:o[n.column],children:[],expanded:!1,label:l,totals:{},obj:a.obj}},W(u),m.group.children.push(u)),m=u}}m.group.children.push(t),function(e,t,l,n){if(!e||!t)return;const r=Object.keys(t);0!==r.length&&r.forEach((r=>{const i=l.cells[r];if(i){const l=O.ketchup.objects.isNumber(i.obj),o=t[r];switch(o){case u.COUNT:let t=e.group.totals[r]||0;e.group.totals[r]=++t;let s=e.group.parent;for(;null!=s;){let e=s.group.totals[r]||0;s.group.totals[r]=++e,s=s.group.parent}break;case u.DISTINCT:let a;if(a=l?O.ketchup.math.numberify(O.ketchup.math.numberifySafe(i.value)):i.value,n[e.group.id]){let t=n[e.group.id][r];t?t.push(a):(n[e.group.id][r]=[],n[e.group.id][r].push(a))}else n[e.group.id]={},n[e.group.id][r]=[],n[e.group.id][r].push(a);let c=e.group.parent;for(;null!=c;){if(n[c.group.id]){let e=n[c.group.id][r];e?e.push(a):(n[c.group.id][r]=[],n[c.group.id][r].push(a))}else n[c.group.id]={},n[c.group.id][r]=[],n[c.group.id][r].push(a);c=c.group.parent}break;case u.SUM:case u.AVERAGE:if(l&&i.value){const t=O.ketchup.math.numberify(O.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t+(e.group.totals[r]||0);let l=e.group.parent;for(;null!=l;){const e=O.ketchup.math.numberify(l.group.totals[r]||0);l.group.totals[r]=t+e,l=l.group.parent}}break;case u.MIN:if(l&&i.value){const t=e.group.totals[r],l=O.ketchup.math.numberify(O.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t?Math.min(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.min(e,l):l,n=n.group.parent}}else if(i.value&&O.ketchup.objects.isDate(i.obj)&&O.ketchup.dates.isValidFormattedStringDate(i.value)){const t=e.group.totals[r];if(t){let l=[];l.push(a),l.push(O.ketchup.dates.toDayjs(t)),e.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.min(l),v.ISO_DATE)}else e.group.totals[r]=O.ketchup.dates.format(a,v.ISO_DATE);let l=e.group.parent;for(;null!=l;){const e=l.group.totals[r];if(e){let t=[];t.push(a),t.push(O.ketchup.dates.toDayjs(e)),l.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.min(t),v.ISO_DATE)}else l.group.totals[r]=O.ketchup.dates.format(a,v.ISO_DATE);l=l.group.parent}}break;case u.MAX:if(l&&i.value){const t=e.group.totals[r],l=O.ketchup.math.numberify(O.ketchup.math.numberifySafe(i.value));e.group.totals[r]=t?Math.max(t,l):l;let n=e.group.parent;for(;null!=n;){const e=n.group.totals[r];n.group.totals[r]=e?Math.max(e,l):l,n=n.group.parent}}else if(i.value&&O.ketchup.objects.isDate(i.obj)&&O.ketchup.dates.isValidFormattedStringDate(i.value)){const t=e.group.totals[r];if(t){let l=[];l.push(a),l.push(O.ketchup.dates.toDayjs(t)),e.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.max(l),v.ISO_DATE)}else e.group.totals[r]=O.ketchup.dates.format(a,v.ISO_DATE);let l=e.group.parent;for(;null!=l;){const e=l.group.totals[r];if(e){let t=[];t.push(a),t.push(O.ketchup.dates.toDayjs(e)),l.group.totals[r]=O.ketchup.dates.format(O.ketchup.dates.max(t),v.ISO_DATE)}else l.group.totals[r]=O.ketchup.dates.format(a,v.ISO_DATE);l=l.group.parent}}break;default:0!=o.indexOf(u.MATH)&&console.warn(`invalid total mode: ${o}`)}}}))}(m,n,t,c)}})),function(e,t,l){if(!e||!t)return;const n=Object.keys(t);if(0===e.length||!e[0].group||0===n.length)return;let r=n.filter((e=>u.DISTINCT===t[e]));r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>_(e,r,l)))}(a,n,c),B(a,u.AVERAGE,n),B(a,u.MATH,n),a}function B(e,t,l){if(!e||!l)return;const n=Object.keys(l);if(0===e.length||!e[0].group||0===n.length)return;let r;t==u.AVERAGE&&(r=n.filter((e=>u.AVERAGE===l[e]))),t==u.MATH&&(r=n.filter((e=>0==l[e].indexOf(u.MATH)))),r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>A(e,t,r,l)))}function _(e,t,l){const n=e.group.children;0!==n.length&&(n[0].group&&n.forEach((e=>{_(e,t,l)})),t.forEach((t=>{e.group.totals[t]=new Set(l[e.group.id][t]).size})))}function A(e,t,l,n){const r=e.group.children;if(0===r.length)return 0;let i=0;return r[0].group?r.forEach((e=>{i+=A(e,t,l,n)})):i=r.length,l.forEach((l=>{if(t==u.AVERAGE&&(e.group.totals[l]=e.group.totals[l]/i),t==u.MATH){let t=n[l].substring(u.MATH.length);e.group.totals[l]=O.ketchup.math.formulas.custom(t,e.group.totals)}})),i}function D(e,t){if(t){const l=Object.assign(t);return t.forEach((t=>{e.forEach((e=>{if(t.cells){const l=t.cells[e.name];l&&e.obj&&!l.obj&&(l.obj={t:e.obj.t,p:e.obj.p,k:l.value})}}))})),l}}function N(e=[],t={}){if(O.ketchup.objects.isEmptyJsObject(e)||O.ketchup.objects.isEmptyJsObject(t))return{};const l=Object.keys(t),n={},r=new Array;if(0===l.length||l.every((e=>t[e]===u.COUNT)))l.forEach((t=>n[t]=e.length));else{let i={};e.forEach(((e,o,s)=>{l.filter((e=>u.COUNT!==t[e]&&0!=t[e].indexOf(u.MATH))).forEach((l=>{const a=e.cells[l];if(a)if(t[l]===u.DISTINCT){let e;e=O.ketchup.objects.isNumber(a.obj)?O.ketchup.math.numberify(O.ketchup.math.numberifySafe(a.value)):a.value;let t=i[l];t?t.push(e):(i[l]=[],i[l].push(e))}else if(O.ketchup.objects.isNumber(a.obj)){const e=O.ketchup.math.numberify(O.ketchup.math.numberifySafe(a.value));let r=n[l];switch(!0){case t[l]===u.MIN:n[l]=r?Math.min(r,e):e;break;case t[l]===u.MAX:n[l]=r?Math.max(r,e):e;break;default:r=n[l]||0,n[l]=e+O.ketchup.math.numberify(r)}}else if(O.ketchup.objects.isDate(a.obj)&&(-1==r.indexOf(l)&&r.push(l),O.ketchup.dates.isValidFormattedStringDate(a.value))){const e=O.ketchup.dates.toDate(O.ketchup.dates.toDayjs(a.value)),r=n[l]?O.ketchup.dates.toDate(O.ketchup.dates.toDayjs(n[l])):null;switch(!0){case t[l]===u.MIN:if(r){let t=[];t.push(e),t.push(r),n[l]=O.ketchup.dates.format(O.ketchup.dates.min(t),v.ISO_DATE)}else n[l]=O.ketchup.dates.format(e,v.ISO_DATE);break;case t[l]===u.MAX:if(r){let t=[];t.push(e),t.push(r),n[l]=O.ketchup.dates.format(O.ketchup.dates.max(t),v.ISO_DATE)}else n[l]=O.ketchup.dates.format(e,v.ISO_DATE)}}o===s.length-1&&t[l]===u.DISTINCT&&(n[l]=new Set(i[l]).size,i[l]=[])}))}))}for(let i of l){switch(!0){case t[i]===u.AVERAGE:const l=n[i];l&&e.length>0&&(n[i]=l/e.length);break;case t[i]===u.COUNT:n[i]=e.length;break;case 0==t[i].indexOf(u.MATH):n[i]=O.ketchup.math.formulas.custom(t[i].substring(u.MATH.length),n)}n[i]&&(-1!=r.indexOf(i)?n[i]=O.ketchup.dates.format(n[i]):O.ketchup.math.isNumber(n[i])&&(n[i]=+n[i].toFixed(2)))}return n}function W(e){if(!e.group)return;let t=e.group.id,l=e.group.parent;for(;null!==l;)t=`${l.group.id};${t}`,l=l.group.parent;e.group.id=t}function E(e,t,l,n){const r=t*l-l,i=r+Number(l);if(0==n)return e.slice(r,i);let o=[];return L(e,o,r,Number(l),0),o}function L(e,t,l,n,r){let i=!1;for(let o=0;o<e.length;o++){let s=e[o],a=S(e[o]);if(null!=s.group&&null!=s.group.children&&s.group.children.length>0){a.group.children=[];let e=L(s.group.children,a.group.children,l,n,r);r=e.ci,i=e.added,1==i&&(t[t.length]=a)}else r>=l&&(t[t.length]=a,i=!0),r++;if(r>=l+n)break}return{ci:r,added:i}}function S(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:$(e.group),clonedFrom:e,readOnly:e.readOnly,cssClass:e.cssClass}}function R(e){if(null==e)return null;let t=[];for(let l=0;l<e.length;l++)t[t.length]=S(e[l]);return t}function $(e){return null==e?null:{id:e.id,parent:Object.assign({},e.parent),column:e.column,columnLabel:e.columnLabel,expanded:e.expanded,label:e.label,children:R(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}function q(e,t,l=!1){const n={columns:t.columns.filter((e=>e.visible)),rows:[]};for(const r of t.rows){const t={cells:{},id:r.id};for(const l of n.columns){const n=l.name,i=r.cells[n],o=e.rows.find((e=>e.id===r.id)),s=o?o.cells[n]:null;(!s&&i.value||s&&i.value!==s.value)&&(t.cells[n]=i)}(Object.keys(t.cells).length>0||l)&&n.rows.push(t)}return n}function z(e){var t;null===(t=e.rows)||void 0===t||t.forEach((e=>{Object.keys(e.cells).forEach((t=>{var l;let n=e.cells[t];const r=n.value,i=n.options;n.isEditable=null!==(l=n.isEditable)&&void 0!==l?l:n.editable;const o={[c.AUTOCOMPLETE]:()=>f(r,"",i),[c.COMBOBOX]:()=>f(r,"",i),[c.RADIO]:()=>h(r,i),[c.CHECKBOX]:()=>d(r,""),[c.CHIP]:()=>b(r),[c.SWITCH]:()=>m(r,"")}[n.shape];o&&(n.data=Object.assign(Object.assign({},o()),n.data))}))}))}export{F,T as K,y as a,M as b,N as c,z as d,x as e,I as f,q as g,D as n,E as p,V as s,w as t}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as a,H as l,d as r}from"./p-b0368f88.js";import{F as o}from"./p-504fe614.js";import{a as n}from"./p-e3062c19.js";import{F as s}from"./p-f2213e00.js";import{k as f,g as _,s as p,h as m,O as h}from"./p-0f12b295.js";import{c}from"./p-635bb4b3.js";import"./p-1ee561ba.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={}));var d,y,k,g,v,x,b,w,z,j,C,E,T,W,M,S,O,D,L,P,R,A,F,X,Y,H=function(t,e,i,a){if("a"===i&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?a:"a"===i?a.call(t):a?a.value:e.get(t)},$=function(t,e,i,a,l){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!l)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?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};const B=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),d.add(this),y.set(this,[]),k.set(this,!1),g.set(this,0),v.set(this,0),x.set(this,[]),b.set(this,f()),w.set(this,(t=>{const e=t.clientX-H(this,g,"f"),i=t.clientY-H(this,v,"f");this.rootElement.scrollTop-=i,this.rootElement.scrollLeft-=e,$(this,g,t.clientX,"f"),$(this,v,t.clientY,"f")})),z.set(this,!1),j.set(this,null),this.autofitOnExpand=!0,this.autofitOnLoad=!0,this.cardData=null,this.collapsible=!0,this.customStyle="",this.data=null,this.layout=null,this.stackedLeaves=!1}async collapseAll(t=this.data.rows){H(this,b,"f").data.node.setProperties(t,{isExpanded:!1},!0),this.refresh()}async expandAll(t=this.data.rows){H(this,b,"f").data.node.setProperties(t,{isExpanded:!0},!0),this.refresh()}async getProps(t){return _(this,u,t)}async refresh(){i(this)}async runAutofit(){const t=H(this,j,"f").clientWidth,e=H(this,j,"f").children[0].clientWidth,i=.01,a=.85*t,l=.95*t;let r=1,o=2e3,n=e;for(;(n<a||n>l)&&o>0&&r>i;)o--,n<a?r+=i:n>l?r-=i:o=0,n=e*r;H(this,j,"f").style.setProperty("--kup_familytree_scale",r<=1?r.toFixed(2):"1")}async setProps(t){p(this,u,t)}componentWillLoad(){H(this,b,"f").debug.logLoad(this,!1),H(this,b,"f").language.register(this),H(this,b,"f").theme.register(this)}componentDidLoad(){H(this,d,"m",X).call(this),this.autofitOnLoad&&this.runAutofit(),H(this,b,"f").debug.logLoad(this,!0)}componentWillRender(){H(this,b,"f").debug.logRender(this,!1)}componentDidRender(){H(this,z,"f")&&($(this,z,!1,"f"),this.runAutofit()),H(this,b,"f").debug.logRender(this,!0)}render(){return a(l,{key:"794180479c55c31c847a73d20eee24d64703761a",onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault(),H(this,d,"m",L).call(this,t)},onWheel:t=>{H(this,d,"m",Y).call(this,t)}},a("style",{key:"29ba61f73082eff219190f04dde88c348599048e"},H(this,b,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"da6208fd0a75cd26714faee4c15bff91679619a1",id:c},H(this,d,"m",O).call(this)))}disconnectedCallback(){H(this,b,"f").language.unregister(this),H(this,b,"f").theme.unregister(this)}get rootElement(){return r(this)}};y=new WeakMap,k=new WeakMap,g=new WeakMap,v=new WeakMap,x=new WeakMap,b=new WeakMap,w=new WeakMap,z=new WeakMap,j=new WeakMap,d=new WeakSet,C=function(t,e,i,l){const r=[];return r.push(a("td",{class:{"family-tree__line":!0,"family-tree__line--right":!t,"family-tree__line--top":!t}},a("div",{class:"family-tree__line--placeholder"}))),r.push(a("td",{class:{"family-tree__line":!0,"family-tree__line--left":t,"family-tree__line--top":t&&!i||l&&!e}},a("div",{class:"family-tree__line--placeholder"}))),r},E=function t(e){var i;let l=null,r=null;(!this.collapsible||this.collapsible&&e.isExpanded)&&(null===(i=e.children)||void 0===i||i.forEach((t=>{t.isStaff?(r||(r=[]),r.push(t)):(l||(l=[]),l.push(t))})));const s=this.stackedLeaves&&l&&l.every((t=>!t.children||0==t.children.length)),f=l?2*l.length:1,_={"family-tree__line":!0,"family-tree__line--placeholder":!(!l&&!r),"family-tree__line--vertical":!(!l&&!r)},p={columns:[{name:"*TREECOL",title:"Fake column",visible:!1},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]},h=e.layout||this.layout||1,c={icon:e.isExpanded?"remove":"plus",shaped:!0,slim:!0,styling:n.OUTLINED,title:`${H(this,b,"f").language.translate(m.EXPAND)}/${H(this,b,"f").language.translate(m.COLLAPSE)} (CTRL + Click)`,onClick:t=>{t.ctrlKey&&e.children&&e.children.length>0&&(e.isExpanded?this.collapseAll(e.children):this.expandAll(e.children)),e.isExpanded=!e.isExpanded,this.autofitOnExpand&&$(this,z,!0,"f"),this.refresh()},wrapperClass:"family-tree__item__expand"};let u=null;H(this,d,"m",D).call(this,h)&&(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:p,cardData:this.cardData,layout:this.cardData?null:h,showSelection:!1}));const y=a("div",{class:"family-tree__item"},a("div",{class:"family-tree__item__wrapper"},H(this,d,"m",D).call(this,h)?u:H(this,d,"m",T).call(this,e,h),this.collapsible&&e.children&&e.children.length>0?a(o,Object.assign({},c)):void 0)),k={"--kup_familytree_staffchildren":(null==r?void 0:r.length.toString())||"0"};return a("table",{class:{"family-tree__node":!0,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||0==e.children.length)}},a("tr",null,a("td",{"data-row":e,colSpan:f},y)),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":!0}),style:k}),a("div",{class:"family-tree__node__staff",style:k},r.map((e=>[a("div",{class:"family-tree__node__staff__item"},H(this,d,"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=>H(this,d,"m",C).call(this,0==l.indexOf(t),l.indexOf(t)==l.length-1,1==l.length,l.length>2)))),a("tr",null,s?a("td",{colSpan:f},l.map((e=>H(this,d,"m",t).call(this,e)))):l.map((e=>a("td",{colSpan:2},H(this,d,"m",t).call(this,e)))))]:void 0)},T=function(t,e){return 2===e?H(this,d,"m",M).call(this,t):H(this,d,"m",W).call(this,t)},W=function(t){return a("div",{class:"family-tree__item__layout family-tree__item__layout--1"},a("div",{class:"family-tree__item__layout__text__title"},t.value))},M=function(t){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:t.icon,placeholderResource:t.placeholderIcon,sizeX:"48px",sizeY:"48px"})),a("div",{class:"family-tree__item__layout__text"},a("div",{class:"family-tree__item__layout__text__title"},t.value),t.title?a("div",{class:"family-tree__item__layout__text__subtitle"},t.title):null))},S=function(t){return t.map((t=>H(this,d,"m",E).call(this,t)))},O=function(){return a("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>$(this,j,t,"f")},this.data&&this.data.rows&&this.data.rows.length?H(this,d,"m",S).call(this,this.data.rows):a("div",null,H(this,b,"f").language.translate(m.EMPTY_DATA)))},D=function(t){return!!this.cardData||t&&t.sections&&t.sections.length>0},L=function(t){$(this,g,t.clientX,"f"),$(this,v,t.clientY,"f"),H(this,j,"f").classList.add("family-tree--dragging");const e=()=>{document.removeEventListener("pointermove",H(this,w,"f")),document.removeEventListener("pointerup",e),H(this,j,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",H(this,w,"f")),document.addEventListener("pointerup",e)},P=function(t,e){let i,a;if(t)for(let e=t.length-1;e>=0;e--){const l=t[e];l.tagName&&(l.classList.contains("family-tree__item__expand")&&(i=l),"TD"===l.tagName.toUpperCase())&&(a=l)}let l=null,r=null,o=null;return a&&(l=a["data-cell"],r=a["data-column"],o=a["data-row"]),{cell:l||null,column:r||null,expandButton:i||null,originalEvent:e,row:o||null,td:a||null}},R=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},A=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},F=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},X=function(){H(this,x,"f").push(this.rootElement),H(this,b,"f").interact.on(this.rootElement,h.TAP,(t=>{if(H(this,k,"f"))$(this,k,!1,"f");else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];H(this,y,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",R).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,t)})}})),H(this,b,"f").interact.on(this.rootElement,h.DOUBLETAP,(t=>{if(0===t.button){for(let t=0;t<H(this,y,"f").length;t++)clearTimeout(H(this,y,"f")[t]),H(this,b,"f").debug.logMessage(this,"Cleared clickHandler timeout("+H(this,y,"f")[t]+").");$(this,y,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",F).call(this,t)})}})),H(this,b,"f").interact.on(this.rootElement,h.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||($(this,k,!0,"f"),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,t)}))}))},Y=function(t){if(t.ctrlKey){t.preventDefault();const e=parseFloat(H(this,j,"f").style.getPropertyValue("--kup_familytree_scale"))||1,i=.05;let a=t.deltaY>0?e-i:e+i;a<i&&(a=i),H(this,j,"f").style.setProperty("--kup_familytree_scale",a.toFixed(2))}},B.style='.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}';export{B as kup_family_tree}
|
|
1
|
+
import{r as t,c as e,f as i,h as a,H as l,d as r}from"./p-b0368f88.js";import{F as o}from"./p-504fe614.js";import{a as n}from"./p-e3062c19.js";import{F as s}from"./p-f2213e00.js";import{k as f,g as _,s as p,h as m,O as h}from"./p-40ebfd27.js";import{c}from"./p-635bb4b3.js";import"./p-1ee561ba.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={}));var d,y,k,g,v,x,b,w,z,j,C,E,T,W,M,S,O,D,L,P,R,A,F,X,Y,H=function(t,e,i,a){if("a"===i&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?a:"a"===i?a.call(t):a?a.value:e.get(t)},$=function(t,e,i,a,l){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!l)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?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};const B=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),d.add(this),y.set(this,[]),k.set(this,!1),g.set(this,0),v.set(this,0),x.set(this,[]),b.set(this,f()),w.set(this,(t=>{const e=t.clientX-H(this,g,"f"),i=t.clientY-H(this,v,"f");this.rootElement.scrollTop-=i,this.rootElement.scrollLeft-=e,$(this,g,t.clientX,"f"),$(this,v,t.clientY,"f")})),z.set(this,!1),j.set(this,null),this.autofitOnExpand=!0,this.autofitOnLoad=!0,this.cardData=null,this.collapsible=!0,this.customStyle="",this.data=null,this.layout=null,this.stackedLeaves=!1}async collapseAll(t=this.data.rows){H(this,b,"f").data.node.setProperties(t,{isExpanded:!1},!0),this.refresh()}async expandAll(t=this.data.rows){H(this,b,"f").data.node.setProperties(t,{isExpanded:!0},!0),this.refresh()}async getProps(t){return _(this,u,t)}async refresh(){i(this)}async runAutofit(){const t=H(this,j,"f").clientWidth,e=H(this,j,"f").children[0].clientWidth,i=.01,a=.85*t,l=.95*t;let r=1,o=2e3,n=e;for(;(n<a||n>l)&&o>0&&r>i;)o--,n<a?r+=i:n>l?r-=i:o=0,n=e*r;H(this,j,"f").style.setProperty("--kup_familytree_scale",r<=1?r.toFixed(2):"1")}async setProps(t){p(this,u,t)}componentWillLoad(){H(this,b,"f").debug.logLoad(this,!1),H(this,b,"f").language.register(this),H(this,b,"f").theme.register(this)}componentDidLoad(){H(this,d,"m",X).call(this),this.autofitOnLoad&&this.runAutofit(),H(this,b,"f").debug.logLoad(this,!0)}componentWillRender(){H(this,b,"f").debug.logRender(this,!1)}componentDidRender(){H(this,z,"f")&&($(this,z,!1,"f"),this.runAutofit()),H(this,b,"f").debug.logRender(this,!0)}render(){return a(l,{key:"794180479c55c31c847a73d20eee24d64703761a",onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault(),H(this,d,"m",L).call(this,t)},onWheel:t=>{H(this,d,"m",Y).call(this,t)}},a("style",{key:"29ba61f73082eff219190f04dde88c348599048e"},H(this,b,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"da6208fd0a75cd26714faee4c15bff91679619a1",id:c},H(this,d,"m",O).call(this)))}disconnectedCallback(){H(this,b,"f").language.unregister(this),H(this,b,"f").theme.unregister(this)}get rootElement(){return r(this)}};y=new WeakMap,k=new WeakMap,g=new WeakMap,v=new WeakMap,x=new WeakMap,b=new WeakMap,w=new WeakMap,z=new WeakMap,j=new WeakMap,d=new WeakSet,C=function(t,e,i,l){const r=[];return r.push(a("td",{class:{"family-tree__line":!0,"family-tree__line--right":!t,"family-tree__line--top":!t}},a("div",{class:"family-tree__line--placeholder"}))),r.push(a("td",{class:{"family-tree__line":!0,"family-tree__line--left":t,"family-tree__line--top":t&&!i||l&&!e}},a("div",{class:"family-tree__line--placeholder"}))),r},E=function t(e){var i;let l=null,r=null;(!this.collapsible||this.collapsible&&e.isExpanded)&&(null===(i=e.children)||void 0===i||i.forEach((t=>{t.isStaff?(r||(r=[]),r.push(t)):(l||(l=[]),l.push(t))})));const s=this.stackedLeaves&&l&&l.every((t=>!t.children||0==t.children.length)),f=l?2*l.length:1,_={"family-tree__line":!0,"family-tree__line--placeholder":!(!l&&!r),"family-tree__line--vertical":!(!l&&!r)},p={columns:[{name:"*TREECOL",title:"Fake column",visible:!1},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]},h=e.layout||this.layout||1,c={icon:e.isExpanded?"remove":"plus",shaped:!0,slim:!0,styling:n.OUTLINED,title:`${H(this,b,"f").language.translate(m.EXPAND)}/${H(this,b,"f").language.translate(m.COLLAPSE)} (CTRL + Click)`,onClick:t=>{t.ctrlKey&&e.children&&e.children.length>0&&(e.isExpanded?this.collapseAll(e.children):this.expandAll(e.children)),e.isExpanded=!e.isExpanded,this.autofitOnExpand&&$(this,z,!0,"f"),this.refresh()},wrapperClass:"family-tree__item__expand"};let u=null;H(this,d,"m",D).call(this,h)&&(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:p,cardData:this.cardData,layout:this.cardData?null:h,showSelection:!1}));const y=a("div",{class:"family-tree__item"},a("div",{class:"family-tree__item__wrapper"},H(this,d,"m",D).call(this,h)?u:H(this,d,"m",T).call(this,e,h),this.collapsible&&e.children&&e.children.length>0?a(o,Object.assign({},c)):void 0)),k={"--kup_familytree_staffchildren":(null==r?void 0:r.length.toString())||"0"};return a("table",{class:{"family-tree__node":!0,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||0==e.children.length)}},a("tr",null,a("td",{"data-row":e,colSpan:f},y)),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":!0}),style:k}),a("div",{class:"family-tree__node__staff",style:k},r.map((e=>[a("div",{class:"family-tree__node__staff__item"},H(this,d,"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=>H(this,d,"m",C).call(this,0==l.indexOf(t),l.indexOf(t)==l.length-1,1==l.length,l.length>2)))),a("tr",null,s?a("td",{colSpan:f},l.map((e=>H(this,d,"m",t).call(this,e)))):l.map((e=>a("td",{colSpan:2},H(this,d,"m",t).call(this,e)))))]:void 0)},T=function(t,e){return 2===e?H(this,d,"m",M).call(this,t):H(this,d,"m",W).call(this,t)},W=function(t){return a("div",{class:"family-tree__item__layout family-tree__item__layout--1"},a("div",{class:"family-tree__item__layout__text__title"},t.value))},M=function(t){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:t.icon,placeholderResource:t.placeholderIcon,sizeX:"48px",sizeY:"48px"})),a("div",{class:"family-tree__item__layout__text"},a("div",{class:"family-tree__item__layout__text__title"},t.value),t.title?a("div",{class:"family-tree__item__layout__text__subtitle"},t.title):null))},S=function(t){return t.map((t=>H(this,d,"m",E).call(this,t)))},O=function(){return a("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>$(this,j,t,"f")},this.data&&this.data.rows&&this.data.rows.length?H(this,d,"m",S).call(this,this.data.rows):a("div",null,H(this,b,"f").language.translate(m.EMPTY_DATA)))},D=function(t){return!!this.cardData||t&&t.sections&&t.sections.length>0},L=function(t){$(this,g,t.clientX,"f"),$(this,v,t.clientY,"f"),H(this,j,"f").classList.add("family-tree--dragging");const e=()=>{document.removeEventListener("pointermove",H(this,w,"f")),document.removeEventListener("pointerup",e),H(this,j,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",H(this,w,"f")),document.addEventListener("pointerup",e)},P=function(t,e){let i,a;if(t)for(let e=t.length-1;e>=0;e--){const l=t[e];l.tagName&&(l.classList.contains("family-tree__item__expand")&&(i=l),"TD"===l.tagName.toUpperCase())&&(a=l)}let l=null,r=null,o=null;return a&&(l=a["data-cell"],r=a["data-column"],o=a["data-row"]),{cell:l||null,column:r||null,expandButton:i||null,originalEvent:e,row:o||null,td:a||null}},R=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},A=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},F=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},X=function(){H(this,x,"f").push(this.rootElement),H(this,b,"f").interact.on(this.rootElement,h.TAP,(t=>{if(H(this,k,"f"))$(this,k,!1,"f");else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];H(this,y,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",R).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,t)})}})),H(this,b,"f").interact.on(this.rootElement,h.DOUBLETAP,(t=>{if(0===t.button){for(let t=0;t<H(this,y,"f").length;t++)clearTimeout(H(this,y,"f")[t]),H(this,b,"f").debug.logMessage(this,"Cleared clickHandler timeout("+H(this,y,"f")[t]+").");$(this,y,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",F).call(this,t)})}})),H(this,b,"f").interact.on(this.rootElement,h.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||($(this,k,!0,"f"),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,t)}))}))},Y=function(t){if(t.ctrlKey){t.preventDefault();const e=parseFloat(H(this,j,"f").style.getPropertyValue("--kup_familytree_scale"))||1,i=.05;let a=t.deltaY>0?e-i:e+i;a<i&&(a=i),H(this,j,"f").style.setProperty("--kup_familytree_scale",a.toFixed(2))}},B.style='.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}';export{B as kup_family_tree}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as o}from"./p-b0368f88.js";import{a as t,k as n,c as e}from"./p-
|
|
1
|
+
import{h as o}from"./p-b0368f88.js";import{a as t,k as n,c as e}from"./p-40ebfd27.js";import{F as c}from"./p-504fe614.js";import{a as i}from"./p-e3062c19.js";import{F as l}from"./p-adef8395.js";const s=new WeakMap,r=n=>{var e;return o("div",{class:`f-object-field ${n.wrapperClass?n.wrapperClass:""}`,ref:async o=>{o&&(n.root=o,b(n))}},o(l,Object.assign({icon:"search",trailingIcon:!0,disabled:!1},null===(e=n.cell)||void 0===e?void 0:e.data,{value:n.inputValue,onChange:n.onChange,onIconClick:f.icon.bind(n),onInput:f.input.bind(n),onKeyDown:f.keydown.bind(n)})),o(c,{icon:"menu",onClick:f.button.bind(n),sizing:t.SMALL,styling:i.FLAT,wrapperClass:"obj-field-extra-btn"}),o("kup-toolbar",{"onKup-toolbar-click":f.toolbar.bind(n)}))};function a(o){const{cell:t}=o,e=s.get(t),{clickCb:c}=e,{toolbar:i}=u(e),l=n();l.dynamicPosition.stop(i),l.removeClickCallback(c),i.style.display="none",e.isListOpened=!1}const u=o=>{const{children:t,clickCb:n,root:e}=o;return Object.keys(o.children).length||(t.button=e.querySelector(".f-button"),t.textfield=e.querySelector(".f-text-field"),t.toolbar=e.querySelector("kup-toolbar"),n.el=t.toolbar),t},b=o=>{const{cell:t,root:n}=o,e=s.get(t);s.set(t,e?Object.assign(Object.assign({},e),{root:n,children:u(e)}):{children:{},clickCb:{cb:a.bind(a,o)},inputValue:o.inputValue,isListOpened:!1,root:n})},p=(o,t,n)=>{const{cell:e,column:c,row:i,root:l}=o,{children:r,inputValue:a}=s.get(e),u=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,detail:{cell:e,children:r,column:c,inputValue:a,originalEvent:n,row:i}});l.dispatchEvent(u)},f={button:function(o){(function(o){const{cell:t}=o,c=s.get(t),{isListOpened:i}=c;i?a(o):function(o){const{cell:t}=o,c=s.get(t),{isListOpened:i,clickCb:l}=c,{button:r,toolbar:a}=u(c);if(i)return;const b=n();b.dynamicPosition.isRegistered(a)?b.dynamicPosition.changeAnchor(a,r):b.dynamicPosition.register(a,r,0,e.AUTO,!1),b.dynamicPosition.start(a),b.addClickCallback(l,!0),a.style.display="block",c.isListOpened=!0}(o)})(this),p(this,"kup-objectfield-opensearchmenu",o)},icon:function(o){p(this,"kup-objectfield-searchpayload",o)},input:function(o){const{cell:t}=this;s.get(t).inputValue=o.target.value},keydown:function(o){"F4"===o.code&&(o.preventDefault(),o.stopPropagation(),p(this,"kup-objectfield-searchpayload",o))},toolbar:function(o){a(this),p(this,"kup-objectfield-selectedmenuitem",o)}};export{r as F}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as a,H as s,d as o}from"./p-b0368f88.js";import{k as n,g as h,s as r,t as c,ab as l}from"./p-
|
|
1
|
+
import{r as t,c as e,f as i,h as a,H as s,d as o}from"./p-b0368f88.js";import{k as n,g as h,s as r,t as c,ab as l}from"./p-40ebfd27.js";import{c as p}from"./p-635bb4b3.js";import"./p-1ee561ba.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={}));var u,m=function(t,e,i,a){if("a"===i&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?a:"a"===i?a.call(t):a?a.value:e.get(t)};const d=class{constructor(i){t(this,i),this.kupCardListClickEvent=e(this,"kup-cardlist-click",7),u.set(this,n()),this.columnsNumber=1,this.customStyle="",this.data=null,this.fullWidth=!0,this.horizontal=!1,this.descrCol="",this.iconCol="",this.valueCol="",this.measureCol="",this.intvalueCol="",this.decvalueCol="",this.textcolorCol="",this.valuecolorCol="",this.iconcolorCol="",this.layoutCol="",this.isClickable=!1}async getProps(t){return h(this,f,t)}async refresh(){i(this)}async setProps(t){r(this,f,t)}componentWillLoad(){m(this,u,"f").debug.logLoad(this,!1),m(this,u,"f").theme.register(this)}componentDidLoad(){m(this,u,"f").debug.logLoad(this,!0)}componentDidRender(){m(this,u,"f").debug.logRender(this,!0)}render(){if(!this.data||!this.data.columns||!this.data.columns.length)return;const t=[];let e,i,o,n,h,r,f,d,g,k;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:h=a;break;case this.layoutCol:r=a;break;case this.measureCol:f=a;break;case this.textcolorCol:d=a;break;case this.valueCol:g=a;break;case this.valuecolorCol:k=a}}for(let s=0;s<this.data.rows.length;s++){const p=this.data.rows[s],x={color:[],image:[],text:[]},y=r&&p.cells[r.name].value?parseInt(p.cells[r.name].value):1,w=a("kup-card",{class:this.isClickable?"is-clickable":"",customStyle:"#kup-component, .scalable-card { min-height: var(--kup_cardlist_cardsminheight) }",data:x,layoutFamily:c.SCALABLE,layoutNumber:y,key:s,"onKup-card-click":()=>{this.isClickable&&this.kupCardListClickEvent.emit({comp:this,id:this.rootElement.id,index:s,row:p})},slot:s.toString()}),b=(t,e,i)=>{if(t){const a=p.cells[t.name];if(a){const s=a.value;switch(e){case"color":x[e][i]=m(this,u,"f").theme.colorCheck(s).hexColor;break;case"image":x[e][i]={resource:s};break;default:x[e][i]=l(t,a)}}}};switch(y){case 1:b(d,"color",0),b(k,"color",1),b(i,"text",0),b(g,"text",1);break;case 2:b(n,"color",0),b(k,"color",1),b(o,"image",0),b(h,"text",0),b(e,"text",1),b(f,"text",2);break;case 3:b(k,"color",0),b(d,"color",1),b(g,"text",0),b(i,"text",1);break;case 4:b(n,"color",0),b(k,"color",1),b(d,"color",2),b(o,"image",0),b(h,"text",0),b(e,"text",1),b(f,"text",2),b(i,"text",3);break;case 5:b(n,"color",0),b(d,"color",1),b(k,"color",2),b(o,"image",0),b(i,"text",0),b(g,"text",1);break;case 6:case 7:case 8:b(n,"color",0),b(k,"color",1),b(d,"color",2),b(o,"image",0),b(g,"text",0),b(i,"text",1)}t.push(w)}return a(s,null,a("style",null,m(this,u,"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(){m(this,u,"f").theme.unregister(this)}get rootElement(){return o(this)}};u=new WeakMap,d.style=".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:fit-content;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}";export{d as kup_card_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as n,f as e,h as i,H as a,d as p}from"./p-b0368f88.js";import{k as o,e as s,g as h,s as l}from"./p-
|
|
1
|
+
import{r as t,c as n,f as e,h as i,H as a,d as p}from"./p-b0368f88.js";import{k as o,e as s,g as h,s as l}from"./p-40ebfd27.js";import{a as f,F as r}from"./p-60cfddce.js";import{c}from"./p-635bb4b3.js";import"./p-1ee561ba.js";var u;!function(t){t.data="prop of the sub compoennt",t.Style="it is the style of the text",t.Border="when true it will appear a border",t.BorderWidth="it is the width of the border",t.Align="text alignment",t.FontBold="when true it will display the bold font",t.FontItalic="when true it will display the italic ( cursive )",t.FontName="it is the name of the font",t.FontSize="it is the size of the font of the text",t.FontULine="when true it will show the underline",t.FontColor="it is the color of the font of the text",t.BackColor="it is the background color of the text",t.Type="it is the type of the font. It is an enum that can take from different variant such as body, heading1, caption and so on"}(u||(u={}));const g=class{constructor(e){t(this,e),this.kupIconClick=n(this,"kup-typographylist-icon-click",6),this.KupClick=n(this,"kup-typographylist-click",6),this.kupManager=o(),this.customStyle="",this.data=[],this.type=f.BODY_COMPACT,this.toolbar=!1}onKupClick(t,n){this.KupClick.emit({comp:this,id:this.rootElement.id,index:t,subIndex:n,obj:this.getObjForEvent(t,n)})}onKupIconClick(t,n){this.kupIconClick.emit({comp:this,id:this.rootElement.id,index:t,node:n})}checkDataset(t){t||(t=[]),t.columns&&(this.kupManager.debug.logMessage(this,"Detected KupDataDataset: converting rows to nodes.",s.WARNING),this.data=this.kupManager.data.row.toNode(this.data))}async getProps(t){return h(this,u,t)}async refresh(){e(this)}async setProps(t){l(this,u,t)}renderTypography(t,n){if(null===t)return this.kupManager.debug.logMessage(this,"Empty data text.",s.WARNING),null;const e=this.prepareDataFromTreeNode(t,n);return e.value?i(r,Object.assign({},{value:e.value,type:e.type,toolbar:e.toolbar})):(this.kupManager.debug.logMessage(this,"Empty text.",s.WARNING),null)}prepareDataFromTreeNode(t,n){const e=null!=t.data?Object.assign({},t.data):{};return null!=this.customStyle&&""!=this.customStyle.trim()&&(e.customStyle=this.customStyle),null==e.value&&(e.value=t.value),e.wrapperClass||(e.wrapperClass=""),null!=this.type&&(e.type=this.type),null!=this.toolbar&&(e.toolbar=this.toolbar),e.id=n.toString(),e}renderTypographys(){if(null==this.data||this.data.length<1)return null;const t=[];for(let n=0;n<this.data.length;n++){let e=null;e=this.renderTypography(this.data[n],n),e&&t.push(e)}return t}getObjForEvent(t,n){let e=Number(t),i=-1;null!=n&&""!=n.trim()&&(i=Number(n));let a=this.data[e];return-1!=i?a.children[i].obj:a.obj}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.checkDataset(this.data),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){const t=this.renderTypographys();return i(a,{key:"8f26e4a08f8e7d6f1817e9438d1564c9d96df79a"},i("style",{key:"3eaac8b78691e9d0e0d46998cc412f3f9ac5a448"},this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{key:"d95cbe2301b7cb41056c15de94cd90db27d44d38",id:c},i("div",{key:"f51149ee4665b2987a70344071de5a73e4c9b229",class:"typographies-wrapper"},t)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return p(this)}static get watchers(){return{data:["checkDataset"]}}};g.style=".kup-body-compact-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-compact-01-font-size, 14px);\n line-height: 18px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-body-01 {\n font-family: var(--kup-font-family);\n font-size: var(--kup-body-01-font-size, 14px);\n line-height: 20px;\n font-weight: 400;\n letter-spacing: 0.16px;\n}\n\n.kup-code-01 {\n font-family: var(--kup-font-family-monospace);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-label-01 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 16px;\n font-weight: 400;\n letter-spacing: 0.32px;\n}\n\n.kup-caption-02 {\n font-family: var(--kup-font-family);\n font-size: 12px;\n line-height: 15px;\n font-weight: 500;\n letter-spacing: 1px;\n}\n\n.kup-caption-01 {\n font-family: var(--kup-font-family);\n font-size: 10px;\n line-height: 13px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-small-label-01 {\n font-family: var(--kup-font-family);\n font-size: 6px;\n line-height: 9px;\n font-weight: 400;\n letter-spacing: 1px;\n}\n\n.kup-heading-compact-01 {\n font-family: var(--kup-font-family);\n font-size: 14px;\n line-height: 18px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-01 {\n font-family: var(--kup-font-family);\n font-size: 14px;\n line-height: 20px;\n font-weight: 600;\n letter-spacing: 0.16px;\n}\n\n.kup-heading-02 {\n font-family: var(--kup-font-family);\n font-size: 16px;\n line-height: 24px;\n font-weight: 500;\n letter-spacing: 0;\n}\n\n.kup-heading-03 {\n font-family: var(--kup-font-family);\n font-size: 20px;\n line-height: 28px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-04 {\n font-family: var(--kup-font-family);\n font-size: 28px;\n line-height: 36px;\n font-weight: 400;\n letter-spacing: 0;\n}\n\n.kup-heading-05 {\n font-family: var(--kup-font-family);\n font-size: 32px;\n line-height: 40px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-06 {\n font-family: var(--kup-font-family);\n font-size: 42px;\n line-height: 50px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-07 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 300;\n letter-spacing: 0;\n}\n\n.kup-heading-08 {\n font-family: var(--kup-font-family);\n font-size: 54px;\n line-height: 64px;\n font-weight: 600;\n letter-spacing: 0;\n}\n\n:host {\n --kup_typographylist_wrapper_gap: var(\n --kup-typographylist-wrapper-gap,\n var(--kup-space-00) ;\n );\n}\n\n.typographies-wrapper {\n display: flex;\n flex-direction: column;\n gap: var(--kup_typographylist_wrapper_gap);\n}\n\n:host {\n display: block;\n}";export{g as kup_typography_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,h as t,d as e}from"./p-b0368f88.js";import{k as o}from"./p-
|
|
1
|
+
import{r as i,h as t,d as e}from"./p-b0368f88.js";import{k as o}from"./p-40ebfd27.js";import"./p-1ee561ba.js";const p=class{constructor(t){i(this,t),this.kupManager=o(),this.config=void 0,this.qlik=void 0,this.appid="",this.app=!1,this.grid=[],this.debug=!1,this.fluid=!1,this.bordered=!1,this.defobjsize="400px",this.divlist=[]}getObjects(i){let t;return new Promise((e=>{i.rows.forEach((i=>{i.columns.forEach((i=>{t=!1,i.noSelections&&(t=i.noSelections),this.app.getObject(i.obj,i.obj,{noInteraction:!1,noSelections:t})}))})),e(!0)}))}doSelection(i){return new Promise((t=>{i.selections&&i.selections.forEach((i=>{this.app.field(i.field).selectValues(i.values,!1,!0)})),t(!0)}))}setRender(i){return new Promise((e=>{this.divlist=[],i.rows.forEach((i=>{let e=[];i.columns.forEach((i=>{let o="qvobject ";this.bordered&&(o+="bordered "),o=o+"width-"+i.colDim+" size-"+i.size,e.push(t("div",""!=i.obj?{id:i.obj,class:o}:{class:o}))})),this.divlist.push(t("div",{class:"kup-qlik-row"},e))})),e(!0)}))}componentWillLoad(){this.kupManager.debug.logLoad(this,!1)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1),this.setRender(this.grid)}render(){let i=null,e=null;return i=this.fluid?{"kup-qlik-container-fluid":!0}:{"kup-qlik-container":!0},e={"--lyo_obj-height":this.defobjsize},t("div",{key:"953275d575be5cce36f0331d7b0c40de0e1b678d",class:i,style:e},this.divlist)}componentDidRender(){this.debug&&console.log("Grid",this.grid),this.qlik&&(""==this.appid||this.app?this.debug&&console.log("App already open:",this.app):this.app=this.qlik.openApp(this.appid,this.config),this.app&&this.getObjects(this.grid).then((()=>{this.doSelection(this.grid)}))),this.kupManager.debug.logRender(this,!0)}get rootElement(){return e(this)}};p.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}.kup-qlik-container-fluid{width:100%}.kup-qlik-container{width:100%}@media (min-width: 576px){.kup-qlik-container{width:576px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 768px){.kup-qlik-container{width:768px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 992px){.kup-qlik-container{width:992px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}@media (min-width: 1200px){.kup-qlik-container{width:1200px}.kup-qlik-row>.qvobject{flex:0 0 auto;min-width:100px;margin:0px auto 5px auto}}.kup-qlik-row{display:flex;display:ms-flexbox;flex-wrap:wrap;-ms-flex-wrap:wrap;margin-bottom:5px}.kup-qlik-row .size-M{height:var(--lyo_obj-height)}.kup-qlik-row .size-S{height:calc(var(--lyo_obj-height) / 2)}.kup-qlik-row .size-XS{height:calc(var(--lyo_obj-height) / 3)}.kup-qlik-row .size-L{height:calc(var(--lyo_obj-height) * 2)}.kup-qlik-row .size-XL{height:calc(var(--lyo_obj-height) * 3)}.kup-qlik-row .bordered{border:1px solid var(--kup-border-subtle, #969696)}.kup-qlik-row .width-1{width:8.3333%}.kup-qlik-row .width-2{width:16.6666%}.kup-qlik-row .width-3{width:25%}.kup-qlik-row .width-4{width:33.3333%}.kup-qlik-row .width-5{width:41.6666%}.kup-qlik-row .width-6{width:50%}.kup-qlik-row .width-7{width:58.3333%}.kup-qlik-row .width-8{width:66.6666%}.kup-qlik-row .width-9{width:75%}.kup-qlik-row .width-10{width:83.3333%}.kup-qlik-row .width-11{width:91.6666%}.kup-qlik-row .width-12{width:100%}";export{p as kup_qlik}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as a,H as h,d as n}from"./p-b0368f88.js";import{k as o,g as p,s}from"./p-
|
|
1
|
+
import{r as t,c as e,f as i,h as a,H as h,d as n}from"./p-b0368f88.js";import{k as o,g as p,s}from"./p-40ebfd27.js";import{c as l}from"./p-635bb4b3.js";import"./p-1ee561ba.js";var f,c;!function(t){t.componentName="Sets the tag name of the component to be lazy loaded.",t.customStyle="Custom style of the component.",t.data="Sets the data of the component to be lazy loaded.",t.showPlaceholder="Displays an animated SVG placeholder until the component is loaded."}(f||(f={})),function(t){t.VIEWPORT="viewport",t.PROPS="props",t.BOTH="both"}(c||(c={}));const d=class{constructor(i){t(this,i),this.kupLazyLoaded=e(this,"kup-lazy-loaded",6),this.intObserver=null,this.kupManager=o(),this.lazyComponent=null,this.lazyComponentLoaded=!1,this.isInViewport=!1,this.componentName=null,this.customStyle="",this.data=null,this.renderMode=c.BOTH,this.showPlaceholder=!0}async getProps(t){return p(this,f,t)}async getComponent(){return this.lazyComponent}async refresh(){i(this)}async setProps(t){s(this,f,t)}setObserver(){this.intObserver=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.kupManager.debug.logMessage(this,"kup-lazy entering the viewport, rendering "+this.componentName+"."),this.isInViewport=!0,this.intObserver.unobserve(this.rootElement))}))}),{threshold:.25})}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.setObserver()}componentDidLoad(){this.intObserver.observe(this.rootElement),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.lazyComponent&&!this.lazyComponentLoaded&&(this.lazyComponentLoaded=!0,this.kupLazyLoaded.emit({comp:this,id:this.rootElement.id})),this.kupManager.debug.logRender(this,!0)}render(){let t,e,i=this.componentName;switch(this.componentName){case"kup-button":e=a("svg",{key:"fae1bbf13d272c54202ef51f681388ec62a998ce",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"11d474a91430a995fe5a839349f7e5f8ae25f0f3",d:"M42 6H6c-2.2 0-4 1.8-4 4v28c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4V10c0-2.2-1.8-4-4-4zm0 32H6v-6h36v6z"}));break;case"kup-card":e=a("svg",{key:"9585bf08511b88191d891a956b059c7dddee3184",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"95a3d7b9a4644dbaa9bfc38440df8819f009bc1b",d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}));break;case"kup-checkbox":e=a("svg",{key:"6e96b294e13695fe7919a8047cf0b2616c897527",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"f8c6a50ed3225f902eabb853bbeebbb2b16acf3f",d:"M38 10v28H10V10h28m0-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4z"}));break;case"kup-chart":e=a("svg",{key:"292adcee2f17141a84ee9696941d8ceb44373b48",xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},a("path",{key:"4babd2ad182cf158941fc73f5ce937c5b72b76d2",d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":e=a("svg",{key:"e1f780646b2581e0dce3f66cd44c522be64dd286",xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},a("path",{key:"80803ce2ede8637a62be98c59d40c9e668603dc9",d:"M4,3H20A2,2 0 0,1 22,5V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V5A2,2 0 0,1 4,3M4,7V10H8V7H4M10,7V10H14V7H10M20,10V7H16V10H20M4,12V15H8V12H4M4,20H8V17H4V20M10,12V15H14V12H10M10,20H14V17H10V20M20,20V17H16V20H20M20,12H16V15H20V12Z"}));break;case"kup-image":e=a("svg",{key:"695e368ba41d4d8507b558d6f372f182c0dff18a",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"5a88603b6e142b2dbbc37682fcca7e12f994c7ee",d:"M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"}));break;case"kup-progress-bar":e=a("svg",{key:"7889e02daf972afb3e28c1409be9c070245da8fe",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"ac721fd2fccf78250d095e5b40a8cfac48183d5a",d:"M39 19c-2.05 0-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3s-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3-2.77 0-5 2.23-5 5s2.23 5 5 5c2.05 0 3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3s3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3 2.77 0 5-2.23 5-5s-2.23-5-5-5z"}));break;case"kup-radio":e=a("svg",{key:"aa1787b48f62a6992dbce7f221012535c25707c1",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"3b1ab1419dd67b5116639a8afbbdb53c510392ea",d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z"}));break;default:e=a("svg",{key:"89dfba9ea1a9a9b713538bfb36a2961f617b4e57",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},a("path",{key:"7f50de3733354e832f065f173519ccce3d8874d4",d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}))}return this.renderMode===c.VIEWPORT&&this.isInViewport||this.renderMode===c.PROPS&&this.data||this.renderMode===c.BOTH&&this.data&&this.isInViewport?(t=a(this.componentName,Object.assign({key:"a38145c24a4458edde8a967dea131c22c7aa3ac0"},this.data,{ref:t=>this.lazyComponent=t})),i+=" kup-loaded"):this.showPlaceholder&&(t=e,i+=" kup-to-be-loaded"),a(h,{key:"9c39ec36b4088f74db7b6d32ee40529d7437d206",class:i},a("style",{key:"a11b797eb1925f3e652d429e915680a50bff6b98"},this.kupManager.theme.setKupStyle(this.rootElement)),a("div",{key:"f7dda28649ba016306f903f5641e214ba23b52a7",id:l},t))}disconnectedCallback(){var t;this.kupManager.theme.unregister(this),null===(t=this.intObserver)||void 0===t||t.unobserve(this.rootElement)}get rootElement(){return n(this)}};d.style=".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_lazy_animation_time:var(--kup-lazy-animation-time, 2s);--kup_lazy_hor_alignment:var(--kup-lazy-hor-alignment, center);--kup_lazy_placeholder_color:var(\n --kup-lazy-placeholder-color,\n var(--kup-icon-color)\n );--kup_lazy_height:var(--kup-lazy-height, 100%);--kup_lazy_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_width:var(--kup-lazy-width, 100%);display:block;height:var(--kup_lazy_height);width:var(--kup_lazy_width);position:relative}#kup-component{align-items:var(--kup_lazy_ver_alignment);display:flex;justify-content:var(--kup_lazy_hor_alignment);height:var(--kup_lazy_height);width:var(--kup_lazy_width)}#kup-component>*{height:var(--kup_lazy_height)}#kup-component kup-data-table{min-width:100%}.kup-loaded,.kup-to-be-loaded{height:var(--kup_lazy_height);width:var(--kup_lazy_width)}svg{fill:var(--kup_lazy_placeholder_color);animation:shine ease var(--kup_lazy_animation_time) infinite}@keyframes shine{0%{opacity:0.4}50%{opacity:0.8}100%{opacity:0.4}}:host(.kup-bottom-aligned){--kup-lazy-ver-alignment:flex-end}:host(.kup-left-aligned){--kup-lazy-hor-alignment:flex-start}:host(.kup-right-aligned){--kup-lazy-hor-alignment:flex-end}:host(.kup-top-aligned){--kup-lazy-ver-alignment:flex-start}:host(.kup-to-be-loaded) #kup-component{position:absolute}:host(.kup-to-be-loaded) #kup-component>*{margin:auto}";export{d as kup_lazy}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,f as e,h as n,F as a,H as o,d as r}from"./p-b0368f88.js";import{k as p,g as l,s,e as m,ab as c}from"./p-
|
|
1
|
+
import{r as t,c as i,f as e,h as n,F as a,H as o,d as r}from"./p-b0368f88.js";import{k as p,g as l,s,e as m,ab as c}from"./p-40ebfd27.js";import{c as h}from"./p-635bb4b3.js";import{F as f}from"./p-f2213e00.js";import{s as d}from"./p-7d047a5b.js";import"./p-1ee561ba.js";var g,u;!function(t){t.data="Dataset containing the activities list",t.dateColumn="Column containing dates",t.timeColumn="Column containing times",t.sortOrder="Order for sorting"}(g||(g={})),function(t){t.onClick="onClick",t.onRightClick="onRightClick"}(u||(u={}));var x,v,y,k=function(t,i,e,n){if("a"===e&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?t!==i||!n:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?n:"a"===e?n.call(t):n?n.value:i.get(t)};const w=class{constructor(e){t(this,e),this.kupClick=i(this,"kup-activitytimeline-click",6),this.kupContextMenu=i(this,"kup-activitytimeline-contextmenu",6),this.kupReady=i(this,"kup-activitytimeline-ready",6),x.add(this),v.set(this,p()),this.timeline=[],this.data=void 0,this.dateColumn=void 0,this.sort=[],this.timeColumn=void 0}async getProps(t){return l(this,g,t)}async refresh(){e(this)}async setProps(t){s(this,g,t)}getActivity(t){return{column:this.data.columns.find((i=>i.name===t.columnName)),row:this.data.rows.find((i=>i.id===t.rowId))}}onActivityClick(t,i){this.kupClick.emit({comp:this,id:this.rootElement.id,details:Object.assign(Object.assign({},this.getActivity(i)),{originalEvent:t,type:u.onClick})})}onActivityContextMenu(t,i){this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:Object.assign(Object.assign({},this.getActivity(i)),{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:i=>{i.stopPropagation(),this.onActivityClick(i,t)},onContextMenu:i=>{this.onActivityContextMenu(i,t)}},n("p",null,t.value))))))}calendarIcon(){return n(f,{color:"white",resource:"calendar",wrapperClass:"activity-timeline-item__icon",sizeX:"20px",sizeY:"32px"})}componentWillLoad(){k(this,v,"f").debug.logLoad(this,!1),k(this,v,"f").theme.register(this)}componentDidLoad(){this.kupReady.emit({comp:this,id:this.rootElement.id}),k(this,v,"f").debug.logLoad(this,!0)}componentWillRender(){k(this,v,"f").debug.logRender(this,!1)}componentDidRender(){k(this,v,"f").debug.logRender(this,!0)}render(){var t,i;if(!Boolean(!(null===(t=this.data)||void 0===t?void 0:t.columns)||!(null===(i=this.data)||void 0===i?void 0:i.rows)))return this.timeline=k(this,x,"m",y).call(this,this.data),n(o,null,n("style",null,k(this,v,"f").theme.setKupStyle(this.rootElement)),n("div",{id:h},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))))))))))));k(this,v,"f").debug.logMessage(this,"Empty data.",m.WARNING)}disconnectedCallback(){k(this,v,"f").theme.unregister(this)}get rootElement(){return r(this)}};v=new WeakMap,x=new WeakSet,y=function(t){const{columns:i,rows:e}=t,n=i.find((t=>t.name===this.dateColumn)),a=i.find((t=>t.name===this.timeColumn));if(!n||!a)return[];const o=d(e,this.sort).reduce(((t,e)=>{const o=`${c(n,e.cells[n.name])} ${c(a,e.cells[a.name])}`;return t[o]=t[o]||[],t[o].push({columns:i.filter((t=>!1!==t.visible)).map((t=>({title:t.title,value:c(t,e.cells[t.name]),columnName:t.name,rowId:e.id})))}),t}),{});return Object.entries(o).map((([t,i])=>({date:t,activities:i})))},w.style='.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)}}';export{w as kup_activity_timeline}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,f as i,h as o,H as a,d as n}from"./p-b0368f88.js";import{k as s,g as f,s as p}from"./p-
|
|
1
|
+
import{r as t,c as e,f as i,h as o,H as a,d as n}from"./p-b0368f88.js";import{k as s,g as f,s as p}from"./p-40ebfd27.js";import{c as h}from"./p-635bb4b3.js";import"./p-1ee561ba.js";var r;!function(t){t.customStyle="Custom style of the component.",t.placeholderAttrs="Html attributes of the picture before the component enters the viewport.",t.resourceAttrs="Html attributes of the picture after the component enters the viewport."}(r||(r={}));var l,c,d,m,u,g,k=function(t,e,i,o){if("a"===i&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?o:"a"===i?o.call(t):o?o.value:e.get(t)},y=function(t,e,i,o,a){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?a.call(t,i):a?a.value=i:e.set(t,i),i};const b=class{constructor(i){t(this,i),this.kupPhotoFramePlaceholderLoad=e(this,"kup-photoframe-placeholderload",6),this.kupPhotoFrameResourceLoad=e(this,"kup-photoframe-resourceload",6),l.set(this,null),c.set(this,s()),d.set(this,null),m.set(this,null),u.set(this,!1),g.set(this,null),this.isInViewport=!1,this.customStyle="",this.placeholderAttrs={},this.resourceAttrs={},this.threshold=.25}async getProps(t){return f(this,r,t)}async refresh(){i(this)}async setProps(t){p(this,r,t)}setObserver(){y(this,l,new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.isInViewport=!0,k(this,l,"f").unobserve(this.rootElement))}))}),{threshold:this.threshold}),"f")}componentWillLoad(){k(this,c,"f").debug.logLoad(this,!1),k(this,c,"f").theme.register(this),this.setObserver()}componentDidLoad(){k(this,c,"f").debug.logLoad(this,!0)}componentWillRender(){k(this,c,"f").debug.logRender(this,!1)}componentDidRender(){k(this,c,"f").debug.logRender(this,!0)}render(){return this.isInViewport&&!k(this,u,"f")&&y(this,u,!0,"f"),o(a,{key:"56245c9deb52cf61082252db14406d81d195bafe"},o("style",{key:"9c8242d826b3b98fd7956af2283b423041253936"},k(this,c,"f").theme.setKupStyle(this.rootElement)),o("div",{key:"3ca3afec38aeafdb6d39baac4724bb0d15c85726",id:h,ref:t=>{y(this,g,t,"f")}},o("img",Object.assign({key:"33cb6fbaf5250f6e062c7392045d159935f8e0b6"},this.placeholderAttrs,{class:"placeholder",ref:t=>y(this,d,t,"f"),onLoad:()=>{k(this,d,"f").naturalWidth>k(this,d,"f").naturalHeight?k(this,g,"f").classList.add("horizontal"):k(this,g,"f").classList.add("vertical"),k(this,l,"f").observe(this.rootElement),k(this,d,"f").classList.add("placeholder--loaded"),this.kupPhotoFramePlaceholderLoad.emit({comp:this,id:this.rootElement.id})}})),k(this,u,"f")?o("img",Object.assign({},this.resourceAttrs,{class:"resource",ref:t=>y(this,m,t,"f"),onLoad:()=>{k(this,d,"f").classList.add("placeholder--fade-out"),k(this,m,"f").classList.add("resource--fade-in"),this.kupPhotoFrameResourceLoad.emit({comp:this,id:this.rootElement.id})}})):null))}disconnectedCallback(){var t;k(this,c,"f").theme.unregister(this),null===(t=k(this,l,"f"))||void 0===t||t.unobserve(this.rootElement)}get rootElement(){return n(this)}};l=new WeakMap,c=new WeakMap,d=new WeakMap,m=new WeakMap,u=new WeakMap,g=new WeakMap,b.style=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_photoframe_border:var(\n --kup-photoframe-border,\n 1px inset var(--kup-border-subtle)\n );--kup_photoframe_fade_out_time:var(--kup-photoframe-fade-out-time, 2000ms);border:var(--kup_photoframe_border);display:block;height:100%;position:relative;width:100%}#kup-component{position:relative;height:100%;width:100%}img{max-height:100%;max-width:100%}.horizontal img{width:100%}.vertical img{height:100%}.placeholder{display:none;transition:opacity var(--kup_photoframe_fade_out_time) ease-out;will-change:opacity;z-index:1}.placeholder--loaded{display:block}.placeholder--fade-out{opacity:0;position:absolute}.resource{display:none;left:0;position:absolute;top:0;z-index:0}.resource--fade-in{display:block;position:relative}:host(.kup-fit) img{height:100%;object-fit:cover;width:100%}";export{b as kup_photo_frame}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,g as l}from"./p-b0368f88.js";import{b as t}from"./p-40ebfd27.js";import{F as i}from"./p-f2213e00.js";const n=document.documentElement,d=(l,t)=>e("div",Object.assign({class:{"f-text-field":!0,"kup-danger":l.danger,"kup-full-height":l.fullHeight,"kup-full-width":l.fullWidth,"kup-info":l.info,"kup-light-mode":l.lightMode,"kup-secondary":l.secondary,"kup-shaped":l.shaped,"kup-success":l.success,"kup-warning":l.warning,[l.wrapperClass]:!!l.wrapperClass}},l.dataSet,{id:l.id,title:l.title}),l.leadingLabel||l.trailingLabel?e("div",{class:"mdc-form-field "+(l.leadingLabel?"mdc-form-field--align-end":"")},[o(l),a(l),e("label",null,l.label)]):[o(l),a(l)],t);function o(d){var o,a,c,r,u,m,f;const p=d.textArea||d.outlined;let v,x,g,k;if(d.maxLength>=256&&(d.textArea=!0),!d.label||d.leadingLabel||d.trailingLabel||(v=e("div",{class:"mdc-text-field__label-container"},e("label",{class:"mdc-label",htmlFor:"kup-input"},d.label),d.maxLength&&d.showCounter?e("div",{class:"mdc-text-field__label-character-counter"},d.value.length," / ",d.maxLength):void 0)),d.icon){let i,n="";if(Object.values(t).indexOf(d.icon)>-1)n=d.icon.replace("--","");else{let e=`url('${l(`./assets/svg/${d.icon}.svg`)}') no-repeat center`;i={mask:e,webkitMask:e}}x=e("span",{style:i,onClick:d.onIconClick,class:`mdc-text-field__icon kup-icon action ${n}`})}if(d.quantityButtons){const t=`url('${l("./assets/svg/minus.svg")}') no-repeat center`,i=`url('${l("./assets/svg/plus.svg")}') no-repeat center`,n={mask:i,webkitMask:i};g=e("span",{style:{mask:t,webkitMask:t},class:"mdc-text-field__icon kup-icon action"}),k=e("span",{style:n,class:"mdc-text-field__icon kup-icon action"})}const b={color:d.error?"var(--kup-danger-color-60)":"var(--kup-warning-color-50)",resource:d.error?"error":"warning",sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"kup-icon"},h={"mdc-text-field-container":!0,"mdc-text-field-container--disabled":d.disabled},w={"is-clearable":d.isClearable,"mdc-text-field":!0,"mdc-text-field--disabled":d.disabled,"mdc-text-field--read-only":d.readOnly,"mdc-text-field--read-only-is-select":d.isSelect,"mdc-text-field--filled":!d.fullWidth&&!p,"mdc-text-field--no-label":!d.label,"mdc-text-field--fullwidth":d.fullWidth,"mdc-text-field--lightmode":d.lightMode,"mdc-text-field--outlined":p,"mdc-text-field--textarea":d.textArea,"mdc-text-field--with-leading-icon":d.icon&&!d.trailingIcon,"mdc-text-field--with-trailing-icon":d.icon&&d.trailingIcon,"mdc-text-field--with-quantity-buttons":d.quantityButtons,"mdc-text-field--error":Boolean(d.error),"mdc-text-field--alert":Boolean(d.alert),"mdc-text-field--legacy-look mdc-text-field--extra-small":d.legacyLook,[`mdc-text-field--${d.sizing||"small"}`]:!d.textArea&&!d.legacyLook,"top-right-indicator":d.showMarker};let _=d.value,y=d.quantityButtons?"number":null!==(o=d.inputType)&&void 0!==o?o:"text",C=!1;if("number"===d.inputType&&(y="text",d.inputMode="numeric",C=!0),"number"===d.inputType){const e={allowNegative:null===(a=d.allowNegative)||void 0===a||a,decimal:d.decimals,group:null===(c=d.group)||void 0===c||c,integer:(null!==(r=d.integers)&&void 0!==r?r:0)-(null!==(u=d.decimals)&&void 0!==u?u:0)};_=s(_,e,!1)}return e("div",{class:h},d.fullWidth?void 0:v,e("div",{class:w},d.trailingIcon?void 0:x,d.textArea?e("span",{class:"mdc-text-field__resizer"},e("textarea",{class:"mdc-text-field__input",disabled:d.disabled,maxlength:d.maxLength,value:_,autoComplete:null!==(m=d.autocomplete)&&void 0!==m?m:"off",onBlur:d.onBlur,onClick:d.onClick,onChange:d.onChange,onFocus:d.onFocus,onInput:d.onInput,onKeyDown:d.onKeyDown})):e("input",{type:y,inputmode:d.inputMode?d.inputMode:void 0,step:d.step,min:d.min,max:d.max,name:d.name,class:"mdc-text-field__input",disabled:d.disabled,placeholder:d.placeholder,maxlength:d.maxLength,size:d.size,value:_,readOnly:d.isSelect,autoComplete:null!==(f=d.autocomplete)&&void 0!==f?f:"off",onBlur:e=>{var l,t,i,n;if(C){const o={allowNegative:null===(l=d.allowNegative)||void 0===l||l,decimal:d.decimals,group:null===(t=d.group)||void 0===t||t,integer:(null!==(i=d.integers)&&void 0!==i?i:0)-(null!==(n=d.decimals)&&void 0!==n?n:0)};e.target.value=s(e.target.value,o,!0)}d.onBlur&&d.onBlur(e)},onChange:e=>{var l,t,i,n;if(C){const o={allowNegative:null===(l=d.allowNegative)||void 0===l||l,decimal:d.decimals,group:null===(t=d.group)||void 0===t||t,integer:(null!==(i=d.integers)&&void 0!==i?i:0)-(null!==(n=d.decimals)&&void 0!==n?n:0)};e.target.value=null!=d.min&&d.min>parseFloat(e.target.value)?s(d.min.toString(),o,!0):null!=d.max&&d.max<parseFloat(e.target.value)?s(d.max.toString(),o,!0):s(e.target.value,o,!0)}else null!=d.min&&d.min>parseFloat(e.target.value)?e.target.value=d.min.toString():null!=d.max&&d.max<parseFloat(e.target.value)&&(e.target.value=d.max.toString());d.onChange&&d.onChange(e)},onClick:d.onClick,onFocus:d.onFocus,onInput:d.onInput,onKeyDown:d.onKeyDown,onKeyPress:e=>{var l,t,i,o;if(!C)return;if(e.ctrlKey)return;if(e.key.length>1)return;const a={allowNegative:null===(l=d.allowNegative)||void 0===l||l,decimal:d.decimals,group:null===(t=d.group)||void 0===t||t,integer:(null!==(i=d.integers)&&void 0!==i?i:0)-(null!==(o=d.decimals)&&void 0!==o?o:0)};let s=e.target,c=s.value,r=c.substring(0,s.selectionStart),u=c.substring(s.selectionEnd,s.selectionEnd+c.length-1);n.ketchup.math.matchNumericValueWithOptions(r+e.key+u,a)||e.preventDefault()}}),d.trailingIcon?x:void 0,d.helperIcon&&d.error?e("div",{class:"mdc-error-icon"},e(i,Object.assign({},b))):d.helperIcon&&d.alert?e("div",{class:"mdc-alert-icon"},e(i,Object.assign({},b))):void 0,d.quantityButtons&&e("div",{class:"mdc-quantity-buttons"},e("button",{onClick:d.onMinusClick},g),e("button",{onClick:d.onPlusClick},k)),d.isClearable?e("span",{class:`mdc-text-field__icon kup-icon ${t.CLEAR.replace("--","")}`,onClick:d.onClearIconClick}):void 0))}function a(l){if(!1!==l.helperEnabled&&(l.error||l.alert))return e("div",{class:"mdc-text-field-helper-line"},l.helper?e("div",{class:{"mdc-text-field-helper-text":!0,"mdc-text-field-helper-text--persistent":!l.helperWhenFocused}},l.helper):l.error?e("span",{class:"mdc-error-message"},l.error):l.alert?e("span",{class:"mdc-alert-message"},l.alert):void 0)}const s=function(e,l,t){let i=e;return i?"-"==i?"":n.ketchup.math.format(i,n.ketchup.math.createFormatPattern(l.group,l.decimal),t):i};export{d as F}
|