@sme.up/ketchup 6.0.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{cell-utils-a78d6fac.js → cell-utils-fe64a28c.js} +2 -2
- package/dist/cjs/{f-button-ac179257.js → f-button-5b69d882.js} +4 -4
- package/dist/cjs/f-cell-3a740c48.js +418 -0
- package/dist/cjs/f-checkbox-57443ca3.js +29 -0
- package/dist/cjs/{f-chip-b00897d7.js → f-chip-02e83f82.js} +3 -3
- package/dist/cjs/{f-image-89f25556.js → f-image-2a61ece2.js} +2 -2
- package/dist/cjs/{f-paginator-utils-8fa501b3.js → f-paginator-utils-09126bdd.js} +5 -5
- package/dist/cjs/{f-text-field-e1e45ade.js → f-text-field-9ee20a67.js} +3 -3
- package/dist/cjs/{index-eb556444.js → index-06b131ea.js} +6 -4
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_25.cjs.entry.js +209 -193
- package/dist/cjs/kup-box.cjs.entry.js +1306 -0
- package/dist/cjs/kup-calendar.cjs.entry.js +7 -7
- package/dist/cjs/kup-cell.cjs.entry.js +10 -9
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +4 -7
- package/dist/cjs/{kup-form-editor.cjs.entry.js → kup-dashboard.cjs.entry.js} +123 -148
- package/dist/cjs/kup-drawer.cjs.entry.js +4 -4
- package/dist/cjs/{kup-box_2.cjs.entry.js → kup-echart.cjs.entry.js} +53 -1338
- package/dist/cjs/kup-family-tree.cjs.entry.js +410 -0
- package/dist/cjs/kup-form.cjs.entry.js +480 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-image-list.cjs.entry.js +73 -11
- package/dist/cjs/kup-lazy.cjs.entry.js +4 -4
- package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
- package/dist/cjs/{kup-manager-7a941909.js → kup-manager-02acbb37.js} +407 -7
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +5 -5
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +5 -5
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-6287d878.js → utils-4b208b48.js} +1 -1
- package/dist/collection/assets/dashboard.js +113 -0
- package/dist/collection/assets/data-table.js +15 -0
- package/dist/collection/assets/family-tree.js +2437 -0
- package/dist/collection/assets/form.js +433 -0
- package/dist/collection/assets/grid.js +17 -0
- package/dist/collection/assets/index.js +14 -6
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +135 -129
- package/dist/collection/components/kup-box/kup-box.js +13 -2
- package/dist/collection/components/kup-button/kup-button.js +1 -0
- package/dist/collection/components/kup-combobox/kup-combobox.js +16 -13
- package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -0
- package/dist/collection/components/{kup-form-editor/kup-form-editor.css → kup-dashboard/kup-dashboard.css} +7 -6
- package/dist/collection/components/{kup-form-editor/kup-form-editor.js → kup-dashboard/kup-dashboard.js} +148 -149
- package/dist/collection/components/kup-data-table/kup-data-table.js +7 -6
- package/dist/collection/components/kup-drawer/kup-drawer.css +5 -8
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +1 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +12 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.css +101 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +666 -0
- package/dist/collection/components/kup-form/kup-form-declarations.js +25 -0
- package/dist/collection/components/kup-form/kup-form.css +99 -0
- package/dist/collection/components/kup-form/kup-form.js +647 -0
- package/dist/collection/components/kup-grid/kup-grid.js +1 -4
- package/dist/collection/components/kup-image-list/kup-image-list-state.js +9 -0
- package/dist/collection/components/kup-image-list/kup-image-list.css +0 -6
- package/dist/collection/components/kup-image-list/kup-image-list.js +113 -1
- package/dist/collection/components/kup-lazy/kup-lazy.css +13 -6
- package/dist/collection/components/kup-list/kup-list-helper.js +9 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +13 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +1 -1
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +3 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +27 -0
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +0 -6
- package/dist/collection/components/kup-tree/kup-tree.js +10 -4
- package/dist/collection/f-components/f-button/f-button.js +2 -2
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +5 -1
- package/dist/collection/f-components/f-cell/f-cell.js +34 -114
- package/dist/collection/f-components/f-text-field/f-text-field.js +1 -1
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +69 -0
- package/dist/collection/managers/kup-data/kup-data.js +109 -1
- package/dist/collection/managers/kup-language/kup-language-declarations.js +11 -0
- package/dist/collection/managers/kup-objects/kup-objects.js +10 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +20 -3
- package/dist/collection/types/GenericTypes.js +3 -2
- package/dist/esm/{cell-utils-964da6b5.js → cell-utils-cb5d4149.js} +2 -2
- package/dist/esm/{f-button-871a544b.js → f-button-fd44ef70.js} +4 -4
- package/dist/esm/{f-cell-521ef17a.js → f-cell-7b159a22.js} +48 -283
- package/dist/esm/f-checkbox-c51c4a75.js +27 -0
- package/dist/esm/{f-chip-1dda722f.js → f-chip-c2e4c522.js} +3 -3
- package/dist/esm/{f-image-c468d8ae.js → f-image-2ab4b9aa.js} +2 -2
- package/dist/esm/{f-paginator-utils-7dff8ff0.js → f-paginator-utils-ef537d82.js} +5 -5
- package/dist/esm/{f-text-field-d6c61c73.js → f-text-field-41c575eb.js} +3 -3
- package/dist/esm/{index-baeab1ac.js → index-ad6ab214.js} +6 -4
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_25.entry.js +199 -183
- package/dist/esm/kup-box.entry.js +1302 -0
- package/dist/esm/kup-calendar.entry.js +7 -7
- package/dist/esm/kup-cell.entry.js +9 -8
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +4 -7
- package/dist/esm/{kup-form-editor.entry.js → kup-dashboard.entry.js} +123 -148
- package/dist/esm/kup-drawer.entry.js +4 -4
- package/dist/esm/{kup-box_2.entry.js → kup-echart.entry.js} +54 -1338
- package/dist/esm/kup-family-tree.entry.js +406 -0
- package/dist/esm/kup-form.entry.js +476 -0
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-image-list.entry.js +72 -10
- package/dist/esm/kup-lazy.entry.js +4 -4
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/{kup-manager-58b075b4.js → kup-manager-22a475e6.js} +404 -8
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +5 -5
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +5 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-d7e4b3c2.js → utils-2c1f4122.js} +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-06c6cc68.js +1 -0
- package/dist/ketchup/{p-3c11e615.entry.js → p-0dacd4bc.entry.js} +1 -1
- package/dist/ketchup/{p-fac1a08b.entry.js → p-1959f835.entry.js} +1 -1
- package/dist/ketchup/p-1c44dc62.entry.js +1 -0
- package/dist/ketchup/{p-f09f2f98.entry.js → p-264b1b19.entry.js} +1 -1
- package/dist/ketchup/p-38d7584e.js +1 -0
- package/dist/ketchup/{p-f71a1675.entry.js → p-42080355.entry.js} +1 -1
- package/dist/ketchup/p-4bc9f98b.entry.js +1 -0
- package/dist/ketchup/p-578583db.entry.js +1 -0
- package/dist/ketchup/p-5866d507.entry.js +1 -0
- package/dist/ketchup/p-61059e9d.entry.js +9 -0
- package/dist/ketchup/{p-a615a92b.entry.js → p-664be494.entry.js} +1 -1
- package/dist/ketchup/{p-d2ee56dd.entry.js → p-67cd575d.entry.js} +1 -1
- package/dist/ketchup/{p-e0035c58.js → p-682a367a.js} +1 -1
- package/dist/ketchup/p-6ccf7eb2.entry.js +1 -0
- package/dist/ketchup/p-7230ab97.entry.js +1 -0
- package/dist/ketchup/p-752b4cef.entry.js +1 -0
- package/dist/ketchup/{p-954cc340.entry.js → p-7de3e7ac.entry.js} +1 -1
- package/dist/ketchup/p-928c5c36.js +1 -0
- package/dist/ketchup/{p-6dff70f8.entry.js → p-9b36497d.entry.js} +1 -1
- package/dist/ketchup/{p-99e0d768.entry.js → p-b982d137.entry.js} +1 -1
- package/dist/ketchup/{p-8cdf61a4.js → p-c0219e5e.js} +1 -1
- package/dist/ketchup/p-c55fd0a7.entry.js +1 -0
- package/dist/ketchup/p-cd5cfa7c.js +1 -0
- package/dist/ketchup/p-d154b3a0.entry.js +1 -0
- package/dist/ketchup/p-d2affb6f.entry.js +27 -0
- package/dist/ketchup/p-d3b542b3.js +2 -0
- package/dist/ketchup/{p-7454cb92.js → p-d6c12c6c.js} +1 -1
- package/dist/ketchup/p-da0eab60.entry.js +1 -0
- package/dist/ketchup/{p-7eff4eee.js → p-dc62a30f.js} +1 -1
- package/dist/ketchup/p-e9366aaf.entry.js +39 -0
- package/dist/ketchup/{p-44ec4f03.js → p-edae3076.js} +1 -1
- package/dist/ketchup/p-fc2b1229.js +30 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +1 -16
- package/dist/types/components/{kup-form-editor/kup-form-editor-declarations.d.ts → kup-dashboard/kup-dashboard-declarations.d.ts} +9 -27
- package/dist/types/components/{kup-form-editor/kup-form-editor.d.ts → kup-dashboard/kup-dashboard.d.ts} +12 -9
- package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +33 -0
- package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +61 -0
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +60 -0
- package/dist/types/components/kup-form/kup-form.d.ts +63 -0
- package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +6 -0
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +17 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +3 -0
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +0 -6
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +2 -0
- package/dist/types/components.d.ts +460 -241
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -1
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +8 -0
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +15 -1
- package/dist/types/managers/kup-data/kup-data.d.ts +7 -1
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +11 -1
- package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
- package/dist/types/types/GenericTypes.d.ts +3 -2
- package/package.json +2 -2
- package/dist/cjs/f-cell-69294bca.js +0 -653
- package/dist/cjs/kup-field.cjs.entry.js +0 -241
- package/dist/collection/assets/form-editor.js +0 -338
- package/dist/collection/components/kup-field/kup-field-declarations.js +0 -15
- package/dist/collection/components/kup-field/kup-field.css +0 -48
- package/dist/collection/components/kup-field/kup-field.js +0 -514
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +0 -23
- package/dist/esm/kup-field.entry.js +0 -237
- package/dist/ketchup/p-1ae66cc5.js +0 -1
- package/dist/ketchup/p-34b74425.js +0 -1
- package/dist/ketchup/p-4ffbc3ff.js +0 -1
- package/dist/ketchup/p-5264a3e6.entry.js +0 -1
- package/dist/ketchup/p-65974e48.entry.js +0 -1
- package/dist/ketchup/p-65b46587.entry.js +0 -40
- package/dist/ketchup/p-80968627.entry.js +0 -1
- package/dist/ketchup/p-a0f6e25c.entry.js +0 -1
- package/dist/ketchup/p-aca0e54b.js +0 -30
- package/dist/ketchup/p-b8939a8b.entry.js +0 -1
- package/dist/ketchup/p-bfc3bac7.js +0 -1
- package/dist/ketchup/p-c5ce8951.entry.js +0 -1
- package/dist/ketchup/p-cad1e097.entry.js +0 -9
- package/dist/ketchup/p-db71436b.entry.js +0 -27
- package/dist/ketchup/p-e1039cf2.entry.js +0 -1
- package/dist/ketchup/p-ea10176c.entry.js +0 -1
- package/dist/types/components/kup-field/kup-field-declarations.d.ts +0 -25
- package/dist/types/components/kup-field/kup-field.d.ts +0 -90
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,c as a,f as o,h as t,H as n,g as i}from"./p-
|
|
1
|
+
import{r,c as a,f as o,h as t,H as n,g as i}from"./p-d3b542b3.js";import{k as s}from"./p-fc2b1229.js";import{g as p,s as b}from"./p-682a367a.js";import{c as e}from"./p-97e8ea42.js";var v,l;!function(r){r.customStyle="Custom style of the component.",r.image="Image displayed by the nav bar, uses the kup-image component's props.",r.label="Text displayed by the nav bar.",r.showMenuButton="When true, the menu button will be displayed on the left of the nav bar.",r.styling="Defines the style of the nav bar"}(v||(v={})),function(r){r.SHORT="short",r.STANDARD="standard"}(l||(l={}));const u=class{constructor(o){r(this,o),this.kupNavbarReady=a(this,"kup-navbar-ready",6),this.kupNavbarResize=a(this,"kup-navbar-resize",6),this.customStyle="",this.styling=l.STANDARD,this.kupManager=s()}async getProps(r){return p(this,v,r)}async refresh(){o(this)}async resizeCallback(){window.clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout((()=>{this.kupNavbarResize.emit({comp:this,id:this.rootElement.id})}),300)}async setProps(r){b(this,v,r)}content(){const r=Array.prototype.slice.call(this.rootElement.children,0),a=[],o=[];for(let n=0;n<r.length;n++)"left"===r[n].slot?a.push(t("slot",{name:"left"})):o.push(t("slot",{name:"right"}));return[a.length?t("section",{class:"nav-bar__section nav-bar__section--align-start"},a):null,o.length?t("section",{class:"nav-bar__section nav-bar__section--align-end",role:"toolbar"},o):null]}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.kupNavbarReady.emit({comp:this,id:this.rootElement.id}),this.kupManager.resize.observe(this.rootElement),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return t(n,{class:"header"},t("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),t("div",{id:e},t("header",{class:`nav-bar nav-bar--${this.styling.toLowerCase()} `},t("div",{class:"nav-bar__row"},this.content()))))}disconnectedCallback(){this.kupManager.language.unregister(this),this.kupManager.resize.unobserve(this.rootElement),this.kupManager.theme.unregister(this)}get rootElement(){return i(this)}};u.style=":host{--kup_navbar_box_shadow:var(\n --kup-navbar-box-shadow,\n 0 2px 4px -1px rgba(128, 128, 128, 0.2),\n 0 4px 5px 0 rgba(128, 128, 128, 0.14),\n 0 1px 10px 0 rgba(128, 128, 128, 0.12)\n );--kup_navbar_padding:var(--kup-navbar-padding, 8px 12px);--kup_navbar_position:var(--kup-navbar-position, fixed);--kup_navbar_short_border_radius:var(\n --kup-navbar-short-border-radius,\n 0px 0px 24px\n );--kup_navbar_short_box_shadow:var(\n --kup-navbar-short-box-shadow,\n rgba(128, 128, 128, 0.2) 0px 2px 4px -1px,\n rgba(128, 128, 128, 0.14) 0px 4px 5px 0px,\n rgba(128, 128, 128, 0.12) 0px 1px 10px 0px\n );--kup_navbar_short_width:var(--kup-navbar-short-width, 9em);--kup_navbar_transition:var(--kup-navbar-transition, 250ms);--kup_navbar_width:var(--kup-navbar-width, 100%);box-sizing:border-box;font-size:var(--kup-font-size);left:0;position:var(--kup_navbar_position);top:0;transition:all var(--kup_navbar_transition);width:var(--kup_navbar_width);z-index:var(--kup-navbar-zindex)}#kup-component{width:var(--kup_navbar_width)}.nav-bar{background-color:var(--kup-navbar-background-color);box-shadow:var(--kup_navbar_box_shadow);box-sizing:border-box;color:var(--kup-navbar-color);display:flex;flex-direction:column;justify-content:space-between;width:var(--kup_navbar_width)}.nav-bar--short{border-radius:var(--kup_navbar_short_border_radius);box-shadow:var(--kup_navbar_short_box_shadow);width:var(--kup_navbar_short_width)}.nav-bar--short .nav-bar__section{padding:0 0.5em}.nav-bar--short section{overflow:hidden}.nav-bar ::slotted(*){--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);--kup-switch-label-color:var(--kup-navbar-color);--kup-switch-primary-color:var(--kup-navbar-color);--kup-switch-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-textfield-color:var(--kup-navbar-color);--kup-textfield-color-rgb:var(--kup-navbar-color-rgb);--kup-tree-color:var(--kup-navbar-color);--kup-tree-color-rgb:var(--kup-navbar-color-rgb);color:var(--kup-navbar-color);fill:var(--kup-navbar-color);margin:0}.nav-bar__row{box-sizing:border-box;display:flex;height:var(--kup-navbar-height);position:relative;width:var(--kup_navbar_width)}.nav-bar__section{align-items:center;display:inline-flex;flex:1 1 auto;min-width:0;padding:var(--kup_navbar_padding)}.nav-bar__section--align-start{flex-shrink:5;justify-content:flex-start;order:-1}.nav-bar__section--align-end{justify-content:flex-end;order:1;overflow:hidden}::slotted(*){--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);--kup-switch-label-color:var(--kup-navbar-color);--kup-switch-primary-color:var(--kup-navbar-color);--kup-switch-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-textfield-color:var(--kup-navbar-color);--kup-textfield-color-rgb:var(--kup-navbar-color-rgb);--kup-textfield-primary-color:var(--kup-navbar-color);--kup-textfield-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-tree-color:var(--kup-navbar-color);--kup-tree-color-rgb:var(--kup-navbar-color-rgb);color:var(--kup-navbar-color);fill:var(--kup-navbar-color);margin:0}";export{u as kup_nav_bar}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as n,h as i,g as a,f as e,H as l}from"./p-
|
|
1
|
+
import{r as t,c as n,h as i,g as a,f as e,H as l}from"./p-d3b542b3.js";import{k as s,c as o}from"./p-fc2b1229.js";import{g as d,s as r}from"./p-682a367a.js";import{c}from"./p-97e8ea42.js";const u=class{constructor(i){t(this,i),this.dashClick=n(this,"kup-dash-click",6),this.active=!1,this.fontsize="",this.layout="1",this.index=0,this.kupManager=s()}onDshClickHandler(){this.dashClick.emit({id:this.index})}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(){let t=null;switch(this.layout){case"2":t=i("div",null,i("div",{class:"icon"},i("slot",{name:"icon"})),i("div",{class:"value-int"},i("slot",{name:"value-int"})),i("div",{class:"value-dec"},i("slot",{name:"value-dec"})),i("div",{class:"unit"},i("slot",{name:"unit"})));break;case"3":t=i("div",null,i("div",{class:"value"},i("slot",{name:"value"})),i("div",{class:"descr"},i("slot",{name:"descr"})));break;case"4":t=i("div",null,i("div",{class:"icon"},i("slot",{name:"icon"})),i("div",{class:"value-and-unit"},i("div",{class:"value-int"},i("slot",{name:"value-int"})),i("div",{class:"value-dec"},i("slot",{name:"value-dec"})),i("div",{class:"unit"},i("slot",{name:"unit"}))),i("div",null),i("div",{class:"descr"},i("slot",{name:"descr"})));break;case"5":t=i("div",null,i("div",null,i("div",{class:"descr"},i("slot",{name:"descr"})),i("div",{class:"value"},i("slot",{name:"value"}))),i("div",{class:"icon"},i("slot",{name:"icon"})));break;case"6":t=i("div",null,i("div",{class:"icon"},i("slot",{name:"icon"})),i("div",null,i("div",{class:"value"},i("slot",{name:"value"})),i("div",{class:"descr"},i("slot",{name:"descr"}))));break;case"7":t=i("div",null,i("div",null,i("div",{class:"value"},i("slot",{name:"value"})),i("div",{class:"descr"},i("slot",{name:"descr"}))),i("div",{class:"icon"},i("slot",{name:"icon"})));break;case"8":t=i("div",null,i("div",{class:"icon"},i("slot",{name:"icon"})),i("div",{class:"value"},i("slot",{name:"value"})),i("div",{class:"descr"},i("slot",{name:"descr"})));break;default:t=i("div",null,i("div",{class:"descr"},i("slot",{name:"descr"})),i("div",{class:"value"},i("slot",{name:"value"})))}return i("div",{id:"dash",class:this.active?"with-dyn":"",style:{fontSize:this.fontsize},onClick:()=>this.onDshClickHandler()},i("div",{id:"content",class:`layout-${this.layout} `},t))}get rootElement(){return a(this)}};var g;u.style="#dash{color:var(--kup-text-color);font-size:2vw;display:flex;align-items:center;justify-content:center;position:relative;text-align:center;position:relative;word-break:normal}#dash.with-dyn{cursor:pointer}#dash #content .icon{margin:auto;font-size:90%}#dash #content.layout-1,#dash #content.layout-3{text-align:center}#dash #content.layout-1 .descr,#dash #content.layout-3 .descr{font-size:70%;width:100%}#dash #content.layout-1 .value,#dash #content.layout-3 .value{font-size:220%}#dash #content.layout-2>div{display:flex}#dash #content.layout-2>div .icon{margin:auto;font-size:150%;margin-right:5%}#dash #content.layout-2>div .value-int{font-size:250%}#dash #content.layout-2>div .value-dec,#dash #content.layout-2>div .unit{font-size:130%;margin-top:auto;margin-bottom:7%}#dash #content.layout-2>div .value-dec{margin-left:2%}#dash #content.layout-2>div .unit{margin-left:4%}#dash #content.layout-4>div{display:grid;grid-template-columns:2fr 5fr}#dash #content.layout-4>div .icon{margin:auto;font-size:150%;margin-right:5%}#dash #content.layout-4>div .value-and-unit{display:flex}#dash #content.layout-4>div .value-and-unit .value-int{font-size:250%}#dash #content.layout-4>div .value-and-unit .value-dec,#dash #content.layout-4>div .value-and-unit .unit{font-size:130%;margin-top:auto;margin-bottom:7%}#dash #content.layout-4>div .value-and-unit .value-dec{margin-left:2%}#dash #content.layout-4>div .value-and-unit .unit{margin-left:4%}#dash #content.layout-4>div .descr{margin-left:4%;text-align:left;font-size:80%;width:100%;min-width:max-content}#dash #content.layout-5>div,#dash #content.layout-7>div{display:flex}#dash #content.layout-5>div .icon,#dash #content.layout-7>div .icon{font-size:150%;margin:auto;margin-left:10%}#dash #content.layout-5>div .value,#dash #content.layout-7>div .value{font-size:200%}#dash #content.layout-5>div .descr,#dash #content.layout-7>div .descr{text-align:right;font-size:65%;width:100%;min-width:max-content}#dash #content.layout-6>div{display:flex;justify-content:space-between}#dash #content.layout-6>div .icon{font-size:150%;margin-right:10%}#dash #content.layout-6>div .value{font-size:220%;text-align:right}#dash #content.layout-6>div .descr{font-size:80%;text-align:right;width:100%;min-width:max-content}#dash #content.layout-8>div{display:flex;align-items:center}#dash #content.layout-8>div .icon{margin-right:4%;font-size:75%}#dash #content.layout-8>div .value{margin:0 10%;font-size:250%}#dash #content.layout-8>div .descr{font-size:60%;text-align:left}",function(t){t.columns="The number of columns displayed by the grid, the default behavior is 12.",t.customStyle="Custom style of the component. For more information: https://ketchup.smeup.com/ketchup-showcase/#/customization",t.singleLine="When set to true, forces the content on a single line."}(g||(g={}));const p=class{constructor(n){t(this,n),this.columns=12,this.customStyle="",this.singleLine=!1,this.kupManager=s()}async getProps(t){return d(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=this.rootElement.children;if(!t||0===t.length)return void this.kupManager.debug.logMessage(this,"Missing slots, not rendering!",o.WARNING);const n=[];for(let a=0;a<t.length;a++){let e=null;if(this.singleLine)e=i("slot",{name:`${a}`});else{const n=t[a].span||t[a].getAttribute("span")||1;e=i("div",{class:`layout-grid__cell layout-grid__cell--span-${n}`},i("slot",{name:`${a}`}))}n.push(e)}const a={};return this.columns&&12!==this.columns&&(a["--kup_grid_columns"]=this.columns),i(l,{style:a},i("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{id:c},i("div",{class:this.singleLine?"flex-layout":"layout-grid"},i("div",{class:this.singleLine?"flex-layout__inner":"layout-grid__inner"},n))))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}};p.style=":host{--kup_grid_font_size:var(--kup-grid-font-size, var(--kup-font-size));--kup_grid_gap:var(--kup-grid-gap, 24px);--kup_grid_gap_mobile:var(--kup-grid-gap-mobile, 16px);--kup_grid_padding:var(--kup-grid-padding, 24px);font-size:var(--kup_grid_font_size);height:100%;width:100%}#kup-component{height:100%;width:100%}.layout-grid{box-sizing:border-box;margin:0px auto;padding:var(--kup_grid_padding)}.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap);grid-template-columns:repeat(var(--kup_grid_columns, 12), minmax(0px, 1fr))}.layout-grid .layout-grid__inner .layout-grid__cell{box-sizing:border-box;display:flex;justify-content:center;margin:0px;width:auto}.layout-grid__cell--span-1{grid-column-end:span 1}.layout-grid__cell--span-2{grid-column-end:span 2}.layout-grid__cell--span-3{grid-column-end:span 3}.layout-grid__cell--span-4{grid-column-end:span 4}.layout-grid__cell--span-5{grid-column-end:span 5}.layout-grid__cell--span-6{grid-column-end:span 6}.layout-grid__cell--span-7{grid-column-end:span 7}.layout-grid__cell--span-8{grid-column-end:span 8}.layout-grid__cell--span-9{grid-column-end:span 9}.layout-grid__cell--span-10{grid-column-end:span 10}.layout-grid__cell--span-11{grid-column-end:span 11}.layout-grid__cell--span-12{grid-column-end:span 12}.layout-grid__cell--span-13{grid-column-end:span 13}.layout-grid__cell--span-14{grid-column-end:span 14}.layout-grid__cell--span-15{grid-column-end:span 15}.layout-grid__cell--span-16{grid-column-end:span 16}.layout-grid__cell--span-17{grid-column-end:span 17}.layout-grid__cell--span-18{grid-column-end:span 18}.layout-grid__cell--span-19{grid-column-end:span 19}.layout-grid__cell--span-20{grid-column-end:span 20}.layout-grid__cell--span-21{grid-column-end:span 21}.layout-grid__cell--span-22{grid-column-end:span 22}.layout-grid__cell--span-23{grid-column-end:span 23}.layout-grid__cell--span-24{grid-column-end:span 24}.flex-layout,.flex-layout__inner{height:100%;align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap}.flex-layout__inner{width:auto}.flex-layout__inner *{display:block;margin:0 1.5em}.flex-layout__inner .flex-layout__cell{display:flex}.flex-layout__inner .flex-layout__cell *{justify-content:center;margin:auto}@media (min-width: 600px) and (max-width: 839px){.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap_mobile);grid-template-columns:repeat(var(--kup_grid_columns, 8), minmax(0px, 1fr))}}@media (max-width: 599px){.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap_mobile);grid-template-columns:repeat(var(--kup_grid_columns, 4), minmax(0px, 1fr))}}:host(.kup-full-width) .flex-layout__inner{width:100%}:host(.kup-full-width) .flex-layout__inner *{margin:auto}";export{u as kup_dash,p as kup_grid}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,d as t}from"./p-
|
|
1
|
+
import{r as n,d as t}from"./p-fc2b1229.js";const u=document.documentElement;var r;function i(n){if(n)for(let t=0;t<n.length;t++)n[t].id=t.toString()}function e(n){const t={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==n&&(t.second="2-digit"),new Intl.DateTimeFormat(u.ketchup.dates.getLocale()+"-u-hc-h23",t).formatToParts(new Date).map((n=>{switch(n.type){case"hour":return"HH";case"minute":return"mm";case"second":return"ss";default:return n.value}})).join("")}function c(n,t){return null!=n&&""!=n.trim()&&!!o(h(n,t))}function o(n){return!isNaN(n)}function s(n){return n&&null!=n&&""!=n.trim()||(n="0"),u.ketchup.math.numberify(n)}function a(n){let t="";return"P"==(n=n.toUpperCase())?t=" %":"VE"==n?t=" €":"VL"==n?t=" £":"VV"==n&&(t=" $"),t}function f(n,t,r){if(null==n||isNaN(n))return"";let i=function(n,t){return null==n?"":I(n,t,u.ketchup.dates.getLocale(),!0)}(n,t);return i+=a(r),i}function l(n,t,u){return f(s(n),t,u)}function h(n,t){return d(n,t,m(u.ketchup.dates.getLocale()))}function g(n,t){return d(n,t,".")}function d(n,t,r){if(null==n||""==n.trim())return"";let i=n,e=a(t);""!=e&&(n=n.replace(e,""));let c=null;return c="."==r?/,/g:/\./g,n=n.replace(c,""),"."!=r&&(n=n.replace(/,/g,".")),null==u.ketchup.math.numberify(n)||isNaN(u.ketchup.math.numberify(n))?i:I(s(n),-1,"en-US",!1)}function m(n){return function(n){return Intl.NumberFormat(n).formatToParts(1000.1).find((n=>"decimal"===n.type)).value}(n)}function I(n,t,u,r){return null==n&&(n=0),null!=t&&-1!=t||(t=function(n){if(Math.floor(n)===n)return 0;let t=n.toString().split(".")[1];return t&&t.length?t.length:0}(n)),Number(n).toLocaleString(u,t>-1?{minimumFractionDigits:t,maximumFractionDigits:t,useGrouping:r}:{useGrouping:r})}function w(n,t){const r={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==t&&(r.second="2-digit"),n.toLocaleTimeString(u.ketchup.dates.getLocale()+"-u-hc-h23",r)}function N(n,t){let r=e(t);return u.ketchup.dates.isValid(n,r,!0)}function p(n){return D(n,t.ISO_DATE_TIME,!0)}function D(t,r,i){let c=e(i);return u.ketchup.dates.isValid(t,c)?u.ketchup.dates.format(u.ketchup.dates.normalize(t,n.TIME),r):""}function b(t,r,i){const e={hour:"2-digit",minute:"2-digit",hour12:!1};return 1==r&&(e.second="2-digit"),function(n,t,r,i){if(null==i)return t.toLocaleTimeString(u.ketchup.dates.getLocale()+"-u-hc-h23",r);switch(i){case"I13":case"I12":break;case"I11":case"I14":case"I1H":case"I1M":case"I21":case"I22":case"I23":case"I24":case"I2H":case"I2D":case"I2M":return n}return t.toLocaleTimeString(u.ketchup.dates.getLocale()+"-u-hc-h23",r)}(t,u.ketchup.dates.toDate(u.ketchup.dates.normalize(t,n.TIME)),e,i)}function H(t){return u.ketchup.dates.toDate(u.ketchup.dates.normalize(t,n.TIMESTAMP)).toLocaleString(u.ketchup.dates.getLocale()+"-u-hc-h23",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}function V(n,t){if(null==n)return"";const r=new Date;r.setDate(1),r.setMonth(n-1);const i={month:t};return new Intl.DateTimeFormat(u.ketchup.dates.getLocale(),i).format(r)}function j(n){null!=n&&""!=n.trim()||(n=r.LONG);for(var t=[],u=0;u<12;u++)t[u]=V(u+1,n);return t}function M(n,t,u){let r={};if(u)r=t;else for(const u in t)Object.prototype.hasOwnProperty.call(t,u)&&(r[u]=n[u]);return r}function k(n,t,u){for(const r in u)t[r]?n[r]=u[r]:n.rootElement[r]=u[r]}!function(n){n.NUMERIC="numeric",n.DIGIT2="2-digit",n.LONG="long",n.SHORT="short",n.NARROW="narrow"}(r||(r={}));export{r as D,j as a,N as b,w as c,b as d,H as e,D as f,M as g,s as h,i,p as j,c as k,h as l,g as m,f as n,o,m as p,k as s,l as u}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,f as s,h as i,H as e,g as h}from"./p-d3b542b3.js";import{F as o,k as n,B as r,h as c}from"./p-fc2b1229.js";import{g as a,s as l}from"./p-682a367a.js";import{c as d}from"./p-97e8ea42.js";import{F as p}from"./p-06c6cc68.js";import"./p-d6c12c6c.js";import"./p-cd5cfa7c.js";import"./p-edae3076.js";import"./p-38d7584e.js";import"./p-dc62a30f.js";var m;!function(t){t.customStyle="Custom style of the component.",t.data="The data of the cell.",t.density="The density of the cell, defaults at 'dense' and can be also set to 'wide' or 'medium'.",t.dragEnabled="When set to true, the component is draggable."}(m||(m={}));const u=class{constructor(s){t(this,s),this.customStyle="",this.data=null,this.density=o.NONE,this.dragEnabled=!1,this.kupManager=n()}async addCssClasses(t){if(this.data.cssClass||(this.data.cssClass=""),t)for(let s=0;s<t.length;s++){const i=t[s];this.data.cssClass.indexOf(i)<0&&(this.data.cssClass+=` ${i}`)}this.refresh()}async getProps(t){return a(this,m,t)}async refresh(){s(this)}async removeCssClasses(t){if(this.data.cssClass){if(t)for(let s=0;s<t.length;s++){const i=t[s];this.data.cssClass.indexOf(i)>0&&(this.data.cssClass=this.data.cssClass.replace(new RegExp(i,"g"),""))}this.refresh()}}async setProps(t){l(this,m,t)}didRenderInteractables(){if(this.dragEnabled){const t=()=>({cell:this.data,column:this.generateColumn(),id:this.rootElement.id,multiple:!1,row:this.generateRow()});this.kupManager.interact.draggable(this.rootElement.shadowRoot.querySelector("#"+d),{cursorChecker:()=>null},{callback:t},r.BADGE)}}generateColumn(){return{name:this.data&&this.data.obj&&this.data.obj.t?this.data.obj.t+";"+this.data.obj.p:"KUPCELL",title:this.data&&this.data.obj&&this.data.obj.t?this.data.obj.t+";"+this.data.obj.p:this.kupManager.language.translate(c.EMPTY_OBJECT)}}generateRow(){const t=this.generateColumn(),s={cells:{}};return s.cells[t.name]=this.data,s}componentWillLoad(){this.kupManager.dates.register(this),this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.didRenderInteractables(),this.kupManager.debug.logRender(this,!0)}render(){const t={cell:this.data,column:this.generateColumn(),component:this,density:this.density,editable:this.data.isEditable,renderKup:!0,row:this.generateRow()};return i(e,null,i("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{id:d},i(p,Object.assign({},t))))}disconnectedCallback(){this.kupManager.dates.unregister(this),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return h(this)}};u.style=":host{display:block;height:100%;width:100%}#kup-component{height:100%;width:100%}";export{u as kup_cell}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,f as i,h as s,H as h,g as a}from"./p-d3b542b3.js";import{k as o}from"./p-fc2b1229.js";import{g as n,s as l}from"./p-682a367a.js";import{c as p}from"./p-97e8ea42.js";var r,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."}(r||(r={})),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.isInViewport=!1,this.componentName=null,this.customStyle="",this.data=null,this.renderMode=c.BOTH,this.showPlaceholder=!0,this.intObserver=null,this.kupManager=o(),this.lazyComponent=null,this.lazyComponentLoaded=!1}async getProps(t){return n(this,r,t)}async getComponent(){return this.lazyComponent}async refresh(){i(this)}async setProps(t){l(this,r,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=s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},s("path",{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=s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},s("path",{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=s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},s("path",{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=s("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},s("path",{d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":e=s("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},s("path",{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=s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},s("path",{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=s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},s("path",{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=s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},s("path",{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=s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},s("path",{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=s(this.componentName,Object.assign({},this.data,{ref:t=>this.lazyComponent=t})),i+=" kup-loaded"):this.showPlaceholder&&(t=e,i+=" kup-to-be-loaded"),s(h,{class:i},s("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{id:p},t))}disconnectedCallback(){this.kupManager.theme.unregister(this),this.intObserver.unobserve(this.rootElement)}get rootElement(){return a(this)}};d.style=":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_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_width:var(--kup-lazy-width, 100%);display:block;height:100%;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:100%;width:var(--kup_lazy_width)}#kup-component kup-data-table{min-width:100%}.kup-loaded,.kup-to-be-loaded{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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,f as i,h as o,H as s,g as r}from"./p-d3b542b3.js";import{k as h}from"./p-fc2b1229.js";import{g as a,s as n}from"./p-682a367a.js";import{c as p}from"./p-97e8ea42.js";var f;!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."}(f||(f={}));var l,c,d,m,u,w,b=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)},k=function(t,e,i,o,s){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?s.call(t,i):s?s.value=i:e.set(t,i),i};const v=class{constructor(i){t(this,i),this.kupPhotoFramePlaceholderLoad=e(this,"kup-photoframe-placeholderload",6),this.kupPhotoFrameResourceLoad=e(this,"kup-photoframe-resourceload",6),this.isInViewport=!1,this.customStyle="",this.placeholderAttrs={},this.resourceAttrs={},this.threshold=.25,l.set(this,null),c.set(this,h()),d.set(this,null),m.set(this,null),u.set(this,!1),w.set(this,null)}async getProps(t){return a(this,f,t)}async refresh(){i(this)}async setProps(t){n(this,f,t)}setObserver(){k(this,l,new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.isInViewport=!0,b(this,l,"f").unobserve(this.rootElement))}))}),{threshold:this.threshold}),"f")}componentWillLoad(){b(this,c,"f").debug.logLoad(this,!1),b(this,c,"f").theme.register(this),this.setObserver()}componentDidLoad(){b(this,c,"f").debug.logLoad(this,!0)}componentWillRender(){b(this,c,"f").debug.logRender(this,!1)}componentDidRender(){b(this,c,"f").debug.logRender(this,!0)}render(){return this.isInViewport&&!b(this,u,"f")&&k(this,u,!0,"f"),o(s,null,o("style",null,b(this,c,"f").theme.setKupStyle(this.rootElement)),o("div",{id:p,ref:t=>{k(this,w,t,"f")}},o("img",Object.assign({},this.placeholderAttrs,{class:"placeholder",ref:t=>k(this,d,t,"f"),onLoad:()=>{b(this,d,"f").naturalWidth>b(this,d,"f").naturalHeight?b(this,w,"f").classList.add("horizontal"):b(this,w,"f").classList.add("vertical"),b(this,l,"f").observe(this.rootElement),b(this,d,"f").classList.add("placeholder--loaded"),this.kupPhotoFramePlaceholderLoad.emit({comp:this,id:this.rootElement.id})}})),b(this,u,"f")?o("img",Object.assign({},this.resourceAttrs,{class:"resource",ref:t=>k(this,m,t,"f"),onLoad:()=>{b(this,d,"f").classList.add("placeholder--fade-out"),b(this,m,"f").classList.add("resource--fade-in"),this.kupPhotoFrameResourceLoad.emit({comp:this,id:this.rootElement.id})}})):null))}disconnectedCallback(){b(this,c,"f").theme.unregister(this),b(this,l,"f").unobserve(this.rootElement)}get rootElement(){return r(this)}};l=new WeakMap,c=new WeakMap,d=new WeakMap,m=new WeakMap,u=new WeakMap,w=new WeakMap,v.style=":host{--kup_photoframe_border:var(\n --kup-photoframe-border,\n 1px inset var(--kup-border-color)\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{v as kup_photo_frame}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,c as o,f as t,h as e,H as a,g as i}from"./p-
|
|
1
|
+
import{r,c as o,f as t,h as e,H as a,g as i}from"./p-d3b542b3.js";import{k as p}from"./p-fc2b1229.js";import{g as s,s as d}from"./p-682a367a.js";import{c as n}from"./p-97e8ea42.js";var c;!function(r){r.customStyle="Custom style of the component.",r.opened="Defaults at false. When set to true, the drawer appears."}(c||(c={}));const u=class{constructor(t){r(this,t),this.kupDrawerClose=o(this,"kup-drawer-close",6),this.kupDrawerOpen=o(this,"kup-drawer-open",6),this.kupDrawerReady=o(this,"kup-drawer-ready",6),this.opened=!1,this.customStyle="",this.kupManager=p()}async close(){this.opened=!1,this.kupDrawerClose.emit({comp:this,id:this.rootElement.id})}async getProps(r){return s(this,c,r)}async isOpened(){return this.opened}async open(){this.opened=!0,this.kupDrawerOpen.emit({comp:this,id:this.rootElement.id})}async refresh(){t(this)}async setProps(r){d(this,c,r)}async toggle(){this.opened?this.close():this.open()}content(){const r=[],o=Array.prototype.slice.call(this.rootElement.children,0),t=[];for(let t=0;t<o.length;t++)r.push(e("slot",null));return t.push(e("div",{class:"drawer__content"},r)),t}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupDrawerReady.emit({comp:this,id:this.rootElement.id}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return e(a,{"kup-opened":this.opened},e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{class:"backdrop",onClick:r=>{r.preventDefault(),r.stopPropagation()},onPointerDown:r=>{r.preventDefault(),r.stopPropagation(),this.close()},onTouchStart:r=>{r.preventDefault(),r.stopPropagation()}}),e("div",{id:n},e("div",{class:"drawer"},this.content())))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return i(this)}};u.style=":host{--kup_drawer_backdrop:var(--kup-drawer-backdrop, rgba(0, 0, 0, 0.32));--kup_drawer_box_shadow:var(\n --kup-drawer-box-shadow,\n 0 8px 10px -5px rgba(0, 0, 0, 0.2),\n 0 16px 24px 2px rgba(0, 0, 0, 0.14),\n 0 6px 30px 5px rgba(0, 0, 0, 0.12)\n );--kup_drawer_permanent_border:var(\n --kup-drawer-permanent-border,\n 1px solid var(--kup-border-color)\n );--kup_drawer_slide_transition:var(--kup-drawer-slide-transition, 750ms);--kup_drawer_transition:var(--kup-drawer-transition, 250ms);box-shadow:var(--kup_drawer_box_shadow);display:block;font-size:var(--kup-font-size);height:100vh;left:calc(var(--kup-drawer-width) * -1);position:fixed;top:0;transition:left var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1), right var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1);width:var(--kup-drawer-width);z-index:var(--kup-drawer-zindex)}#kup-component{height:100%;width:100%}.backdrop{background:var(--kup_drawer_backdrop);display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:var(--kup-drawer-zindex)}.drawer{height:100%;position:fixed;width:var(--kup-drawer-width);z-index:calc(var(--kup-drawer-zindex) + 1)}.drawer__content{background-color:var(--kup-drawer-background-color);box-sizing:border-box;height:100%;overflow-y:auto;width:100%}.drawer ::slotted(*){--kup-button-primary-color:var(--kup-drawer-color);--kup-button-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-button-primary-color-h:var(--kup-drawer-color-h);--kup-button-primary-color-s:var(--kup-drawer-color-s);--kup-button-primary-color-l:var(--kup-drawer-color-l);--kup-switch-label-color:var(--kup-drawer-color);--kup-switch-primary-color:var(--kup-drawer-color);--kup-switch-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-textfield-color:var(--kup-drawer-color);--kup-textfield-color-rgb:var(--kup-drawer-color-rgb);--kup-textfield-primary-color:var(--kup-drawer-color);--kup-textfield-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-tree-color:var(--kup-drawer-color);--kup-tree-color-rgb:var(--kup-drawer-color-rgb);--kup-tree-filter-background-color:var(--kup-drawer-background-color);--kup-tree-icon-color:var(--kup-drawer-color);color:var(--kup-drawer-color);fill:var(--kup-drawer-color)}:host([kup-opened]){left:0}:host([kup-opened]) .backdrop{display:block}:host(.kup-right){left:unset;right:-100%}:host([kup-opened].kup-right){right:0}:host(.kup-permanent){box-shadow:unset;transition:all 250ms}:host(.kup-permanent) .backdrop{display:none}:host(.kup-permanent) .drawer{position:relative}:host(.kup-permanent) .drawer__content{border-right:var(--kup_drawer_permanent_border)}";export{u as kup_drawer}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as n}from"./p-d3b542b3.js";import{F as t}from"./p-6c77a36c.js";import{F as o}from"./p-38d7584e.js";const e=(e,u)=>{if(e.styling||(e.styling=t.RAISED),!e.label&&!e.icon)return;const i=!!(e.styling.toLowerCase()===t.ICON||e.styling.toLowerCase()===t.RAISED&&e.icon&&null==e.label);return n("div",Object.assign({class:`f-button ${e.danger?"kup-danger":""} ${e.fullHeight?"kup-full-height":""} ${e.fullWidth?"kup-full-width":""} ${e.info?"kup-info":""} ${e.large?"kup-large":""} ${e.pulsating?"kup-pulsating":""} ${e.shaped?"kup-shaped":""} ${e.secondary?"kup-secondary":""} ${e.slim?"kup-slim":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),i?function(t){const e={color:t.disabled?"var(--kup_button_disabled_color)":"var(--kup_button_primary_color)",sizeX:t.large?"calc(1.75em * 1.5)":"1.75em",sizeY:t.large?"calc(1.75em * 1.5)":"1.75em"};return n("button",{class:{"icon-button":!0,"button--disabled":!!t.disabled,"icon-button--on":!(!t.toggable||!t.checked),toggable:!!t.toggable,"button--with-spinner":!(!t.showSpinner||t.disabled)},disabled:t.disabled,onClick:t.onClick,style:{"--kup_button_spinner_height":e.sizeY,"--kup_button_spinner_width":e.sizeX},type:"button",value:t.checked?"on":"off","aria-label":t.title},!t.showSpinner||t.disabled?n(o,Object.assign({},e,{resource:t.toggable&&!t.checked?t.iconOff?t.iconOff:t.icon+"_border":t.icon,wrapperClass:"icon-button__icon kup-icon"})):null,t.toggable&&!t.showSpinner?n(o,Object.assign({},e,{resource:t.icon,wrapperClass:"icon-button__icon icon-button__icon--on kup-icon"})):null,t.showSpinner&&!t.disabled?n("div",{class:"icon-button__spinner-container"},n("slot",{name:"spinner"})):void 0)}(e):function(e){const u=e.styling.toLowerCase()===t.FLAT,i=e.styling.toLowerCase()===t.FLOATING,s=e.styling.toLowerCase()===t.ICON,r=e.styling.toLowerCase()===t.OUTLINED,c=!(u||i||r||s),l={color:e.disabled?"var(--kup_button_disabled_color)":r||u?"var(--kup_button_primary_color)":"var(--kup_button_text_on_primary_color)",resource:e.icon,sizeX:i?"1.75em":"1.475em",sizeY:i?"1.75em":"1.475em",wrapperClass:"button__icon kup-icon"};e.showSpinner&&(l.wrapperClass+=" content--hidden");const a={button__label:!0,"content--hidden":!(!e.showSpinner||e.disabled)};return n("button",{class:{button:!0,"button--disabled":!!e.disabled,"button--floating":!!i,"button--outlined":!!r,"button--raised":!!c,"button--no-label":!e.label||" "===e.label,"button--with-spinner":!(!e.showSpinner||e.disabled)},disabled:e.disabled,onBlur:e.onBlur,onClick:e.onClick,onFocus:e.onFocus,style:{"--kup_button_spinner_height":l.sizeY},"aria-label":e.title,type:"button"},e.trailingIcon?[n("span",{class:a},e.label),e.icon?n(o,Object.assign({},l)):void 0]:[e.icon?n(o,Object.assign({},l)):void 0,n("span",{class:a},e.label)],e.showSpinner&&!e.disabled?n("div",{class:"button__spinner-container"},n("slot",{name:"spinner"})):void 0)}(e),u)};export{e as F}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,f as s,h as e,H as o,g as h}from"./p-
|
|
1
|
+
import{r as t,c as i,f as s,h as e,H as o,g as h}from"./p-d3b542b3.js";import{k as n,c as r}from"./p-fc2b1229.js";import{g as a,s as d}from"./p-682a367a.js";var c;!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."}(c||(c={}));const p=class{constructor(s){t(this,s),this.kupIframeError=i(this,"kup-iframe-error",6),this.kupIframeLoad=i(this,"kup-iframe-load",6),this.buttonData={},this.isButton=!1,this.src=void 0,this.kupManager=n()}onKupIframeError(){this.kupIframeError.emit({comp:this,id:this.rootElement.id})}onKupIframeLoad(){this.kupIframeLoad.emit({comp:this,id:this.rootElement.id})}async getProps(t){return a(this,c,t)}async refresh(){s(this)}async setProps(t){d(this,c,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?e(o,{"is-button":!0},e("kup-button",Object.assign({},this.buttonData,{"onkup-button-click":()=>this.openInNew()}))):e(o,{"is-iframe":!0},e("iframe",{onError:this.onKupIframeError.bind(this),onLoad:this.onKupIframeLoad.bind(this),src:this.src}));this.kupManager.debug.logMessage(this,"Resource undefined, not rendering!",r.WARNING)}get rootElement(){return h(this)}};p.style="iframe{box-sizing:border-box;height:100%;width:100%}:host([is-iframe]){box-sizing:border-box;display:block;height:100%;width:100%}";export{p as kup_iframe}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,f as i,h as
|
|
1
|
+
import{r as t,c as s,f as i,h as o,H as a,g as n}from"./p-d3b542b3.js";import{k as r}from"./p-fc2b1229.js";import{g as e,s as c}from"./p-682a367a.js";import{c as l}from"./p-97e8ea42.js";import{F as p}from"./p-928c5c36.js";import"./p-6c77a36c.js";import"./p-38d7584e.js";var h;!function(t){t.actionButton="Set of FButton props to set the action button.",t.closeButton="When true, the hide button will be displayed.",t.customStyle="Custom style of the component.",t.text="Sets the textual content of the snackbar.",t.timeout="Defaults at null, when set the snackbar will automatically disappear after the specified amount of milliseconds."}(h||(h={}));const u=class{constructor(i){t(this,i),this.kupActionClick=s(this,"kup-snackbar-actionclick",6),this.visible=!1,this.actionButton=null,this.closeButton=!0,this.customStyle="",this.text="",this.timeout=null,this.kupManager=r()}onKupActionClick(){this.hide(),this.kupActionClick.emit({comp:this,id:this.rootElement.id})}async getProps(t){return e(this,h,t)}async hide(){this.visible=!1}async refresh(){i(this)}async setProps(t){c(this,h,t)}async show(){this.visible=!0}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.timeout&&this.visible&&setTimeout((()=>{this.hide()}),this.timeout),this.kupManager.debug.logRender(this,!0)}render(){return o(a,{"kup-visible":this.visible},o("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{id:l},o("div",{class:"snackbar"},o("div",{class:"snackbar__text"},this.text),this.actionButton||this.closeButton?o("div",{class:"snackbar__buttons"},this.actionButton?o("div",{class:"snackbar__action"},o(p,Object.assign({},this.actionButton,{onClick:()=>this.onKupActionClick()}))):null,this.closeButton?o("div",{class:"snackbar__close"},o(p,{icon:"close",onClick:()=>this.hide()})):null):null)))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return n(this)}};u.style=":host{animation:snackbar-show 125ms;bottom:0;box-sizing:border-box;display:block;left:0;outline:none;pointer-events:none;position:fixed;transition:opacity 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms, -webkit-transform 0.15s cubic-bezier(0, 0, 0.2, 1) 0ms;width:100%;z-index:calc(var(--kup-navbar-zindex) + 1)}:host(:not([kup-visible])){display:none}#kup-component{display:flex;justify-content:center;height:100%;padding:8px;width:100%}.snackbar{align-items:center;background:var(--kup-navbar-background-color);border-radius:5px;box-shadow:var(--kup-box-shadow);color:var(--kup-navbar-color);display:flex;justify-content:flex-start;max-width:672px;min-height:48px;min-width:344px}.snackbar__text{padding:14px 16px;pointer-events:all;white-space:nowrap}.snackbar__buttons{--kup-button-primary-color:var(--kup-navbar-color);--kup-button-primary-color-rgb:var(--kup-navbar-color-rgb);--kup-button-primary-color-h:var(--kup-navbar-color-h);--kup-button-primary-color-s:var(--kup-navbar-color-s);--kup-button-primary-color-l:var(--kup-navbar-color-l);align-items:center;display:flex;justify-content:flex-end;margin-right:8px;pointer-events:all;width:100%}.snackbar__close{--kup-button-font-size:11px;margin-left:8px;pointer-events:all}@keyframes snackbar-show{from{transform:scale(0.5);opacity:0}to{transform:scale(1);opacity:1}}:host(.kup-top){bottom:unset;top:var(--kup-navbar-height, 0)}";export{u as kup_snackbar}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as e,d as t,r as l,s as n,J as r,T as i,W as s,n as o,h as a}from"./p-aca0e54b.js";import{b as u,f as c,j as f,k as h,l as d,m as p,h as m,o as b}from"./p-e0035c58.js";import{b as F,a as v,c as x,g,d as w,e as T}from"./p-7454cb92.js";import{h as k}from"./p-34b74425.js";import{F as V}from"./p-1ae66cc5.js";import{F as y}from"./p-6c77a36c.js";var C;!function(e){e[e.FROM=0]="FROM",e[e.TO=1]="TO"}(C||(C={}));const j=/^('|!')(%){0,1}(.*?)(%){0,1}(')$/;var O;!function(e){e.SIMPLE="simple",e.HIGHLIGHT="highlight"}(O||(O={}));const I=document.documentElement;class M{static isTree(t){return t.rootElement.tagName===e.TREE}isObjFiltrableByInterval(e){return!!(I.ketchup.objects.isDate(e)||I.ketchup.objects.isTime(e)||I.ketchup.objects.isTimestamp(e)||I.ketchup.objects.isNumber(e))}normalizeValue(e,n){let r=null!=e?e.trim():e;if(null==r||""==r||null==n)return r;if(I.ketchup.objects.isDate(n)){if(I.ketchup.dates.isValid(e,t.ISO_DATE))return r;if(I.ketchup.dates.isValid(e))return I.ketchup.dates.format(I.ketchup.dates.normalize(e,l.DATE),t.ISO_DATE)}else if(I.ketchup.objects.isTime(n)){let l=I.ketchup.objects.isTimeWithSeconds(n);if(I.ketchup.dates.isValid(e,l?t.ISO_TIME:t.ISO_TIME_WITHOUT_SECONDS))return r;if(u(e,l))return c(e,l?t.ISO_TIME:t.ISO_TIME_WITHOUT_SECONDS,l)}else if(I.ketchup.objects.isTimestamp(n)){if(I.ketchup.dates.isValid(e,t.ISO_DATE_TIME))return r;if(u(e,!0))return f(e)}else if(I.ketchup.objects.isNumber(n)&&h(e,n?n.p:""))return d(e,n?n.p:"");return r}filterIsNegative(e){const t=e.match(j);return!!t&&t[1].indexOf("!")>=0}isFilterCompliantForValue(e,t){if(null==e)return!1;if(null==t)return!1;const l=this.filterIsNegative(t);return e.toLowerCase().includes(t.toLowerCase())||this.matchSpecialFilter(e.toLowerCase(),t.toLowerCase().match(j),!0)?!l:!!l}matchSpecialFilter(e,t,l=!1){if(null!=t){const n=""===t[3]&&!e.trim()||!t[2]&&t[4]&&e.startsWith(t[3])||t[2]&&!t[4]&&e.endsWith(t[3])||!t[2]&&!t[4]&&e===t[3]||t[2]&&t[4]&&e.indexOf(t[3])>=0;return l||t[1].indexOf("!")<0?n:!n}return!1}isFilterCompliantForSimpleValue(e,l,n,r){if(null==e)return!1;n=this.normalizeValue(n,l);let i=e,s="",o="";null!=r&&(s=r[C.FROM],o=r[C.TO]);let a=!0;if(I.ketchup.objects.isNumber(l)){i=p(i,l?l.p:"");let e=m(i);if(""!=s)if(b(s)){if(a=!1,e<m(s))return!1}else n=s;if(""!=o)if(b(o)){if(a=!1,e>m(o))return!1}else n=o}if(I.ketchup.objects.isDate(l)||I.ketchup.objects.isTime(l)||I.ketchup.objects.isTimestamp(l)){let e=null,r=t.ISO_DATE;if(I.ketchup.objects.isDate(l)?r=t.ISO_DATE:I.ketchup.objects.isTime(l)?r=I.ketchup.objects.isTimeWithSeconds(l)?t.ISO_TIME:t.ISO_TIME_WITHOUT_SECONDS:I.ketchup.objects.isTimestamp(l)&&(r=t.ISO_DATE_TIME),I.ketchup.dates.isValid(i,r,!0)&&(e=I.ketchup.dates.toDate(i,r)),""!=s)if(null!=e&&I.ketchup.dates.isValid(s,r,!0)){if(a=!1,e<I.ketchup.dates.toDate(s,r))return!1}else n=s;if(""!=o)if(null!=e&&I.ketchup.dates.isValid(o,r,!0)){if(a=!1,e>I.ketchup.dates.toDate(o,r))return!1}else n=o;I.ketchup.dates.isValid(n,r)||I.ketchup.dates.isValid(n)||(i=I.ketchup.dates.format(i))}return!a||this.isFilterCompliantForValue(i,n)}static valuesArrayContainsValue(e,t){return M.indexOfValueInValuesArray(e,t)>=0}static indexOfValueInValuesArray(e,t){if(null==e||e.length<1)return-1;for(let l=0;l<e.length;l++)if(e[l].value==t)return l;return-1}}class N extends M{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={},t,l){if(null==t)return!1;if(!this.isColumnFiltrableByInterval(t))return!1;let n=this._getIntervalTextFieldFilterValue(e,t.name,C.FROM,l);if(null!=n&&""!=n.trim())return!0;let r=this._getIntervalTextFieldFilterValue(e,t.name,C.TO,l);return null!=r&&""!=r.trim()}addCheckboxFilter(e={},t,l){if(null==e)return;let n=e[t];null==n&&(n={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=n),null==n.checkBoxes&&(n.checkBoxes=[]),null==l||null==l.value?n.checkBoxes=[]:M.valuesArrayContainsValue(n.checkBoxes,l.value)||(n.checkBoxes[n.checkBoxes.length]=l)}removeCheckboxFilter(e={},t,l){if(null==e||null==l)return;let n=e[t];if(null==n)return;null==n.checkBoxes&&(n.checkBoxes=[]);let r=M.indexOfValueInValuesArray(n.checkBoxes,l);if(r>=0){let e=[];for(let t=0;t<n.checkBoxes.length;t++)t!=r&&(e[e.length]=n.checkBoxes[t]);n.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={},t,l){return this._hasIntervalTextFieldFilterValues(e,t,l)?[this._getIntervalTextFieldFilterValue(e,t.name,C.FROM,l),this._getIntervalTextFieldFilterValue(e,t.name,C.TO,l)]:["",""]}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={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValueTmp(e,t),!1),this._setIntervalTextFieldFilterValue(e,t,this.getIntervalTextFieldFilterValueTmp(e,t,C.FROM),C.FROM,!1),this._setIntervalTextFieldFilterValue(e,t,this.getIntervalTextFieldFilterValueTmp(e,t,C.TO),C.TO,!1)}resetTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValue(e,t),!0),this._setIntervalTextFieldFilterValue(e,t,this.getIntervalTextFieldFilterValue(e,t,C.FROM),C.FROM,!0),this._setIntervalTextFieldFilterValue(e,t,this.getIntervalTextFieldFilterValue(e,t,C.TO),C.TO,!0)}getFilterValueForTooltip(e={},t){let l=this.getTextFilterValue(e,t.name),n=this.getIntervalTextFieldFilterValues(e,t),r=this.getCheckBoxFilterValues(e,t.name),i="",s=F(l,t.obj,t.decimals);""!=l&&(i=" AND "),""!=n[C.FROM]&&(s+=i+"(>= "+F(n[C.FROM],t.obj,t.decimals)+")",i=" AND "),""!=n[C.TO]&&(s+=i+"(<= "+F(n[C.TO],t.obj,t.decimals)+")",i=" AND "),i="";let o="";return r.forEach((e=>{o+=i+v(e,t),i=" OR "})),""!=o&&(o="("+o+")",""!=s&&(o=" AND "+o)),o=s+o,o}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var _;!function(e){e.asAccordion="When enabled, the first level of depth will give an accordion look to nodes.",e.autoSelectionNodeMode="Auto select programmatic selectic node",e.columns="The columns of the tree when tree visualization is active.",e.customStyle="Custom style of the component.",e.data="The json data used to populate the tree view: the basic, always visible tree nodes.",e.density="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.",e.dynamicExpansionCallback="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.",e.enableExtraColumns="Enables adding extra columns.",e.expanded="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.",e.expansionMode="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.",e.filters="List of filters set by the user.",e.globalFilter="When set to true it activates the global filter.",e.globalFilterValue="The value of the global filter.",e.globalFilterMode="The mode of the global filter.",e.removableColumns="Sets the possibility to remove the selected column.",e.preventXScroll="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.",e.ripple="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",e.scrollOnHover="Activates the scroll on hover function.",e.selectedNode="An array of integers containing the path to a selected child. Groups up the properties SelFirst, SelItem, SelName.",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."}(_||(_={}));const A="TREE_COLUMN";var S;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(S||(S={}));const W=document.documentElement,B=W.ketchup?W.ketchup.objects:new n;class E extends M{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,r=[],i){if(n){let t=!0;if(r&&null!=r&&r.length>0){t=!1;let n=this.filterIsNegative(l);for(let i=0;i<r.length;i++){if(0==r[i].visible)continue;const s=e[r[i].name];if(null==s)continue;t=this.isFilterCompliantForValue(s.value,l);let o=x(r[i],s);if(o!=s.value&&(t=t||this.isFilterCompliantForValue(o,l)),1==t&&!n)break;if(0==t&&n)break}}if(!t)return!1}if(null==i&&(i=new N),!this.hasFilters(t,r,i))return!0;let s=Object.keys(t);for(let l=0;l<s.length;l++){let n=s[l];const o=e[n];if(!o)return!1;let a=i.getTextFilterValue(t,n),u=i.getIntervalTextFieldFilterValues(t,g(r,n));const c=this.filterIsNegative(a);let f=this.isFilterCompliantForCell(o,a,u),h=c;if(B.isNumber(o.obj)||B.isDate(o.obj)||B.isTime(o.obj)||B.isTimestamp(o.obj)||(h=this.isFilterCompliantForCellObj(o,a,u)),c){if(!f||!h)return!1}else if(!f&&!h)return!1;let d=i.getCheckBoxFilterValues(t,n);if(0==d.length)continue;let p=!1;for(let e=0;e<d.length;e++){let t=d[e];if(null!=t&&null!=t.value){if(null!=o.value&&o.value.toLowerCase().trim()==t.value.toLowerCase().trim()){p=!0;break}if(null!=o.obj&&o.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){p=!0;break}}}if(!p)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 N);for(let r=0;r<n.length;r++){let i=n[r],s=null;if(s="TREE_COLUMN"===i?{name:"TREE_COLUMN",title:""}:g(t,i),l.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},l="",n=[],r){if(!e||null==e)return[];let i=[];const s=!(!l||!n);if(this.hasFilters(t,n,r)||s)for(let o=0;o<e.length;o++){let a=e[o];this.isRowCompliant(a,t,l,s,n,r)&&(i[i.length]=a)}else i=[...e];return i}getColumnValues(e,t,l,n){let i=new Array;null==n&&(n=new N);let s=n.getTextFilterValueTmp(e.filters,t.name),o=n.getIntervalTextFieldFilterValuesTmp(e.filters,t),a=n.getCheckBoxFilterValues(e.filters,t.name);if(null!=t.valuesForFilter&&t.valuesForFilter.length>0)return t.valuesForFilter.forEach((e=>{let l=e;(M.valuesArrayContainsValue(a,l)||""==s||n.isFilterCompliantForSimpleValue(l,t.obj,s,o))&&i.push({value:l,displayedValue:F(l,t.obj,t.decimals)})})),i;let u=Object.assign({},e.filters);u[t.name]={textField:s,textFieldTmp:s,checkBoxes:[],interval:o,intervalTmp:o};let c=this.filterRows(e.getRows(),u,l,e.getVisibleColumns(),n);for(let e=0;e<a.length;e++)i.push(a[e]);return this.extractColumnValues(c,t,i),i.sort(((e,l)=>w(null,v(e,t),null,v(l,t),r.A))),i}extractColumnValues(e,t,l){return e.forEach((e=>this.addColumnValueFromRow(l,t,e.cells[t.name]))),l}addColumnValueFromRow(e,t,l){if(l){let n={value:l.value,displayedValue:x(t,l)};M.valuesArrayContainsValue(e,l.value)||e.push(n)}}}const R=document.documentElement;function $(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:r.A}),e.sort(((e,t)=>T({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},n.sortMode))),e.forEach((e=>{e.group.children=$(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=D(e,n,t[l]);if(0!==r)return r}return 0}return D(e,n,t[0])}))}function D(e,t,l){const n=e.cells[l.column],r=t.cells[l.column];return n||r?n?r?T(n,r,l.sortMode):-1:1:0}function L(e=[],t={},l="",n=[],r,i){return null==i&&(i=new E),i.filterRows(e,t,l,n,r)}function z(e=[],t=[],l=[],n={}){if(!t)return[];if(!l||0===l.length||!e||0===e.length)return t;const r={},s=l.filter((({column:t})=>{for(let{name:l,title:n}of e)if(l===t)return r[l]=n,!0;return!1}));if(0===s.length)return t;const o=[];let a={};return t.forEach((t=>{const l=s[0].column,u=t.cells[l];if(u){const c=g(e,l),f=x(c,u),h=u.value;let d=null;for(let e of o)if(e.group.label===f){d=e;break}null===d&&(d={group:{id:h,parent:null,column:l,columnLabel:r[l],expanded:!1,label:f,children:[],obj:u.obj,totals:{}},cells:{}},o.push(d));for(let l=1;l<s.length;l++){const n=s[l],i=t.cells[n.column];if(i){const t=g(e,n.column),l=x(t,i),s=i.value;let o=null;for(let e=0;e<d.group.children.length;e++){const t=d.group.children[e];if(t.group.label===l){o=t;break}}o||(o={cells:{},group:{id:s,parent:d,column:n.column,columnLabel:r[n.column],children:[],expanded:!1,label:l,totals:{},obj:i.obj}},H(o),d.group.children.push(o)),d=o}}d.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 s=R.ketchup.math.numberify(e.group.totals[r]||0),o=l.cells[r];if(o){let l=R.ketchup.objects.isNumber(o.obj);const a=t[r];switch(a){case i.COUNT:e.group.totals[r]=s+1;let t=e.group.parent;for(;null!=t;)t.group.totals[r]=(t.group.totals[r]||0)+1,t=t.group.parent;break;case i.DISTINCT:let u;if(u=l?R.ketchup.math.numberify(m(o.value)):o.value,n[e.group.id]){let t=n[e.group.id][r];t?t.push(u):(n[e.group.id][r]=[],n[e.group.id][r].push(u))}else n[e.group.id]={},n[e.group.id][r]=[],n[e.group.id][r].push(u);let c=e.group.parent;for(;null!=c;){if(n[c.group.id]){let e=n[c.group.id][r];e?e.push(u):(n[c.group.id][r]=[],n[c.group.id][r].push(u))}else n[c.group.id]={},n[c.group.id][r]=[],n[c.group.id][r].push(u);c=c.group.parent}break;case i.SUM:case i.AVERAGE:if(l){const t=R.ketchup.math.numberify(m(o.value));e.group.totals[r]=t+s;let l=e.group.parent;for(;null!=l;){const e=R.ketchup.math.numberify(l.group.totals[r]||0);l.group.totals[r]=t+e,l=l.group.parent}}break;case i.MIN:if(l){const t=e.group.totals[r],l=R.ketchup.math.numberify(m(o.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(R.ketchup.objects.isDate(o.obj)){const t=o.obj?R.ketchup.objects.parseDate(o.obj):R.ketchup.dates.toDayjs(o.value);if(R.ketchup.dates.isValid(t)){const l=R.ketchup.dates.toDate(t),n=e.group.totals[r];if(n){let t=[];t.push(l),t.push(R.ketchup.dates.format(n)),e.group.totals[r]=R.ketchup.dates.format(R.ketchup.dates.min(t))}else e.group.totals[r]=l;let i=e.group.parent;for(;null!=i;){const e=i.group.totals[r];if(e){let t=[];t.push(l),t.push(R.ketchup.dates.format(e)),i.group.totals[r]=R.ketchup.dates.format(R.ketchup.dates.min(t))}else i.group.totals[r]=l;i=i.group.parent}}}break;case i.MAX:if(l){const t=e.group.totals[r],l=R.ketchup.math.numberify(m(o.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(R.ketchup.objects.isDate(o.obj)){const t=o.obj?R.ketchup.objects.parseDate(o.obj):R.ketchup.dates.toDayjs(o.value);if(R.ketchup.dates.isValid(t)){const l=R.ketchup.dates.toDate(t),n=e.group.totals[r];if(n){let t=[];t.push(l),t.push(R.ketchup.dates.format(n)),e.group.totals[r]=R.ketchup.dates.format(R.ketchup.dates.max(t))}else e.group.totals[r]=l;let i=e.group.parent;for(;null!=i;){const e=i.group.totals[r];if(e){let t=[];t.push(l),t.push(R.ketchup.dates.format(e)),i.group.totals[r]=R.ketchup.dates.format(R.ketchup.dates.max(t))}else i.group.totals[r]=l;i=i.group.parent}}}break;default:0!=a.indexOf(i.MATH)&&console.warn(`invalid total mode: ${a}`)}}}))}(d,n,t,a)}})),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=>i.DISTINCT===t[e]));r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>q(e,r,l)))}(o,n,a),U(o,i.AVERAGE,n),U(o,i.MATH,n),o}function U(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==i.AVERAGE&&(r=n.filter((e=>i.AVERAGE===l[e]))),t==i.MATH&&(r=n.filter((e=>0==l[e].indexOf(i.MATH)))),r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>G(e,t,r,l)))}function q(e,t,l){const n=e.group.children;0!==n.length&&(n[0].group&&n.forEach((e=>{q(e,t,l)})),t.forEach((t=>{e.group.totals[t]=new Set(l[e.group.id][t]).size})))}function G(e,t,l,n){const r=e.group.children;if(0===r.length)return 0;let s=0;return r[0].group?r.forEach((e=>{s+=G(e,t,l,n)})):s=r.length,l.forEach((l=>{if(t==i.AVERAGE&&(e.group.totals[l]=R.ketchup.math.numberify(e.group.totals[l])/s),t==i.MATH){let t=n[l].substring(i.MATH.length);e.group.totals[l]=R.ketchup.math.formulas.custom(t,e.group.totals)}})),s}function J(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 K(e=[],t={}){if(R.ketchup.objects.isEmptyJsObject(e)||R.ketchup.objects.isEmptyJsObject(t))return{};const l=Object.keys(t),n={};if(0===l.length&&l.every((e=>t[e]===i.COUNT)))l.forEach((t=>n[t]=e.length));else{let r={};e.forEach(((e,s,o)=>{l.filter((e=>i.COUNT!==t[e]&&0!=t[e].indexOf(i.MATH))).forEach((l=>{const a=e.cells[l];if(a)if(t[l]===i.DISTINCT){let e;e=R.ketchup.objects.isNumber(a.obj)?R.ketchup.math.numberify(m(a.value)):a.value;let t=r[l];t?t.push(e):(r[l]=[],r[l].push(e))}else if(R.ketchup.objects.isNumber(a.obj)){const e=R.ketchup.math.numberify(m(a.value));let r=n[l];switch(!0){case t[l]===i.MIN:n[l]=r?Math.min(r,e):e;break;case t[l]===i.MAX:n[l]=r?Math.max(r,e):e;break;default:r=n[l]||0,n[l]=e+R.ketchup.math.numberify(r)}}else if(R.ketchup.objects.isDate(a.obj)){const e=a.obj?R.ketchup.objects.parseDate(a.obj):R.ketchup.dates.toDayjs(a.value);if(R.ketchup.dates.isValid(e)){const r=R.ketchup.dates.toDate(e),s=n[l];switch(!0){case t[l]===i.MIN:if(s){let e=[];e.push(r),e.push(R.ketchup.dates.format(s)),n[l]=R.ketchup.dates.format(R.ketchup.dates.min(e))}else n[l]=r;break;case t[l]===i.MAX:if(s){let e=[];e.push(r),e.push(R.ketchup.dates.format(s)),n[l]=R.ketchup.dates.format(R.ketchup.dates.max(e))}else n[l]=r}}}s===o.length-1&&t[l]===i.DISTINCT&&(n[l]=new Set(r[l]).size,r[l]=[])}))}));for(let r of l){switch(!0){case t[r]===i.AVERAGE:const l=n[r];l&&e.length>0&&(n[r]=l/e.length);break;case t[r]===i.COUNT:n[r]=e.length;break;case 0==t[r].indexOf(i.MATH):n[r]=R.ketchup.math.formulas.custom(t[r].substring(i.MATH.length),n)}n[r]&&(n[r]=+n[r].toFixed(2))}}return n}function H(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 P(e,t,l,n){const r=t*l-l,i=r+Number(l);if(0==n)return e.slice(r,i);let s=[];return Q(e,s,r,Number(l),0),s}function Q(e,t,l,n,r){let i=!1;for(let s=0;s<e.length;s++){let o=e[s],a=X(e[s]);if(null!=o.group&&null!=o.group.children&&o.group.children.length>0){a.group.children=[];let e=Q(o.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 X(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:Z(e.group),readOnly:e.readOnly,cssClass:e.cssClass}}function Y(e){if(null==e)return null;let t=[];for(let l=0;l<e.length;l++)t[t.length]=X(e[l]);return t}function Z(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:Y(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}var ee;!function(e){e.SIMPLE="simple",e.FULL="full"}(ee||(ee={}));const te=document.documentElement,le=e=>{const t=Math.ceil(e.max/e.perPage),l=function(e,t){const l=[];for(let n=1;n<=t;n++){const t=n==e.currentPage;l.push({id:n.toString(),selected:t,value:n.toString()})}return l}(e,t),n=function(e){const t=[];let l=e.perPage;if(0===l)return t;for(;l<e.max;){const n=l==e.perPage;t.push({id:l.toString(),selected:n,value:l.toString()}),l*=2}const n=e.max==e.perPage;return t.push({id:e.max.toString(),selected:n,value:e.max.toString()}),t}(e),r={"kup-list":{data:l},"kup-text-field":{label:te.ketchup.language.translate(s.PAGE),helper:te.ketchup.language.translate(s.TOTAL)+`: ${t}`,helperWhenFocused:!0,inputType:"number",max:t,min:1}},i={"kup-list":{data:n},"kup-text-field":{label:te.ketchup.language.translate(o.ROWS)+" / "+te.ketchup.language.translate(s.PAGE),helper:te.ketchup.language.translate(o.TOTAL)+`: ${e.max}`,helperWhenFocused:!0,inputType:"number",max:e.max,min:1}};return k("div",Object.assign({class:`f-paginator ${e.mode?e.mode:""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),e.mode!==ee.SIMPLE?k(V,{icon:"chevron_left",disabled:re(e),onClick:e.onPrevPage,wrapperClass:"prev-page"}):null,k("kup-combobox",{class:"page-selector",data:r,initialValue:e.currentPage.toString(),"onkup-combobox-change":e.onPageChange}),e.mode!==ee.SIMPLE?k(V,{icon:"chevron_right",disabled:ne(e),onClick:e.onNextPage,wrapperClass:"next-page"}):null,k("kup-combobox",{class:"rows-selector",data:i,initialValue:e.perPage.toString(),"onkup-combobox-change":e.onRowsChange}),e.onLoadMore?k(V,{icon:"plus",onClick:e.onLoadMore,label:te.ketchup.language.translate(a.LOAD_MORE),styling:y.FLAT,wrapperClass:"load-more-button"}):null)};function ne(e){return e.currentPage*e.perPage>=e.max}function re(e){return 1==e.currentPage}function ie(e,t,l){if(b(e)){const n=Math.ceil(t/l);let r=e;return r>n&&(r=n),r<1&&(r=1),r}return null}function se(e,t){if(b(e)){let l=e;return l>t&&(l=t),l<1&&(l=1),l}return null}export{N as F,S as K,E as a,M as b,C as c,K as d,le as e,L as f,z as g,ie as h,O as i,_ as j,ee as k,J as n,P as p,se as r,$ as s,A as t}
|
|
1
|
+
import{W as e,d as t,r as l,s as n,M as r,T as i,X as s,n as o,h as a}from"./p-fc2b1229.js";import{b as u,f as c,j as f,k as h,l as d,m as p,h as m,o as b}from"./p-682a367a.js";import{b as F,a as v,c as x,g,d as w,e as T}from"./p-d6c12c6c.js";import{h as k}from"./p-d3b542b3.js";import{F as y}from"./p-928c5c36.js";import{F as C}from"./p-6c77a36c.js";var V;!function(e){e[e.FROM=0]="FROM",e[e.TO=1]="TO"}(V||(V={}));const j=/^('|!')(%){0,1}(.*?)(%){0,1}(')$/;var O;!function(e){e.SIMPLE="simple",e.HIGHLIGHT="highlight"}(O||(O={}));const I=document.documentElement;class M{static isTree(t){return t.rootElement.tagName===e.TREE}isObjFiltrableByInterval(e){return!!(I.ketchup.objects.isDate(e)||I.ketchup.objects.isTime(e)||I.ketchup.objects.isTimestamp(e)||I.ketchup.objects.isNumber(e))}normalizeValue(e,n){let r=null!=e?e.trim():e;if(null==r||""==r||null==n)return r;if(I.ketchup.objects.isDate(n)){if(I.ketchup.dates.isValid(e,t.ISO_DATE))return r;if(I.ketchup.dates.isValid(e))return I.ketchup.dates.format(I.ketchup.dates.normalize(e,l.DATE),t.ISO_DATE)}else if(I.ketchup.objects.isTime(n)){let l=I.ketchup.objects.isTimeWithSeconds(n);if(I.ketchup.dates.isValid(e,l?t.ISO_TIME:t.ISO_TIME_WITHOUT_SECONDS))return r;if(u(e,l))return c(e,l?t.ISO_TIME:t.ISO_TIME_WITHOUT_SECONDS,l)}else if(I.ketchup.objects.isTimestamp(n)){if(I.ketchup.dates.isValid(e,t.ISO_DATE_TIME))return r;if(u(e,!0))return f(e)}else if(I.ketchup.objects.isNumber(n)&&h(e,n?n.p:""))return d(e,n?n.p:"");return r}filterIsNegative(e){const t=e.match(j);return!!t&&t[1].indexOf("!")>=0}isFilterCompliantForValue(e,t){if(null==e)return!1;if(null==t)return!1;const l=this.filterIsNegative(t);return e.toLowerCase().includes(t.toLowerCase())||this.matchSpecialFilter(e.toLowerCase(),t.toLowerCase().match(j),!0)?!l:!!l}matchSpecialFilter(e,t,l=!1){if(null!=t){const n=""===t[3]&&!e.trim()||!t[2]&&t[4]&&e.startsWith(t[3])||t[2]&&!t[4]&&e.endsWith(t[3])||!t[2]&&!t[4]&&e===t[3]||t[2]&&t[4]&&e.indexOf(t[3])>=0;return l||t[1].indexOf("!")<0?n:!n}return!1}isFilterCompliantForSimpleValue(e,l,n,r){if(null==e)return!1;n=this.normalizeValue(n,l);let i=e,s="",o="";null!=r&&(s=r[V.FROM],o=r[V.TO]);let a=!0;if(I.ketchup.objects.isNumber(l)){i=p(i,l?l.p:"");let e=m(i);if(""!=s)if(b(s)){if(a=!1,e<m(s))return!1}else n=s;if(""!=o)if(b(o)){if(a=!1,e>m(o))return!1}else n=o}if(I.ketchup.objects.isDate(l)||I.ketchup.objects.isTime(l)||I.ketchup.objects.isTimestamp(l)){let e=null,r=t.ISO_DATE;if(I.ketchup.objects.isDate(l)?r=t.ISO_DATE:I.ketchup.objects.isTime(l)?r=I.ketchup.objects.isTimeWithSeconds(l)?t.ISO_TIME:t.ISO_TIME_WITHOUT_SECONDS:I.ketchup.objects.isTimestamp(l)&&(r=t.ISO_DATE_TIME),I.ketchup.dates.isValid(i,r,!0)&&(e=I.ketchup.dates.toDate(i,r)),""!=s)if(null!=e&&I.ketchup.dates.isValid(s,r,!0)){if(a=!1,e<I.ketchup.dates.toDate(s,r))return!1}else n=s;if(""!=o)if(null!=e&&I.ketchup.dates.isValid(o,r,!0)){if(a=!1,e>I.ketchup.dates.toDate(o,r))return!1}else n=o;I.ketchup.dates.isValid(n,r)||I.ketchup.dates.isValid(n)||(i=I.ketchup.dates.format(i))}return!a||this.isFilterCompliantForValue(i,n)}static valuesArrayContainsValue(e,t){return M.indexOfValueInValuesArray(e,t)>=0}static indexOfValueInValuesArray(e,t){if(null==e||e.length<1)return-1;for(let l=0;l<e.length;l++)if(e[l].value==t)return l;return-1}}class N extends M{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={},t,l){if(null==t)return!1;if(!this.isColumnFiltrableByInterval(t))return!1;let n=this._getIntervalTextFieldFilterValue(e,t.name,V.FROM,l);if(null!=n&&""!=n.trim())return!0;let r=this._getIntervalTextFieldFilterValue(e,t.name,V.TO,l);return null!=r&&""!=r.trim()}addCheckboxFilter(e={},t,l){if(null==e)return;let n=e[t];null==n&&(n={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null},e[t]=n),null==n.checkBoxes&&(n.checkBoxes=[]),null==l||null==l.value?n.checkBoxes=[]:M.valuesArrayContainsValue(n.checkBoxes,l.value)||(n.checkBoxes[n.checkBoxes.length]=l)}removeCheckboxFilter(e={},t,l){if(null==e||null==l)return;let n=e[t];if(null==n)return;null==n.checkBoxes&&(n.checkBoxes=[]);let r=M.indexOfValueInValuesArray(n.checkBoxes,l);if(r>=0){let e=[];for(let t=0;t<n.checkBoxes.length;t++)t!=r&&(e[e.length]=n.checkBoxes[t]);n.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={},t,l){return this._hasIntervalTextFieldFilterValues(e,t,l)?[this._getIntervalTextFieldFilterValue(e,t.name,V.FROM,l),this._getIntervalTextFieldFilterValue(e,t.name,V.TO,l)]:["",""]}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={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValueTmp(e,t),!1),this._setIntervalTextFieldFilterValue(e,t,this.getIntervalTextFieldFilterValueTmp(e,t,V.FROM),V.FROM,!1),this._setIntervalTextFieldFilterValue(e,t,this.getIntervalTextFieldFilterValueTmp(e,t,V.TO),V.TO,!1)}resetTextualFilters(e={},t){this._setTextFieldFilterValue(e,t,this.getTextFilterValue(e,t),!0),this._setIntervalTextFieldFilterValue(e,t,this.getIntervalTextFieldFilterValue(e,t,V.FROM),V.FROM,!0),this._setIntervalTextFieldFilterValue(e,t,this.getIntervalTextFieldFilterValue(e,t,V.TO),V.TO,!0)}getFilterValueForTooltip(e={},t){let l=this.getTextFilterValue(e,t.name),n=this.getIntervalTextFieldFilterValues(e,t),r=this.getCheckBoxFilterValues(e,t.name),i="",s=F(l,t.obj,t.decimals);""!=l&&(i=" AND "),""!=n[V.FROM]&&(s+=i+"(>= "+F(n[V.FROM],t.obj,t.decimals)+")",i=" AND "),""!=n[V.TO]&&(s+=i+"(<= "+F(n[V.TO],t.obj,t.decimals)+")",i=" AND "),i="";let o="";return r.forEach((e=>{o+=i+v(e,t),i=" OR "})),""!=o&&(o="("+o+")",""!=s&&(o=" AND "+o)),o=s+o,o}removeFilter(e={},t){e[t]={textField:"",textFieldTmp:"",checkBoxes:[],interval:null,intervalTmp:null}}}var _;!function(e){e.asAccordion="When enabled, the first level of depth will give an accordion look to nodes.",e.autoSelectionNodeMode="Auto select programmatic selectic node",e.columns="The columns of the tree when tree visualization is active.",e.customStyle="Custom style of the component.",e.data="The json data used to populate the tree view: the basic, always visible tree nodes.",e.density="The density of the rows, defaults at 'medium' and can also be set to 'dense' or 'wide'.",e.dynamicExpansionCallback="Function that gets invoked when a new set of nodes must be loaded as children of a node. When useDynamicExpansion is set, the tree component will have two different behaviors depending on the value of this prop. If this prop is set to null, no callback to download data is available: the component will emit an event requiring the parent to load the children of the given node. If this prop is set to have a callback, then the component will automatically make requests to load children of a given node. After the load has been completed, a different event will be fired to alert the parent of the change.",e.enableExtraColumns="Enables adding extra columns.",e.expanded="Flag: the nodes of the whole tree must be already expanded upon loading. Disabled nodes do NOT get expanded.",e.expansionMode="Behavior of nodes' expansion: it can be chosen between expanding a node by clicking on the dropdown icon, or by clicking on the whole node.",e.filters="List of filters set by the user.",e.globalFilter="When set to true it activates the global filter.",e.globalFilterValue="The value of the global filter.",e.globalFilterMode="The mode of the global filter.",e.removableColumns="Sets the possibility to remove the selected column.",e.preventXScroll="Experimental feature: when active, the tree will try to prevent horizontal overflowing elements by setting a width on the content of the table cells. It works only on cells of the main column.",e.ripple="When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",e.scrollOnHover="Activates the scroll on hover function.",e.selectedNode="An array of integers containing the path to a selected child. Groups up the properties SelFirst, SelItem, SelName.",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."}(_||(_={}));const A="TREE_COLUMN";var S;!function(e){e.DROPDOWN="dropdown",e.NODE="node"}(S||(S={}));const W=document.documentElement,B=W.ketchup?W.ketchup.objects:new n;class E extends M{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,r=[],i){if(n){let t=!0;if(r&&null!=r&&r.length>0){t=!1;let n=this.filterIsNegative(l);for(let i=0;i<r.length;i++){if(0==r[i].visible)continue;const s=e[r[i].name];if(null==s)continue;t=this.isFilterCompliantForValue(s.value,l);let o=x(r[i],s);if(o!=s.value&&(t=t||this.isFilterCompliantForValue(o,l)),1==t&&!n)break;if(0==t&&n)break}}if(!t)return!1}if(null==i&&(i=new N),!this.hasFilters(t,r,i))return!0;let s=Object.keys(t);for(let l=0;l<s.length;l++){let n=s[l];const o=e[n];if(!o)return!1;let a=i.getTextFilterValue(t,n),u=i.getIntervalTextFieldFilterValues(t,g(r,n));const c=this.filterIsNegative(a);let f=this.isFilterCompliantForCell(o,a,u),h=c;if(B.isNumber(o.obj)||B.isDate(o.obj)||B.isTime(o.obj)||B.isTimestamp(o.obj)||(h=this.isFilterCompliantForCellObj(o,a,u)),c){if(!f||!h)return!1}else if(!f&&!h)return!1;let d=i.getCheckBoxFilterValues(t,n);if(0==d.length)continue;let p=!1;for(let e=0;e<d.length;e++){let t=d[e];if(null!=t&&null!=t.value){if(null!=o.value&&o.value.toLowerCase().trim()==t.value.toLowerCase().trim()){p=!0;break}if(null!=o.obj&&o.obj.k.toLowerCase().trim()==t.value.toLowerCase().trim()){p=!0;break}}}if(!p)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 N);for(let r=0;r<n.length;r++){let i=n[r],s=null;if(s="TREE_COLUMN"===i?{name:"TREE_COLUMN",title:""}:g(t,i),l.hasFiltersForColumn(e,s))return!0}return!1}filterRows(e=[],t={},l="",n=[],r){if(!e||null==e)return[];let i=[];const s=!(!l||!n);if(this.hasFilters(t,n,r)||s)for(let o=0;o<e.length;o++){let a=e[o];this.isRowCompliant(a,t,l,s,n,r)&&(i[i.length]=a)}else i=[...e];return i}getColumnValues(e,t,l,n){let i=new Array;null==n&&(n=new N);let s=n.getTextFilterValueTmp(e.filters,t.name),o=n.getIntervalTextFieldFilterValuesTmp(e.filters,t),a=n.getCheckBoxFilterValues(e.filters,t.name);if(null!=t.valuesForFilter&&t.valuesForFilter.length>0)return t.valuesForFilter.forEach((e=>{let l=e;(M.valuesArrayContainsValue(a,l)||""==s||n.isFilterCompliantForSimpleValue(l,t.obj,s,o))&&i.push({value:l,displayedValue:F(l,t.obj,t.decimals)})})),i;let u=Object.assign({},e.filters);u[t.name]={textField:s,textFieldTmp:s,checkBoxes:[],interval:o,intervalTmp:o};let c=this.filterRows(e.getRows(),u,l,e.getVisibleColumns(),n);for(let e=0;e<a.length;e++)i.push(a[e]);return this.extractColumnValues(c,t,i),i.sort(((e,l)=>w(null,v(e,t),null,v(l,t),r.A))),i}extractColumnValues(e,t,l){return e.forEach((e=>this.addColumnValueFromRow(l,t,e.cells[t.name]))),l}addColumnValueFromRow(e,t,l){if(l){let n={value:l.value,displayedValue:x(t,l)};M.valuesArrayContainsValue(e,l.value)||e.push(n)}}}const R=document.documentElement;function $(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:r.A}),e.sort(((e,t)=>T({obj:e.group.obj,value:e.group.id},{obj:t.group.obj,value:t.group.id},n.sortMode))),e.forEach((e=>{e.group.children=$(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=D(e,n,t[l]);if(0!==r)return r}return 0}return D(e,n,t[0])}))}function D(e,t,l){const n=e.cells[l.column],r=t.cells[l.column];return n||r?n?r?T(n,r,l.sortMode):-1:1:0}function L(e=[],t={},l="",n=[],r,i){return null==i&&(i=new E),i.filterRows(e,t,l,n,r)}function z(e=[],t=[],l=[],n={}){if(!t)return[];if(!l||0===l.length||!e||0===e.length)return t;const r={},s=l.filter((({column:t})=>{for(let{name:l,title:n}of e)if(l===t)return r[l]=n,!0;return!1}));if(0===s.length)return t;const o=[];let a={};return t.forEach((t=>{const l=s[0].column,u=t.cells[l];if(u){const c=g(e,l),f=x(c,u),h=u.value;let d=null;for(let e of o)if(e.group.label===f){d=e;break}null===d&&(d={group:{id:h,parent:null,column:l,columnLabel:r[l],expanded:!1,label:f,children:[],obj:u.obj,totals:{}},cells:{}},o.push(d));for(let l=1;l<s.length;l++){const n=s[l],i=t.cells[n.column];if(i){const t=g(e,n.column),l=x(t,i),s=i.value;let o=null;for(let e=0;e<d.group.children.length;e++){const t=d.group.children[e];if(t.group.label===l){o=t;break}}o||(o={cells:{},group:{id:s,parent:d,column:n.column,columnLabel:r[n.column],children:[],expanded:!1,label:l,totals:{},obj:i.obj}},H(o),d.group.children.push(o)),d=o}}d.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 s=R.ketchup.math.numberify(e.group.totals[r]||0),o=l.cells[r];if(o){let l=R.ketchup.objects.isNumber(o.obj);const a=t[r];switch(a){case i.COUNT:e.group.totals[r]=s+1;let t=e.group.parent;for(;null!=t;)t.group.totals[r]=(t.group.totals[r]||0)+1,t=t.group.parent;break;case i.DISTINCT:let u;if(u=l?R.ketchup.math.numberify(m(o.value)):o.value,n[e.group.id]){let t=n[e.group.id][r];t?t.push(u):(n[e.group.id][r]=[],n[e.group.id][r].push(u))}else n[e.group.id]={},n[e.group.id][r]=[],n[e.group.id][r].push(u);let c=e.group.parent;for(;null!=c;){if(n[c.group.id]){let e=n[c.group.id][r];e?e.push(u):(n[c.group.id][r]=[],n[c.group.id][r].push(u))}else n[c.group.id]={},n[c.group.id][r]=[],n[c.group.id][r].push(u);c=c.group.parent}break;case i.SUM:case i.AVERAGE:if(l){const t=R.ketchup.math.numberify(m(o.value));e.group.totals[r]=t+s;let l=e.group.parent;for(;null!=l;){const e=R.ketchup.math.numberify(l.group.totals[r]||0);l.group.totals[r]=t+e,l=l.group.parent}}break;case i.MIN:if(l){const t=e.group.totals[r],l=R.ketchup.math.numberify(m(o.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(R.ketchup.objects.isDate(o.obj)){const t=o.obj?R.ketchup.objects.parseDate(o.obj):R.ketchup.dates.toDayjs(o.value);if(R.ketchup.dates.isValid(t)){const l=R.ketchup.dates.toDate(t),n=e.group.totals[r];if(n){let t=[];t.push(l),t.push(R.ketchup.dates.format(n)),e.group.totals[r]=R.ketchup.dates.format(R.ketchup.dates.min(t))}else e.group.totals[r]=l;let i=e.group.parent;for(;null!=i;){const e=i.group.totals[r];if(e){let t=[];t.push(l),t.push(R.ketchup.dates.format(e)),i.group.totals[r]=R.ketchup.dates.format(R.ketchup.dates.min(t))}else i.group.totals[r]=l;i=i.group.parent}}}break;case i.MAX:if(l){const t=e.group.totals[r],l=R.ketchup.math.numberify(m(o.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(R.ketchup.objects.isDate(o.obj)){const t=o.obj?R.ketchup.objects.parseDate(o.obj):R.ketchup.dates.toDayjs(o.value);if(R.ketchup.dates.isValid(t)){const l=R.ketchup.dates.toDate(t),n=e.group.totals[r];if(n){let t=[];t.push(l),t.push(R.ketchup.dates.format(n)),e.group.totals[r]=R.ketchup.dates.format(R.ketchup.dates.max(t))}else e.group.totals[r]=l;let i=e.group.parent;for(;null!=i;){const e=i.group.totals[r];if(e){let t=[];t.push(l),t.push(R.ketchup.dates.format(e)),i.group.totals[r]=R.ketchup.dates.format(R.ketchup.dates.max(t))}else i.group.totals[r]=l;i=i.group.parent}}}break;default:0!=a.indexOf(i.MATH)&&console.warn(`invalid total mode: ${a}`)}}}))}(d,n,t,a)}})),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=>i.DISTINCT===t[e]));r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>q(e,r,l)))}(o,n,a),U(o,i.AVERAGE,n),U(o,i.MATH,n),o}function U(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==i.AVERAGE&&(r=n.filter((e=>i.AVERAGE===l[e]))),t==i.MATH&&(r=n.filter((e=>0==l[e].indexOf(i.MATH)))),r.length>0&&e.filter((e=>e.group.children.length>0)).forEach((e=>G(e,t,r,l)))}function q(e,t,l){const n=e.group.children;0!==n.length&&(n[0].group&&n.forEach((e=>{q(e,t,l)})),t.forEach((t=>{e.group.totals[t]=new Set(l[e.group.id][t]).size})))}function G(e,t,l,n){const r=e.group.children;if(0===r.length)return 0;let s=0;return r[0].group?r.forEach((e=>{s+=G(e,t,l,n)})):s=r.length,l.forEach((l=>{if(t==i.AVERAGE&&(e.group.totals[l]=R.ketchup.math.numberify(e.group.totals[l])/s),t==i.MATH){let t=n[l].substring(i.MATH.length);e.group.totals[l]=R.ketchup.math.formulas.custom(t,e.group.totals)}})),s}function K(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 X(e=[],t={}){if(R.ketchup.objects.isEmptyJsObject(e)||R.ketchup.objects.isEmptyJsObject(t))return{};const l=Object.keys(t),n={};if(0===l.length&&l.every((e=>t[e]===i.COUNT)))l.forEach((t=>n[t]=e.length));else{let r={};e.forEach(((e,s,o)=>{l.filter((e=>i.COUNT!==t[e]&&0!=t[e].indexOf(i.MATH))).forEach((l=>{const a=e.cells[l];if(a)if(t[l]===i.DISTINCT){let e;e=R.ketchup.objects.isNumber(a.obj)?R.ketchup.math.numberify(m(a.value)):a.value;let t=r[l];t?t.push(e):(r[l]=[],r[l].push(e))}else if(R.ketchup.objects.isNumber(a.obj)){const e=R.ketchup.math.numberify(m(a.value));let r=n[l];switch(!0){case t[l]===i.MIN:n[l]=r?Math.min(r,e):e;break;case t[l]===i.MAX:n[l]=r?Math.max(r,e):e;break;default:r=n[l]||0,n[l]=e+R.ketchup.math.numberify(r)}}else if(R.ketchup.objects.isDate(a.obj)){const e=a.obj?R.ketchup.objects.parseDate(a.obj):R.ketchup.dates.toDayjs(a.value);if(R.ketchup.dates.isValid(e)){const r=R.ketchup.dates.toDate(e),s=n[l];switch(!0){case t[l]===i.MIN:if(s){let e=[];e.push(r),e.push(R.ketchup.dates.format(s)),n[l]=R.ketchup.dates.format(R.ketchup.dates.min(e))}else n[l]=r;break;case t[l]===i.MAX:if(s){let e=[];e.push(r),e.push(R.ketchup.dates.format(s)),n[l]=R.ketchup.dates.format(R.ketchup.dates.max(e))}else n[l]=r}}}s===o.length-1&&t[l]===i.DISTINCT&&(n[l]=new Set(r[l]).size,r[l]=[])}))}));for(let r of l){switch(!0){case t[r]===i.AVERAGE:const l=n[r];l&&e.length>0&&(n[r]=l/e.length);break;case t[r]===i.COUNT:n[r]=e.length;break;case 0==t[r].indexOf(i.MATH):n[r]=R.ketchup.math.formulas.custom(t[r].substring(i.MATH.length),n)}n[r]&&(n[r]=+n[r].toFixed(2))}}return n}function H(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 J(e,t,l,n){const r=t*l-l,i=r+Number(l);if(0==n)return e.slice(r,i);let s=[];return P(e,s,r,Number(l),0),s}function P(e,t,l,n,r){let i=!1;for(let s=0;s<e.length;s++){let o=e[s],a=Q(e[s]);if(null!=o.group&&null!=o.group.children&&o.group.children.length>0){a.group.children=[];let e=P(o.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 Q(e){return null==e?null:{id:e.id,cells:Object.assign({},e.cells),actions:e.actions?[...e.actions]:null,group:Z(e.group),readOnly:e.readOnly,cssClass:e.cssClass}}function Y(e){if(null==e)return null;let t=[];for(let l=0;l<e.length;l++)t[t.length]=Q(e[l]);return t}function Z(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:Y(e.children),obj:Object.assign({},e.obj),totals:Object.assign({},e.totals)}}var ee;!function(e){e.SIMPLE="simple",e.FULL="full"}(ee||(ee={}));const te=document.documentElement,le=e=>{const t=Math.ceil(e.max/e.perPage),l=function(e,t){const l=[];for(let n=1;n<=t;n++){const t=n==e.currentPage;l.push({id:n.toString(),selected:t,value:n.toString()})}return l}(e,t),n=function(e){const t=[];let l=e.perPage;if(0===l)return t;for(;l<e.max;){const n=l==e.perPage;t.push({id:l.toString(),selected:n,value:l.toString()}),l*=2}const n=e.max==e.perPage;return t.push({id:e.max.toString(),selected:n,value:e.max.toString()}),t}(e),r={"kup-list":{data:l},"kup-text-field":{label:te.ketchup.language.translate(s.PAGE),helper:te.ketchup.language.translate(s.TOTAL)+`: ${t}`,helperWhenFocused:!0,inputType:"number",max:t,min:1}},i={"kup-list":{data:n},"kup-text-field":{label:te.ketchup.language.translate(o.ROWS)+" / "+te.ketchup.language.translate(s.PAGE),helper:te.ketchup.language.translate(o.TOTAL)+`: ${e.max}`,helperWhenFocused:!0,inputType:"number",max:e.max,min:1}};return k("div",Object.assign({class:`f-paginator ${e.mode?e.mode:""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),e.mode!==ee.SIMPLE?k(y,{icon:"chevron_left",disabled:re(e),onClick:e.onPrevPage,wrapperClass:"prev-page"}):null,k("kup-combobox",{class:"page-selector",data:r,initialValue:e.currentPage.toString(),"onkup-combobox-change":e.onPageChange}),e.mode!==ee.SIMPLE?k(y,{icon:"chevron_right",disabled:ne(e),onClick:e.onNextPage,wrapperClass:"next-page"}):null,k("kup-combobox",{class:"rows-selector",data:i,initialValue:e.perPage.toString(),"onkup-combobox-change":e.onRowsChange}),e.onLoadMore?k(y,{icon:"plus",onClick:e.onLoadMore,label:te.ketchup.language.translate(a.LOAD_MORE),styling:C.FLAT,wrapperClass:"load-more-button"}):null)};function ne(e){return e.currentPage*e.perPage>=e.max}function re(e){return 1==e.currentPage}function ie(e,t,l){if(b(e)){const n=Math.ceil(t/l);let r=e;return r>n&&(r=n),r<1&&(r=1),r}return null}function se(e,t){if(b(e)){let l=e;return l>t&&(l=t),l<1&&(l=1),l}return null}export{N as F,S as K,E as a,M as b,V as c,X as d,le as e,L as f,z as g,ie as h,O as i,_ as j,ee as k,K as n,J as p,se as r,$ as s,A as t}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as t,h as i}from"./p-d3b542b3.js";import{c as l}from"./p-d6c12c6c.js";import{k as h}from"./p-fc2b1229.js";import{p as e}from"./p-682a367a.js";const o=class{constructor(i){s(this,i),this.dashClick=t(this,"kup-dash-click",7),this.layout="1",this.fontsize="",this.active=!1,this.columnsNumber=1,this.fullWidth=!0,this.horizontal=!1,this.iconColor=[],this.valueColor=[],this.textColor=[],this.kupManager=h()}render(){let s=[];var t=0;return this.data.rows.forEach((h=>{let o="",c="",d="",r="",a="",n="",p={color:this.textColor[t]},v={color:this.valueColor[t]};if(o=this.data.columns[0]?i("div",{slot:"icon"},i("icon",{class:h.cells[this.data.columns[0].name].obj.k,style:{color:this.iconColor[t]}})):i("div",{slot:"icon"}),c=this.data.columns[1]?i("div",{slot:"unit",style:v},h.cells[this.data.columns[1].name].obj.k," "):i("div",{slot:"unit"}),d=this.data.columns[2]?i("div",{slot:"descr",style:p},h.cells[this.data.columns[2].name].obj.k):i("div",{slot:"descr"}),this.data.columns[3]){let s=this.data.columns[3];s.obj=h.cells[this.data.columns[3].name].obj;let t=l(s,h.cells[this.data.columns[3].name]);r=i("div",{slot:"value",style:v},t)}else r=i("div",{slot:"value"});if(this.data.columns[5]){let s=this.data.columns[5];s.obj=h.cells[this.data.columns[5].name].obj;let t=l(s,h.cells[this.data.columns[5].name]);this.data.columns[6]&&h.cells[this.data.columns[6].name].obj.k&&(t+=e(this.kupManager.dates.getLocale())),a=i("div",{slot:"value-int",style:v},t)}else a=i("div",{slot:"value-int"});n=this.data.columns[6]?i("div",{slot:"value-dec",style:v},h.cells[this.data.columns[6].name].obj.k):i("div",{slot:"value-dec"});const u=i("kup-dash",{layout:this.layout,fontsize:this.fontsize,index:t,active:this.active,slot:String(t)},o,c,d,r,a,n);s.push(u),t++})),i("div",null,i("link",{href:"https://cdn.materialdesignicons.com/4.5.95/css/materialdesignicons.min.css",rel:"stylesheet",type:"text/css"}),i("kup-grid",{columns:this.columnsNumber,singleLine:this.horizontal,class:this.fullWidth?"kup-full-width":""},s))}};o.style=".horizontal{display:inline-block;min-width:300px;max-width:100%;overflow:visible;white-space:nowrap;border:solid;border-width:1px;margin:2px}";export{o as kup_dash_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as c}from"./p-d3b542b3.js";const e=e=>{const o={"data-indeterminate":!!e.indeterminate},a={checkbox:!0,"checkbox--checked":!(!e.checked||e.indeterminate),"checkbox--disabled":!!e.disabled,"checkbox--indeterminate":!!e.indeterminate};return c("div",Object.assign({class:`f-checkbox ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),c("div",{class:"form-field "+(e.leadingLabel?"form-field--align-end":"")},c("div",{class:a},c("input",Object.assign({type:"checkbox",class:"checkbox__native-control",checked:e.checked,disabled:e.disabled,onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus},o,{value:e.checked?"on":"off"})),c("div",{class:"checkbox__background",onClick:e.onChange},c("svg",{class:"checkbox__checkmark",viewBox:"0 0 24 24"},c("path",{class:"checkbox__checkmark-path",fill:"none",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})),c("div",{class:"checkbox__mixedmark"}))),e.label?c("label",null,e.label):void 0))};export{e as F}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,f as i,h as r,H as a,g as l}from"./p-d3b542b3.js";import{F as s}from"./p-928c5c36.js";import{F as n}from"./p-6c77a36c.js";import{k as o,h,y as f}from"./p-fc2b1229.js";import{g as m,s as _}from"./p-682a367a.js";import{c}from"./p-97e8ea42.js";import"./p-38d7584e.js";var p;!function(t){t.autofit="The component's initial render will fit the container.",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."}(p||(p={}));var d,u,y,k,v,g,w,b,x,j,W,E,T,C,M,S,O,P,D,L,F,R,z=function(t,e,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:e.get(t)},H=function(t,e,i,r,a){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!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"===r?a.call(t,i):a?a.value=i:e.set(t,i),i};const X=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),this.autofit=!0,this.collapsible=!0,this.customStyle="",this.data=null,this.layout=null,u.set(this,[]),y.set(this,!1),k.set(this,0),v.set(this,0),g.set(this,[]),w.set(this,o()),b.set(this,(t=>{const e=t.clientX-z(this,k,"f"),i=t.clientY-z(this,v,"f");this.rootElement.scrollTop-=i,this.rootElement.scrollLeft-=e,H(this,k,t.clientX,"f"),H(this,v,t.clientY,"f")})),x.set(this,null)}async getProps(t){return m(this,p,t)}async refresh(){i(this)}async setProps(t){_(this,p,t)}componentWillLoad(){z(this,w,"f").debug.logLoad(this,!1),z(this,w,"f").language.register(this),z(this,w,"f").theme.register(this)}componentDidLoad(){if(z(this,d,"m",L).call(this),this.autofit){const t=z(this,x,"f").clientWidth,e=z(this,x,"f").children[0].clientWidth;e>t&&z(this,d,"m",R).call(this,t,e)}z(this,w,"f").debug.logLoad(this,!0)}componentWillRender(){z(this,w,"f").debug.logRender(this,!1)}componentDidRender(){z(this,w,"f").debug.logRender(this,!0)}render(){return r(a,{onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault(),z(this,d,"m",C).call(this,t)},onWheel:t=>{t.preventDefault(),z(this,d,"m",F).call(this,t)}},r("style",null,z(this,w,"f").theme.setKupStyle(this.rootElement)),r("div",{id:c},z(this,d,"m",T).call(this)))}disconnectedCallback(){z(this,w,"f").language.unregister(this),z(this,w,"f").theme.unregister(this)}get rootElement(){return l(this)}};u=new WeakMap,y=new WeakMap,k=new WeakMap,v=new WeakMap,g=new WeakMap,w=new WeakMap,b=new WeakMap,x=new WeakMap,d=new WeakSet,j=function(t,e,i,a){const l=[];return l.push(r("td",{class:{"family-tree__line":!0,"family-tree__line--right":!t,"family-tree__line--top":!t}},r("div",{class:"family-tree__line--placeholder"}))),l.push(r("td",{class:{"family-tree__line":!0,"family-tree__line--left":t,"family-tree__line--top":t&&!i||a&&!e}},r("div",{class:"family-tree__line--placeholder"}))),l},W=function t(e){var i;let a=null,l=null;(!this.collapsible||this.collapsible&&e.isExpanded)&&(null===(i=e.children)||void 0===i||i.forEach((t=>{t.isStaff?(l||(l=[]),l.push(t)):(a||(a=[]),a.push(t))})));const o=a?2*a.length:1,h={"family-tree__line":!0,"family-tree__line--placeholder":!(!a&&!l),"family-tree__line--vertical":!(!a&&!l)},f={columns:[{name:"*TREECOL",title:"Fake column"},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]},m={icon:e.isExpanded?"remove":"plus",styling:n.OUTLINED,slim:!0,onClick:()=>{e.isExpanded=!e.isExpanded,this.refresh()}},_=r("div",{class:"family-tree__item"},r("div",{class:"family-tree__item__wrapper"},r("kup-box",{class:"kup-borderless kup-paddingless",customStyle:"#kup-component { background: var(--kup_familytree_item_background_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:f,layout:e.layout||this.layout||null}),this.collapsible&&e.children&&e.children.length>0?r(s,Object.assign({},m)):void 0)),c={"--kup_familytree_staffchildren":(null==l?void 0:l.length.toString())||"0"};return r("table",{class:"family-tree__node"},r("tr",null,r("td",{"data-row":e,colSpan:o},_)),r("tr",null,r("td",{colSpan:o},r("div",{class:h}))),l?[r("tr",null,r("td",{colSpan:o},r("div",{class:Object.assign(Object.assign({},h),{"family-tree__line--staff":!0}),style:c}),r("div",{class:"family-tree__node__staff",style:c},l.map((e=>[r("div",{class:"family-tree__node__staff__item"},z(this,d,"m",t).call(this,e))])))))]:null,l&&a?[r("tr",null,r("td",{colSpan:o},r("div",{class:h}))),r("tr",null,r("td",{colSpan:o},r("div",{class:h})))]:null,a?[r("tr",null,a.map((t=>z(this,d,"m",j).call(this,0==a.indexOf(t),a.indexOf(t)==a.length-1,1==a.length,a.length>2)))),r("tr",null,a.map((e=>r("td",{colSpan:2},z(this,d,"m",t).call(this,e)))))]:void 0)},E=function(t){return t.map((t=>z(this,d,"m",W).call(this,t)))},T=function(){return r("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>H(this,x,t,"f")},this.data&&this.data.rows&&this.data.rows.length?z(this,d,"m",E).call(this,this.data.rows):r("div",null,z(this,w,"f").language.translate(h.EMPTY_DATA)))},C=function(t){H(this,k,t.clientX,"f"),H(this,v,t.clientY,"f");const e=()=>{document.removeEventListener("pointermove",z(this,b,"f")),document.removeEventListener("pointerup",e)};document.addEventListener("pointermove",z(this,b,"f")),document.addEventListener("pointerup",e)},M=function(t){const e=[];for(;t&&t!==this.rootElement&&t!==document.body;)e.push(t),t=t.parentNode?t.parentNode:t.host;return e},S=function(t,e){let i;if(t)for(let e=t.length-1;e>=0;e--){let r=t[e];if(r.tagName)switch(r.tagName.toUpperCase()){case"TD":i=r}}let r=null,a=null,l=null;return i&&(r=i["data-cell"],a=i["data-column"],l=i["data-row"]),{cell:r||null,column:a||null,originalEvent:e,row:l||null,td:i||null}},O=function(t){return z(this,d,"m",S).call(this,z(this,d,"m",M).call(this,t.target),t)},P=function(t){return z(this,d,"m",S).call(this,z(this,d,"m",M).call(this,t.target),t)},D=function(t){return z(this,d,"m",S).call(this,z(this,d,"m",M).call(this,t.target),t)},L=function(){z(this,g,"f").push(this.rootElement),z(this,w,"f").interact.on(this.rootElement,f.TAP,(t=>{if(z(this,y,"f"))H(this,y,!1,"f");else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];z(this,u,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:z(this,d,"m",O).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:z(this,d,"m",P).call(this,t)})}})),z(this,w,"f").interact.on(this.rootElement,f.DOUBLETAP,(t=>{switch(t.button){case 0:for(let t=0;t<z(this,u,"f").length;t++)clearTimeout(z(this,u,"f")[t]),z(this,w,"f").debug.logMessage(this,"Cleared clickHandler timeout("+z(this,u,"f")[t]+").");H(this,u,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:z(this,d,"m",D).call(this,t)})}})),z(this,w,"f").interact.on(this.rootElement,f.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||(H(this,y,!0,"f"),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:z(this,d,"m",P).call(this,t)}))}))},F=function(t){const e=parseFloat(z(this,x,"f").style.getPropertyValue("--kup_familytree_scale"))||1,i=.05;let r=t.deltaY>0?e-i:e+i;r<i&&(r=i),z(this,x,"f").style.setProperty("--kup_familytree_scale",r.toFixed(2))},R=function(t,e){const i=.01,r=.85*t,a=.95*t;let l=1,s=2e3,n=e;for(;(n<r||n>a)&&s>0&&l>i;)s--,n<r?l+=i:n>a?l-=i:s=0,n=e*l;z(this,x,"f").style.setProperty("--kup_familytree_scale",l.toFixed(2))},X.style=':host{--kup_familytree_item_background_color:var(\n --kup-familytree-item-background-color,\n var(--kup-primary-color)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-on-primary-color)\n );--kup_familytree_item_height:var(--kup-familytree-item-height, 40px);--kup_familytree_item_h_padding:var(--kup-familytree-item-h-padding, 8px);--kup_familytree_item_v_padding:var(--kup-familytree-item-v-padding, 10px);--kup_familytree_item_width:var(--kup-familytree-item-width, 120px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-color)\n );display:block;overflow:hidden}.family-tree{display:flex;transform:scale(var(--kup_familytree_scale, 1));transform-origin:0px 0px}.family-tree__node{border-collapse:collapse;margin:auto}.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) ) ))}.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) )}.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{width:fit-content;margin-left:auto;margin-right:auto}';export{X as kup_family_tree}
|