@sme.up/ketchup 9.5.1 → 9.5.2

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.
Files changed (98) hide show
  1. package/dist/cjs/{f-button-b76723c7.js → f-button-357a3dff.js} +1 -1
  2. package/dist/cjs/{f-cell-0238450e.js → f-cell-1de0ea69.js} +5 -5
  3. package/dist/cjs/{f-chip-aad323a5.js → f-chip-bd5882a0.js} +2 -2
  4. package/dist/cjs/{f-image-a049cb94.js → f-image-30531fd0.js} +1 -1
  5. package/dist/cjs/{f-paginator-utils-3c1c8cf4.js → f-paginator-utils-ad8a4635.js} +2 -2
  6. package/dist/cjs/{f-text-field-d045c000.js → f-text-field-be758970.js} +1 -1
  7. package/dist/cjs/index.cjs.js +1 -1
  8. package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
  9. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +8 -8
  10. package/dist/cjs/kup-box.cjs.entry.js +7 -7
  11. package/dist/cjs/kup-calendar.cjs.entry.js +4 -4
  12. package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
  13. package/dist/cjs/kup-cell.cjs.entry.js +6 -6
  14. package/dist/cjs/kup-dashboard.cjs.entry.js +4 -4
  15. package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
  16. package/dist/cjs/kup-echart.cjs.entry.js +1 -1
  17. package/dist/cjs/kup-family-tree.cjs.entry.js +3 -3
  18. package/dist/cjs/kup-grid.cjs.entry.js +1 -1
  19. package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
  20. package/dist/cjs/kup-image-list.cjs.entry.js +6 -6
  21. package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
  22. package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
  23. package/dist/cjs/{kup-manager-ef4342bb.js → kup-manager-cefb1999.js} +0 -1
  24. package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
  25. package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
  26. package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
  27. package/dist/cjs/kup-planner.cjs.entry.js +2 -2
  28. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  29. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  30. package/dist/cjs/kup-snackbar.cjs.entry.js +3 -3
  31. package/dist/collection/components/kup-card/built-in/kup-card-openai.js +1 -1
  32. package/dist/collection/managers/kup-openai/kup-openai.js +0 -1
  33. package/dist/components/kup-autocomplete2.js +1 -1
  34. package/dist/components/kup-manager.js +0 -1
  35. package/dist/esm/{f-button-e5a13d96.js → f-button-856a189a.js} +1 -1
  36. package/dist/esm/{f-cell-44737d32.js → f-cell-6324d838.js} +5 -5
  37. package/dist/esm/{f-chip-4ba1fb6c.js → f-chip-e15fba8a.js} +2 -2
  38. package/dist/esm/{f-image-17dd7557.js → f-image-26b1bc14.js} +1 -1
  39. package/dist/esm/{f-paginator-utils-c0925f43.js → f-paginator-utils-e8f62783.js} +2 -2
  40. package/dist/esm/{f-text-field-97929753.js → f-text-field-bbe1f236.js} +1 -1
  41. package/dist/esm/index.js +1 -1
  42. package/dist/esm/kup-accordion.entry.js +2 -2
  43. package/dist/esm/kup-autocomplete_27.entry.js +8 -8
  44. package/dist/esm/kup-box.entry.js +7 -7
  45. package/dist/esm/kup-calendar.entry.js +4 -4
  46. package/dist/esm/kup-card-list.entry.js +1 -1
  47. package/dist/esm/kup-cell.entry.js +6 -6
  48. package/dist/esm/kup-dashboard.entry.js +4 -4
  49. package/dist/esm/kup-drawer.entry.js +1 -1
  50. package/dist/esm/kup-echart.entry.js +1 -1
  51. package/dist/esm/kup-family-tree.entry.js +3 -3
  52. package/dist/esm/kup-grid.entry.js +1 -1
  53. package/dist/esm/kup-iframe.entry.js +1 -1
  54. package/dist/esm/kup-image-list.entry.js +6 -6
  55. package/dist/esm/kup-lazy.entry.js +1 -1
  56. package/dist/esm/kup-magic-box.entry.js +2 -2
  57. package/dist/esm/{kup-manager-21e2ce65.js → kup-manager-8d1df189.js} +0 -1
  58. package/dist/esm/kup-nav-bar.entry.js +1 -1
  59. package/dist/esm/kup-numeric-picker.entry.js +2 -2
  60. package/dist/esm/kup-photo-frame.entry.js +1 -1
  61. package/dist/esm/kup-planner.entry.js +2 -2
  62. package/dist/esm/kup-probe.entry.js +1 -1
  63. package/dist/esm/kup-qlik.entry.js +1 -1
  64. package/dist/esm/kup-snackbar.entry.js +3 -3
  65. package/dist/ketchup/index.esm.js +1 -1
  66. package/dist/ketchup/ketchup.esm.js +1 -1
  67. package/dist/ketchup/{p-4dbcd9cf.entry.js → p-07bed934.entry.js} +1 -1
  68. package/dist/ketchup/{p-265c1bac.entry.js → p-0c124f99.entry.js} +1 -1
  69. package/dist/ketchup/{p-4b141cad.entry.js → p-0f6cb6e4.entry.js} +1 -1
  70. package/dist/ketchup/{p-89f09a1c.entry.js → p-177f8008.entry.js} +1 -1
  71. package/dist/ketchup/{p-e50650d0.js → p-269a9af8.js} +1 -1
  72. package/dist/ketchup/p-2ab02da0.entry.js +1 -0
  73. package/dist/ketchup/{p-15c3d2c4.entry.js → p-3f028a71.entry.js} +1 -1
  74. package/dist/ketchup/{p-65984a13.entry.js → p-4a18db68.entry.js} +1 -1
  75. package/dist/ketchup/{p-0bdd3eb4.entry.js → p-4eb6d4e8.entry.js} +1 -1
  76. package/dist/ketchup/{p-9bdc7491.js → p-63031c77.js} +1 -1
  77. package/dist/ketchup/{p-ee382e52.entry.js → p-753f30d8.entry.js} +1 -1
  78. package/dist/ketchup/{p-88efeed0.entry.js → p-8042dcd5.entry.js} +1 -1
  79. package/dist/ketchup/{p-da3b5277.entry.js → p-81c1d557.entry.js} +1 -1
  80. package/dist/ketchup/{p-7e1d9192.js → p-937a322f.js} +1 -1
  81. package/dist/ketchup/{p-de755f71.js → p-9ba8f169.js} +1 -1
  82. package/dist/ketchup/p-a2d3aec9.entry.js +1 -0
  83. package/dist/ketchup/{p-aecf6437.entry.js → p-b115e1ec.entry.js} +1 -1
  84. package/dist/ketchup/{p-9e68a4c0.js → p-b396d0f8.js} +1 -1
  85. package/dist/ketchup/{p-bc0a2875.entry.js → p-c12a9759.entry.js} +1 -1
  86. package/dist/ketchup/{p-6e2a9054.entry.js → p-cadeb53d.entry.js} +1 -1
  87. package/dist/ketchup/{p-859aa987.js → p-caeed3c3.js} +1 -1
  88. package/dist/ketchup/{p-04861e0f.entry.js → p-d300948a.entry.js} +1 -1
  89. package/dist/ketchup/{p-9bf00c9c.js → p-d76cd8d6.js} +1 -1
  90. package/dist/ketchup/{p-ec469a38.entry.js → p-d9a1e5a4.entry.js} +1 -1
  91. package/dist/ketchup/{p-4528e07a.entry.js → p-dc370227.entry.js} +1 -1
  92. package/dist/ketchup/{p-f8069901.entry.js → p-f1cae1e1.entry.js} +1 -1
  93. package/dist/ketchup/{p-9868af74.entry.js → p-f417e794.entry.js} +1 -1
  94. package/dist/ketchup/{p-3172b2d6.entry.js → p-f753c13f.entry.js} +1 -1
  95. package/dist/ketchup/{p-62fe8b61.entry.js → p-f7980061.entry.js} +1 -1
  96. package/package.json +1 -1
  97. package/dist/ketchup/p-00cc3d95.entry.js +0 -1
  98. package/dist/ketchup/p-91180bd4.entry.js +0 -1
@@ -1 +1 @@
1
- import{r,c as a,f as o,h as t,H as n,d as i}from"./p-cd9a4274.js";import{k as s,g as p,s as e}from"./p-7e1d9192.js";import{c as b}from"./p-635bb4b3.js";import"./p-c23731ca.js";const l="nav-bar";var v,u;!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"}(u||(u={}));const c=class{constructor(o){r(this,o),this.kupNavbarReady=a(this,"kup-navbar-ready",6),this.kupNavbarResize=a(this,"kup-navbar-resize",6),this.kupManager=s(),this.customStyle="",this.styling=u.STANDARD}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){e(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:`${l}__section ${l}__section--align-start`},a):null,o.length?t("section",{class:`${l}__section ${l}__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:b},t("header",{class:`${l} ${l}--${this.styling.toLowerCase()} `},t("div",{class:`${l}__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)}};c.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{c as kup_nav_bar}
1
+ import{r,c as a,f as o,h as t,H as n,d as i}from"./p-cd9a4274.js";import{k as s,g as p,s as e}from"./p-937a322f.js";import{c as b}from"./p-635bb4b3.js";import"./p-c23731ca.js";const l="nav-bar";var v,u;!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"}(u||(u={}));const c=class{constructor(o){r(this,o),this.kupNavbarReady=a(this,"kup-navbar-ready",6),this.kupNavbarResize=a(this,"kup-navbar-resize",6),this.kupManager=s(),this.customStyle="",this.styling=u.STANDARD}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){e(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:`${l}__section ${l}__section--align-start`},a):null,o.length?t("section",{class:`${l}__section ${l}__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:b},t("header",{class:`${l} ${l}--${this.styling.toLowerCase()} `},t("div",{class:`${l}__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)}};c.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{c as kup_nav_bar}
@@ -1,4 +1,4 @@
1
- import{r as t,c as n,f as i,h as r,H as e,d as o,g as a}from"./p-cd9a4274.js";import{k as s,g as u,s as l,c as f,d as h,u as c,n as v}from"./p-7e1d9192.js";import{c as d}from"./p-635bb4b3.js";import"./p-c23731ca.js";
1
+ import{r as t,c as n,f as i,h as r,H as e,d as o,g as a}from"./p-cd9a4274.js";import{k as s,g as u,s as l,c as f,d as h,u as c,n as v}from"./p-937a322f.js";import{c as d}from"./p-635bb4b3.js";import"./p-c23731ca.js";
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -1 +1 @@
1
- import{r as t,c as e,f as i,h,H as s,d as a}from"./p-cd9a4274.js";import{k as o,g as n,s as l}from"./p-7e1d9192.js";import{c as p}from"./p-635bb4b3.js";import"./p-c23731ca.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.intObserver=null,this.kupManager=o(),this.lazyComponent=null,this.lazyComponentLoaded=!1,this.isInViewport=!1,this.componentName=null,this.customStyle="",this.data=null,this.renderMode=c.BOTH,this.showPlaceholder=!0}async getProps(t){return 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=h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},h("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":default:e=h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},h("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=h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},h("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=h("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},h("path",{d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":e=h("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},h("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=h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},h("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=h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},h("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=h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},h("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"}))}return this.renderMode===c.VIEWPORT&&this.isInViewport||this.renderMode===c.PROPS&&this.data||this.renderMode===c.BOTH&&this.data&&this.isInViewport?(t=h(this.componentName,Object.assign({},this.data,{ref:t=>this.lazyComponent=t})),i+=" kup-loaded"):this.showPlaceholder&&(t=e,i+=" kup-to-be-loaded"),h(s,{class:i},h("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),h("div",{id:p},t))}disconnectedCallback(){var t;this.kupManager.theme.unregister(this),null===(t=this.intObserver)||void 0===t||t.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_height:var(--kup-lazy-height, 100%);--kup_lazy_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_width:var(--kup-lazy-width, 100%);display:block;height:var(--kup_lazy_height);width:var(--kup_lazy_width);position:relative}#kup-component{align-items:var(--kup_lazy_ver_alignment);display:flex;justify-content:var(--kup_lazy_hor_alignment);height:var(--kup_lazy_height);width:var(--kup_lazy_width)}#kup-component>*{height:var(--kup_lazy_height)}#kup-component kup-data-table{min-width:100%}.kup-loaded,.kup-to-be-loaded{height:var(--kup_lazy_height);width:var(--kup_lazy_width)}svg{fill:var(--kup_lazy_placeholder_color);animation:shine ease var(--kup_lazy_animation_time) infinite}@keyframes shine{0%{opacity:0.4}50%{opacity:0.8}100%{opacity:0.4}}:host(.kup-bottom-aligned){--kup-lazy-ver-alignment:flex-end}:host(.kup-left-aligned){--kup-lazy-hor-alignment:flex-start}:host(.kup-right-aligned){--kup-lazy-hor-alignment:flex-end}:host(.kup-top-aligned){--kup-lazy-ver-alignment:flex-start}:host(.kup-to-be-loaded) #kup-component{position:absolute}:host(.kup-to-be-loaded) #kup-component>*{margin:auto}";export{d as kup_lazy}
1
+ import{r as t,c as e,f as i,h,H as s,d as a}from"./p-cd9a4274.js";import{k as o,g as n,s as l}from"./p-937a322f.js";import{c as p}from"./p-635bb4b3.js";import"./p-c23731ca.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.intObserver=null,this.kupManager=o(),this.lazyComponent=null,this.lazyComponentLoaded=!1,this.isInViewport=!1,this.componentName=null,this.customStyle="",this.data=null,this.renderMode=c.BOTH,this.showPlaceholder=!0}async getProps(t){return 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=h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},h("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":default:e=h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},h("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=h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},h("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=h("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},h("path",{d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":e=h("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},h("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=h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},h("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=h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},h("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=h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},h("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"}))}return this.renderMode===c.VIEWPORT&&this.isInViewport||this.renderMode===c.PROPS&&this.data||this.renderMode===c.BOTH&&this.data&&this.isInViewport?(t=h(this.componentName,Object.assign({},this.data,{ref:t=>this.lazyComponent=t})),i+=" kup-loaded"):this.showPlaceholder&&(t=e,i+=" kup-to-be-loaded"),h(s,{class:i},h("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),h("div",{id:p},t))}disconnectedCallback(){var t;this.kupManager.theme.unregister(this),null===(t=this.intObserver)||void 0===t||t.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_height:var(--kup-lazy-height, 100%);--kup_lazy_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_width:var(--kup-lazy-width, 100%);display:block;height:var(--kup_lazy_height);width:var(--kup_lazy_width);position:relative}#kup-component{align-items:var(--kup_lazy_ver_alignment);display:flex;justify-content:var(--kup_lazy_hor_alignment);height:var(--kup_lazy_height);width:var(--kup_lazy_width)}#kup-component>*{height:var(--kup_lazy_height)}#kup-component kup-data-table{min-width:100%}.kup-loaded,.kup-to-be-loaded{height:var(--kup_lazy_height);width:var(--kup_lazy_width)}svg{fill:var(--kup_lazy_placeholder_color);animation:shine ease var(--kup_lazy_animation_time) infinite}@keyframes shine{0%{opacity:0.4}50%{opacity:0.8}100%{opacity:0.4}}:host(.kup-bottom-aligned){--kup-lazy-ver-alignment:flex-end}:host(.kup-left-aligned){--kup-lazy-hor-alignment:flex-start}:host(.kup-right-aligned){--kup-lazy-hor-alignment:flex-end}:host(.kup-top-aligned){--kup-lazy-ver-alignment:flex-start}:host(.kup-to-be-loaded) #kup-component{position:absolute}:host(.kup-to-be-loaded) #kup-component>*{margin:auto}";export{d as kup_lazy}
@@ -1 +1 @@
1
- import{a6 as e,a7 as s,c as t,a3 as c,a8 as a,F as i,a9 as n,aa as l,ab as o,ac as r,ad as u}from"./p-7e1d9192.js";import{h as p,g as d}from"./p-cd9a4274.js";import{F as k}from"./p-f51dbf68.js";import{F as b}from"./p-de755f71.js";import{F as h}from"./p-9e68a4c0.js";import{F as f,a as m}from"./p-859aa987.js";import{F as g}from"./p-e50650d0.js";var v,w,y;!function(e){e.customStyle="Custom style of the component.",e.data="The data of the list.",e.displayMode="Selects how the items must display their label and how they can be filtered for.",e.filter="Keeps string for filtering elements when filter mode is active",e.hideText="Hides rows' text, ideally to display a list of icons only.",e.isMenu="Defines whether the list is a menu or not.",e.keyboardNavigation="When true, enables items' navigation through arrow keys.",e.menuVisible="Sets the status of the menu, when false it's hidden otherwise it's visible.",e.roleType="Defines the type of selection. Values accepted: listbox, radiogroup or group.",e.selectable="Defines whether items are selectable or not.",e.showIcons="Displays the icons associated to each row when set to true.",e.twoLine="The list elements descriptions will be arranged in two lines."}(v||(v={})),function(e){e.LISTBOX="listbox",e.RADIOGROUP="radiogroup",e.GROUP="group"}(w||(w={})),function(e){e.CODE="code",e.DESCRIPTION="description",e.DESCRIPTION_AND_CODE="both"}(y||(y={}));const j=e=>p("div",Object.assign({class:`f-switch ${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}),p("div",{class:"form-field "+(e.leadingLabel?"form-field--align-end":"")},p("div",{class:`switch ${e.checked?"switch--checked":""} ${e.disabled?"switch--disabled":""}`},p("div",{class:"switch__track"}),p("div",{class:"switch__thumb-underlay"},p("div",{class:"switch__thumb"},p("input",{type:"checkbox",class:"switch__native-control",role:"switch",checked:e.checked,disabled:e.disabled,value:e.checked?"on":"off",onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus})))),p("label",{onClick:e.onChange},e.label))),$=e=>{e.centeredLabel||0==!e.centeredLabel||(e.centeredLabel=!0);let s,t=`f-progress-bar ${e.danger?"kup-danger":""} ${e.animated?"kup-animated":""} ${e.padded?"kup-padded":""} ${e.info?"kup-info":""} ${e.slim?"kup-slim":""} ${e.striped?"kup-striped":""} ${e.secondary?"kup-secondary":""} ${e.slim?"kup-slim":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`,c="pie";t+=e.isRadial?" pie-wrapper is-radial":" progress-bar";const a={width:`${e.value}%`};e.centeredLabel?e.value>49&&(t+=" text-color-on-primary"):(s=a,e.value>2&&(t+=" text-color-on-primary"));let i=null;return e.icon?i=function(e){if(e.icon){if(e.icon.indexOf(".")>-1||e.icon.indexOf("/")>-1||e.icon.indexOf("\\")>-1)return p("span",{class:"label kup-icon is-image"},p("img",{src:e.icon}));{let s=`url('${d(`./assets/svg/${e.icon}.svg`)}') no-repeat center`;return p("span",{style:{mask:s,webkitMask:s},class:"label kup-icon"})}}}(e):e.hideLabel||(i=e.isRadial?e.label?p("span",{class:"label"},e.label):p("span",{class:"label"},e.value,p("span",{class:"smaller"},"%")):e.label?e.label:e.value+"%"),e.value>0&&(c+=" has-value",c+=e.value>50?" is-more-than-half":" is-less-than-half"),e.isRadial?p("div",{class:t},i,p("div",{class:c},p("div",{style:undefined,class:"left-side half-circle"}),p("div",{class:"right-side half-circle"})),p("div",{class:"shadow"})):p("div",{class:t},p("div",{class:"progress-bar-percentage",style:a},p("span",{style:s},i)))},x=e=>{var s;const t=!!e.columns,c=[];for(let t=0;t<(null===(s=e.data)||void 0===s?void 0:s.length);t++){const s=e.data[t];c.push(p("div",{class:"form-field "+(e.leadingLabel?" form-field--align-end":"")},p("div",{class:{radio:!0,"radio--checked":!!s.checked,"radio--disabled":!!e.disabled}},p("input",{class:"radio__native-control",type:"radio",name:"radio-element",value:s.value,checked:s.checked,disabled:e.disabled,onBlur:e.onBlur,onChange:e.onChange?e.onChange.bind(e.onChange,t):null,onFocus:e.onFocus}),p("div",{class:"radio__background"},p("div",{class:"radio__outer-circle"}),p("div",{class:"radio__inner-circle"}))),p("label",{htmlFor:"radio-element",onClick:e.onChange?e.onChange.bind(e.onChange,t):null},s.label?s.label:"")))}return p("div",{class:`f-radio radio-wrapper ${t?"radio-wrapper-grid":""} ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`,style:{"--kup_radio_columns":t?`repeat(${e.columns}, 1fr)`:""}},c)},O=e=>(e.maxValue||(e.maxValue=5),p("div",{class:`f-rating ${e.disabled?"disabled":""} ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},function(e){const s=[];for(let t=1;t<=e.maxValue;t++)s.push(p("span",{class:"rating",onClick:e.onClick?e.onClick.bind(e.onClick,t):null},t<=e.value?"★":"☆"));return s}(e))),_=document.documentElement,C=(n,o)=>{const d=n.cell,v=n.column,w=n.row,C=n.shape?n.shape:d.shape?d.shape:v.shape?v.shape:null,D=!_.ketchup.objects.isEmptyKupObj(d.obj),K=!(!d.isEditable&&!v.isEditable||!n.editable),M=n.previousValue!==d.value?d.value:"",V=_.ketchup.data.cell.getType(d,C),H=Object.assign({},d.data);let T=d.cssClass?d.cssClass:v.cssClass?v.cssClass:"";const X={"f-cell":!0,[l.OBJ]:!!D,[V+"-cell"]:!0,[n.wrapperClass]:!!n.wrapperClass,[n.density]:!(!n.density||V===c.BAR),[T]:!!T};let W=M;K&&e.includes(V)?W=function(e,s,t,a,n){switch(e){case c.AUTOCOMPLETE:return p("kup-autocomplete",Object.assign({key:a.name+n.row.id,initialValue:t.value},t.data,{class:z(n)?"kup-full-width":"","onkup-autocomplete-change":s=>I(s,n,e,u.UPDATE),"onkup-autocomplete-input":s=>I(s,n,e,u.INPUT),"onkup-autocomplete-iconclick":s=>I(s,n,e,u.ICON_CLICK)}));case c.CHECKBOX:return F(n)&&(s[l.C_CENTERED]=!0),t.shape===i.INPUT_CHECKBOX?p("input",{checked:"on"===t.value||"1"===t.value,class:"input-checkbox",onChange:s=>I(s,n,e,u.UPDATE),type:"checkbox"}):p(k,Object.assign({},t.data,{onChange:s=>I(s,n,e,u.UPDATE)}));case c.CHIP:return p("kup-chip",Object.assign({},t.data,{type:f.INPUT,enableInput:!0,"onKup-chip-change":s=>I(s,n,e,u.UPDATE)}),p("kup-text-field",Object.assign({fullWidth:!0,slot:"field"},t.slotData)));case c.COLOR_PICKER:return p("kup-color-picker",Object.assign({key:a.name+n.row.id,initialValue:t.value},t.data,{class:z(n)?"kup-full-width":"",disabled:!1,"onkup-colorpicker-change":s=>I(s,n,e,u.UPDATE)}));case c.COMBOBOX:return p("kup-combobox",Object.assign({key:a.name+n.row.id,initialValue:t.value},t.data,{class:z(n)?"kup-full-width":"","onkup-combobox-change":s=>I(s,n,e,u.UPDATE),"onkup-combobox-input":s=>I(s,n,e,u.INPUT),"onkup-combobox-iconclick":s=>I(s,n,e,u.ICON_CLICK)}));case c.DATE:return p("kup-date-picker",Object.assign({key:a.name+n.row.id,initialValue:t.value},t.data,{class:z(n)?"kup-full-width":"","onkup-datepicker-change":s=>I(s,n,e,u.UPDATE),"onkup-datepicker-input":s=>I(s,n,e,u.INPUT)}));case c.MULTI_AUTOCOMPLETE:return p("kup-chip",Object.assign({displayId:!0},t.data,{type:f.INPUT,enableInput:!0,"onKup-chip-change":s=>I(s,n,e,u.UPDATE)}),p("kup-autocomplete",Object.assign({class:"kup-full-width",slot:"field",displayMode:y.DESCRIPTION_AND_CODE,selectMode:y.DESCRIPTION_AND_CODE,"onkup-autocomplete-input":s=>I(s,n,e,u.INPUT),"onkup-autocomplete-iconclick":s=>I(s,n,e,u.ICON_CLICK),showDropDownIcon:!1},t.slotData)));case c.MULTI_COMBOBOX:return p("kup-chip",Object.assign({displayId:!0},t.data,{type:f.INPUT,enableInput:!0,"onKup-chip-change":s=>I(s,n,e,u.UPDATE)}),p("kup-combobox",Object.assign({class:"kup-full-width",slot:"field",displayMode:y.DESCRIPTION_AND_CODE,selectMode:y.DESCRIPTION_AND_CODE,"onkup-combobox-input":s=>I(s,n,e,u.INPUT),"onkup-combobox-iconclick":s=>I(s,n,e,u.ICON_CLICK)},t.slotData)));case c.RATING:return p("kup-rating",Object.assign({key:a.name+n.row.id},t.data,{disabled:!1,"onkup-rating-click":s=>I(s,n,e,u.UPDATE)}));case c.SWITCH:return p(j,Object.assign({},t.data,{disabled:!1,onChange:s=>I(s,n,e,u.UPDATE)}));case c.TIME:return p("kup-time-picker",Object.assign({key:a.name+n.row.id,initialValue:t.value},t.data,{class:z(n)?"kup-full-width":"","onkup-timepicker-change":s=>I(s,n,e,u.UPDATE),"onkup-timepicker-input":s=>I(s,n,e,u.INPUT)}));case c.NUMBER:s[l.C_RIGHT_ALIGNED]=!0;case c.LINK:case c.STRING:const o=s=>I(s,n,e,u.UPDATE),r=s=>I(s,n,e,u.INPUT),d=e===c.NUMBER?"number":null,h=e===c.NUMBER&&t.value?_.ketchup.math.numberifySafe(t.value).toString():t.value;return t.shape===i.INPUT_FIELD?p("input",{class:"input-field",onChange:o,onInput:r,type:d,value:h}):p(b,Object.assign({inputType:d,fullWidth:!!z(n)},t.data,{icon:t.data&&t.data.icon?t.data.icon:t.icon?t.icon:a.icon?a.icon:null,value:h,onChange:o,onInput:r,onIconClick:s=>I(s,n,e,u.ICON_CLICK)}))}}(V,X,d,v,n):d.data&&s.includes(V)?(n.setSizes&&function(e,s,t){switch(e){case c.BAR:s.sizeY||(s.sizeY="26px");break;case c.BUTTON:let e="";s.label&&(e="36px"),t.style?t.style.height||(t.style.minHeight=e):t.style={minHeight:e};break;case c.CHART:s.sizeX||(s.sizeX="100%"),s.sizeY||(s.sizeY="100%");break;case c.CHIP:case c.RADIO:t.style?t.style.height||(t.style.minHeight="40px"):t.style={minHeight:"40px"}}}(V,H,d),W=n.renderKup?function(e,s,t,a,i,n,o){switch(e){case c.BAR:return t.data?p("div",{style:{height:t.sizeY,width:"100%"}},p(h,Object.assign({},t))):p("kup-image",Object.assign({key:n.name+o.row.id,sizeX:"250px"},t));case c.BUTTON:return F(o)&&(s[l.C_CENTERED]=!0),p(g,Object.assign({},t,{onClick:s=>I(s,o,e,u.CLICK)}));case c.BUTTON_LIST:return F(o)&&(s[l.C_CENTERED]=!0),t["data-storage"]={cell:a,row:i,column:n},p("kup-button-list",Object.assign({key:n.name+o.row.id},t));case c.CHART:return F(o)&&(s[l.C_CENTERED]=!0),p("kup-chart",Object.assign({key:n.name+o.row.id},t));case c.MULTI_AUTOCOMPLETE:case c.MULTI_COMBOBOX:case c.CHIP:return p(m,Object.assign({},t));case c.COLOR_PICKER:return p("kup-color-picker",Object.assign({key:n.name+o.row.id},t,{class:z(o)?"kup-full-width":"",disabled:!0}));case c.GAUGE:return p("kup-gauge",Object.assign({key:n.name+o.row.id,value:_.ketchup.math.numberifySafe(a.value),"width-component":"280px"},t));case c.KNOB:case c.PROGRESS_BAR:return t.customStyle?p("kup-progress-bar",Object.assign({key:n.name+o.row.id},t)):p($,Object.assign({},t));case c.RADIO:return F(o)&&(s[l.C_CENTERED]=!0),t.disabled=i.readOnly,p(x,Object.assign({},t));case c.RATING:return p(O,Object.assign({},t,{disabled:!0}))}}(V,X,H,d,w,v,n):p("span",{class:"cell-"+V+" placeholder"})):(n.setSizes&&function(e,s,t,i){switch(e){case c.CHECKBOX:case c.ICON:s.sizeX||(s.sizeX="18px"),s.sizeY||(s.sizeY="18px"),t.style?t.style.height||(t.style.minHeight=s.sizeY):t.style={minHeight:s.sizeY};break;case c.IMAGE:i.component.rootElement.tagName===a.BOX?(s.sizeY||(s.sizeY="auto"),void 0===s.fit&&(s.fit=!0)):s.sizeX||(s.sizeX="auto"),s.sizeY||(s.sizeY="64px")}}(V,H,d,n),W=function(e,s,t,a,i,n,o){switch(e){case c.AUTOCOMPLETE:case c.COMBOBOX:case c.DATE:case c.DATETIME:case c.TIME:if(t&&""!=t){const e=r(n,i);return p("div",{class:"f-cell__text"},e)}return t;case c.CHECKBOX:return F(o)&&(a[l.C_CENTERED]=!0),p(h,{resource:s.checked?"check_box":"check_box_outline_blank",sizeX:"18px",sizeY:"18px"});case c.EDITOR:return p("div",{innerHTML:i.value});case c.ICON:case c.IMAGE:return F(o)&&(a[l.C_CENTERED]=!0),s.badgeData&&(a[l.C_PADDED]=!0),p(h,Object.assign({},s));case c.LINK:return p("a",{href:t,target:"_blank"},i.value);case c.NUMBER:if(t&&""!=t){const e=_.ketchup.math.numberifySafe(i.value),s=r(n,i);return e<0&&(a[l.TEXT_DANGER]=!0),F(o)&&(a[l.C_RIGHT_ALIGNED]=!0),p("div",{class:"f-cell__text"},s)}return p("div",{class:"f-cell__text"},t);case c.SWITCH:return F(o)&&(a[l.C_CENTERED]=!0),s.disabled=!0,p(j,Object.assign({},s));default:return p("div",{class:"f-cell__text"},t)}}(V,H,W,X,d,v,n));let Y=null;!K&&(v.icon||d.icon)&&W&&(Y=p(h,Object.assign({},{color:`rgba(var(${t.TEXT}-rgb), 0.375)`,resource:d.icon?d.icon:v.icon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"obj-icon"})));let B=null;_.ketchup.debug.isDebug()&&D?B=d.obj.t+"; "+d.obj.p+"; "+d.obj.k+";":null!=d.title&&""!=d.title.trim()&&(B=d.title);let S=null;if(d.info){const e=Object.assign({},d.info);e.color||(e.color=`var(${t.INFO})`),e.icon||(e.icon="info"),S=p(h,Object.assign({},{color:e.color,resource:e.icon,sizeX:"1.25em",sizeY:"1.25em",title:e.message?e.message:"",wrapperClass:"cell-info"}))}return p("div",{onKeyUp:e=>I(e,n,V,u.KEYUP),class:X,"kup-get-cell-props":()=>n,ref:e=>d.element=e,style:d.style},p("div",{class:"f-cell__content",style:d.styleContent,title:B},o&&o.length>0?o:[n.indents,S,Y,W]))};function I(e,s,t,a){const i=s.cell,n=s.column,l=s.component,o=s.row;let p=function(e,s){const t=!("INPUT"!==e.target.tagName);let a=t?e.target.value:e.detail.value;return s===c.CHECKBOX&&t&&(a=e.target.checked?"off":"on"),s===c.NUMBER&&t&&(a=_.ketchup.math.formattedStringToNumberString(a,"")),a}(e,t);if(a===u.UPDATE){switch(t){case c.AUTOCOMPLETE:case c.COMBOBOX:case c.DATE:case c.TIME:i.data&&(i.data.initialValue=p);break;case c.CHECKBOX:case c.SWITCH:p="on"===p?"0":"1",i.data&&(i.data.checked="0"!==p);break;case c.CHIP:case c.MULTI_AUTOCOMPLETE:case c.MULTI_COMBOBOX:p=e.detail.stringifiedValues,i.data&&(i.data.data=e.detail.comp.data)}i.obj&&(i.obj.k=p.toString()),i.value=p.toString(),i.displayedValue=null,i.displayedValue=r(n,i)}if(l&&l.rootElement){const s=new CustomEvent(a,{bubbles:!0,cancelable:!0,composed:!0,detail:{comp:l,id:l.rootElement.id,cell:i,column:n,event:e,row:o,type:t}});if(l.rootElement.dispatchEvent(s),a===u.UPDATE)try{l.refresh()}catch(e){}}}function F(e){var s;return o.includes(null===(s=e.component)||void 0===s?void 0:s.rootElement.tagName)}function z(e){var s;return n.includes(null===(s=e.component)||void 0===s?void 0:s.rootElement.tagName)}export{C as F,y as I,w as K,v as a,$ as b,x as c,O as d,j as e}
1
+ import{a6 as e,a7 as s,c as t,a3 as c,a8 as a,F as i,a9 as n,aa as l,ab as o,ac as r,ad as u}from"./p-937a322f.js";import{h as p,g as d}from"./p-cd9a4274.js";import{F as k}from"./p-f51dbf68.js";import{F as b}from"./p-9ba8f169.js";import{F as h}from"./p-b396d0f8.js";import{F as f,a as m}from"./p-caeed3c3.js";import{F as g}from"./p-269a9af8.js";var v,w,y;!function(e){e.customStyle="Custom style of the component.",e.data="The data of the list.",e.displayMode="Selects how the items must display their label and how they can be filtered for.",e.filter="Keeps string for filtering elements when filter mode is active",e.hideText="Hides rows' text, ideally to display a list of icons only.",e.isMenu="Defines whether the list is a menu or not.",e.keyboardNavigation="When true, enables items' navigation through arrow keys.",e.menuVisible="Sets the status of the menu, when false it's hidden otherwise it's visible.",e.roleType="Defines the type of selection. Values accepted: listbox, radiogroup or group.",e.selectable="Defines whether items are selectable or not.",e.showIcons="Displays the icons associated to each row when set to true.",e.twoLine="The list elements descriptions will be arranged in two lines."}(v||(v={})),function(e){e.LISTBOX="listbox",e.RADIOGROUP="radiogroup",e.GROUP="group"}(w||(w={})),function(e){e.CODE="code",e.DESCRIPTION="description",e.DESCRIPTION_AND_CODE="both"}(y||(y={}));const j=e=>p("div",Object.assign({class:`f-switch ${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}),p("div",{class:"form-field "+(e.leadingLabel?"form-field--align-end":"")},p("div",{class:`switch ${e.checked?"switch--checked":""} ${e.disabled?"switch--disabled":""}`},p("div",{class:"switch__track"}),p("div",{class:"switch__thumb-underlay"},p("div",{class:"switch__thumb"},p("input",{type:"checkbox",class:"switch__native-control",role:"switch",checked:e.checked,disabled:e.disabled,value:e.checked?"on":"off",onBlur:e.onBlur,onChange:e.onChange,onFocus:e.onFocus})))),p("label",{onClick:e.onChange},e.label))),$=e=>{e.centeredLabel||0==!e.centeredLabel||(e.centeredLabel=!0);let s,t=`f-progress-bar ${e.danger?"kup-danger":""} ${e.animated?"kup-animated":""} ${e.padded?"kup-padded":""} ${e.info?"kup-info":""} ${e.slim?"kup-slim":""} ${e.striped?"kup-striped":""} ${e.secondary?"kup-secondary":""} ${e.slim?"kup-slim":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`,c="pie";t+=e.isRadial?" pie-wrapper is-radial":" progress-bar";const a={width:`${e.value}%`};e.centeredLabel?e.value>49&&(t+=" text-color-on-primary"):(s=a,e.value>2&&(t+=" text-color-on-primary"));let i=null;return e.icon?i=function(e){if(e.icon){if(e.icon.indexOf(".")>-1||e.icon.indexOf("/")>-1||e.icon.indexOf("\\")>-1)return p("span",{class:"label kup-icon is-image"},p("img",{src:e.icon}));{let s=`url('${d(`./assets/svg/${e.icon}.svg`)}') no-repeat center`;return p("span",{style:{mask:s,webkitMask:s},class:"label kup-icon"})}}}(e):e.hideLabel||(i=e.isRadial?e.label?p("span",{class:"label"},e.label):p("span",{class:"label"},e.value,p("span",{class:"smaller"},"%")):e.label?e.label:e.value+"%"),e.value>0&&(c+=" has-value",c+=e.value>50?" is-more-than-half":" is-less-than-half"),e.isRadial?p("div",{class:t},i,p("div",{class:c},p("div",{style:undefined,class:"left-side half-circle"}),p("div",{class:"right-side half-circle"})),p("div",{class:"shadow"})):p("div",{class:t},p("div",{class:"progress-bar-percentage",style:a},p("span",{style:s},i)))},x=e=>{var s;const t=!!e.columns,c=[];for(let t=0;t<(null===(s=e.data)||void 0===s?void 0:s.length);t++){const s=e.data[t];c.push(p("div",{class:"form-field "+(e.leadingLabel?" form-field--align-end":"")},p("div",{class:{radio:!0,"radio--checked":!!s.checked,"radio--disabled":!!e.disabled}},p("input",{class:"radio__native-control",type:"radio",name:"radio-element",value:s.value,checked:s.checked,disabled:e.disabled,onBlur:e.onBlur,onChange:e.onChange?e.onChange.bind(e.onChange,t):null,onFocus:e.onFocus}),p("div",{class:"radio__background"},p("div",{class:"radio__outer-circle"}),p("div",{class:"radio__inner-circle"}))),p("label",{htmlFor:"radio-element",onClick:e.onChange?e.onChange.bind(e.onChange,t):null},s.label?s.label:"")))}return p("div",{class:`f-radio radio-wrapper ${t?"radio-wrapper-grid":""} ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`,style:{"--kup_radio_columns":t?`repeat(${e.columns}, 1fr)`:""}},c)},O=e=>(e.maxValue||(e.maxValue=5),p("div",{class:`f-rating ${e.disabled?"disabled":""} ${e.danger?"kup-danger":""} ${e.info?"kup-info":""} ${e.secondary?"kup-secondary":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},function(e){const s=[];for(let t=1;t<=e.maxValue;t++)s.push(p("span",{class:"rating",onClick:e.onClick?e.onClick.bind(e.onClick,t):null},t<=e.value?"★":"☆"));return s}(e))),_=document.documentElement,C=(n,o)=>{const d=n.cell,v=n.column,w=n.row,C=n.shape?n.shape:d.shape?d.shape:v.shape?v.shape:null,D=!_.ketchup.objects.isEmptyKupObj(d.obj),K=!(!d.isEditable&&!v.isEditable||!n.editable),M=n.previousValue!==d.value?d.value:"",V=_.ketchup.data.cell.getType(d,C),H=Object.assign({},d.data);let T=d.cssClass?d.cssClass:v.cssClass?v.cssClass:"";const X={"f-cell":!0,[l.OBJ]:!!D,[V+"-cell"]:!0,[n.wrapperClass]:!!n.wrapperClass,[n.density]:!(!n.density||V===c.BAR),[T]:!!T};let W=M;K&&e.includes(V)?W=function(e,s,t,a,n){switch(e){case c.AUTOCOMPLETE:return p("kup-autocomplete",Object.assign({key:a.name+n.row.id,initialValue:t.value},t.data,{class:z(n)?"kup-full-width":"","onkup-autocomplete-change":s=>I(s,n,e,u.UPDATE),"onkup-autocomplete-input":s=>I(s,n,e,u.INPUT),"onkup-autocomplete-iconclick":s=>I(s,n,e,u.ICON_CLICK)}));case c.CHECKBOX:return F(n)&&(s[l.C_CENTERED]=!0),t.shape===i.INPUT_CHECKBOX?p("input",{checked:"on"===t.value||"1"===t.value,class:"input-checkbox",onChange:s=>I(s,n,e,u.UPDATE),type:"checkbox"}):p(k,Object.assign({},t.data,{onChange:s=>I(s,n,e,u.UPDATE)}));case c.CHIP:return p("kup-chip",Object.assign({},t.data,{type:f.INPUT,enableInput:!0,"onKup-chip-change":s=>I(s,n,e,u.UPDATE)}),p("kup-text-field",Object.assign({fullWidth:!0,slot:"field"},t.slotData)));case c.COLOR_PICKER:return p("kup-color-picker",Object.assign({key:a.name+n.row.id,initialValue:t.value},t.data,{class:z(n)?"kup-full-width":"",disabled:!1,"onkup-colorpicker-change":s=>I(s,n,e,u.UPDATE)}));case c.COMBOBOX:return p("kup-combobox",Object.assign({key:a.name+n.row.id,initialValue:t.value},t.data,{class:z(n)?"kup-full-width":"","onkup-combobox-change":s=>I(s,n,e,u.UPDATE),"onkup-combobox-input":s=>I(s,n,e,u.INPUT),"onkup-combobox-iconclick":s=>I(s,n,e,u.ICON_CLICK)}));case c.DATE:return p("kup-date-picker",Object.assign({key:a.name+n.row.id,initialValue:t.value},t.data,{class:z(n)?"kup-full-width":"","onkup-datepicker-change":s=>I(s,n,e,u.UPDATE),"onkup-datepicker-input":s=>I(s,n,e,u.INPUT)}));case c.MULTI_AUTOCOMPLETE:return p("kup-chip",Object.assign({displayId:!0},t.data,{type:f.INPUT,enableInput:!0,"onKup-chip-change":s=>I(s,n,e,u.UPDATE)}),p("kup-autocomplete",Object.assign({class:"kup-full-width",slot:"field",displayMode:y.DESCRIPTION_AND_CODE,selectMode:y.DESCRIPTION_AND_CODE,"onkup-autocomplete-input":s=>I(s,n,e,u.INPUT),"onkup-autocomplete-iconclick":s=>I(s,n,e,u.ICON_CLICK),showDropDownIcon:!1},t.slotData)));case c.MULTI_COMBOBOX:return p("kup-chip",Object.assign({displayId:!0},t.data,{type:f.INPUT,enableInput:!0,"onKup-chip-change":s=>I(s,n,e,u.UPDATE)}),p("kup-combobox",Object.assign({class:"kup-full-width",slot:"field",displayMode:y.DESCRIPTION_AND_CODE,selectMode:y.DESCRIPTION_AND_CODE,"onkup-combobox-input":s=>I(s,n,e,u.INPUT),"onkup-combobox-iconclick":s=>I(s,n,e,u.ICON_CLICK)},t.slotData)));case c.RATING:return p("kup-rating",Object.assign({key:a.name+n.row.id},t.data,{disabled:!1,"onkup-rating-click":s=>I(s,n,e,u.UPDATE)}));case c.SWITCH:return p(j,Object.assign({},t.data,{disabled:!1,onChange:s=>I(s,n,e,u.UPDATE)}));case c.TIME:return p("kup-time-picker",Object.assign({key:a.name+n.row.id,initialValue:t.value},t.data,{class:z(n)?"kup-full-width":"","onkup-timepicker-change":s=>I(s,n,e,u.UPDATE),"onkup-timepicker-input":s=>I(s,n,e,u.INPUT)}));case c.NUMBER:s[l.C_RIGHT_ALIGNED]=!0;case c.LINK:case c.STRING:const o=s=>I(s,n,e,u.UPDATE),r=s=>I(s,n,e,u.INPUT),d=e===c.NUMBER?"number":null,h=e===c.NUMBER&&t.value?_.ketchup.math.numberifySafe(t.value).toString():t.value;return t.shape===i.INPUT_FIELD?p("input",{class:"input-field",onChange:o,onInput:r,type:d,value:h}):p(b,Object.assign({inputType:d,fullWidth:!!z(n)},t.data,{icon:t.data&&t.data.icon?t.data.icon:t.icon?t.icon:a.icon?a.icon:null,value:h,onChange:o,onInput:r,onIconClick:s=>I(s,n,e,u.ICON_CLICK)}))}}(V,X,d,v,n):d.data&&s.includes(V)?(n.setSizes&&function(e,s,t){switch(e){case c.BAR:s.sizeY||(s.sizeY="26px");break;case c.BUTTON:let e="";s.label&&(e="36px"),t.style?t.style.height||(t.style.minHeight=e):t.style={minHeight:e};break;case c.CHART:s.sizeX||(s.sizeX="100%"),s.sizeY||(s.sizeY="100%");break;case c.CHIP:case c.RADIO:t.style?t.style.height||(t.style.minHeight="40px"):t.style={minHeight:"40px"}}}(V,H,d),W=n.renderKup?function(e,s,t,a,i,n,o){switch(e){case c.BAR:return t.data?p("div",{style:{height:t.sizeY,width:"100%"}},p(h,Object.assign({},t))):p("kup-image",Object.assign({key:n.name+o.row.id,sizeX:"250px"},t));case c.BUTTON:return F(o)&&(s[l.C_CENTERED]=!0),p(g,Object.assign({},t,{onClick:s=>I(s,o,e,u.CLICK)}));case c.BUTTON_LIST:return F(o)&&(s[l.C_CENTERED]=!0),t["data-storage"]={cell:a,row:i,column:n},p("kup-button-list",Object.assign({key:n.name+o.row.id},t));case c.CHART:return F(o)&&(s[l.C_CENTERED]=!0),p("kup-chart",Object.assign({key:n.name+o.row.id},t));case c.MULTI_AUTOCOMPLETE:case c.MULTI_COMBOBOX:case c.CHIP:return p(m,Object.assign({},t));case c.COLOR_PICKER:return p("kup-color-picker",Object.assign({key:n.name+o.row.id},t,{class:z(o)?"kup-full-width":"",disabled:!0}));case c.GAUGE:return p("kup-gauge",Object.assign({key:n.name+o.row.id,value:_.ketchup.math.numberifySafe(a.value),"width-component":"280px"},t));case c.KNOB:case c.PROGRESS_BAR:return t.customStyle?p("kup-progress-bar",Object.assign({key:n.name+o.row.id},t)):p($,Object.assign({},t));case c.RADIO:return F(o)&&(s[l.C_CENTERED]=!0),t.disabled=i.readOnly,p(x,Object.assign({},t));case c.RATING:return p(O,Object.assign({},t,{disabled:!0}))}}(V,X,H,d,w,v,n):p("span",{class:"cell-"+V+" placeholder"})):(n.setSizes&&function(e,s,t,i){switch(e){case c.CHECKBOX:case c.ICON:s.sizeX||(s.sizeX="18px"),s.sizeY||(s.sizeY="18px"),t.style?t.style.height||(t.style.minHeight=s.sizeY):t.style={minHeight:s.sizeY};break;case c.IMAGE:i.component.rootElement.tagName===a.BOX?(s.sizeY||(s.sizeY="auto"),void 0===s.fit&&(s.fit=!0)):s.sizeX||(s.sizeX="auto"),s.sizeY||(s.sizeY="64px")}}(V,H,d,n),W=function(e,s,t,a,i,n,o){switch(e){case c.AUTOCOMPLETE:case c.COMBOBOX:case c.DATE:case c.DATETIME:case c.TIME:if(t&&""!=t){const e=r(n,i);return p("div",{class:"f-cell__text"},e)}return t;case c.CHECKBOX:return F(o)&&(a[l.C_CENTERED]=!0),p(h,{resource:s.checked?"check_box":"check_box_outline_blank",sizeX:"18px",sizeY:"18px"});case c.EDITOR:return p("div",{innerHTML:i.value});case c.ICON:case c.IMAGE:return F(o)&&(a[l.C_CENTERED]=!0),s.badgeData&&(a[l.C_PADDED]=!0),p(h,Object.assign({},s));case c.LINK:return p("a",{href:t,target:"_blank"},i.value);case c.NUMBER:if(t&&""!=t){const e=_.ketchup.math.numberifySafe(i.value),s=r(n,i);return e<0&&(a[l.TEXT_DANGER]=!0),F(o)&&(a[l.C_RIGHT_ALIGNED]=!0),p("div",{class:"f-cell__text"},s)}return p("div",{class:"f-cell__text"},t);case c.SWITCH:return F(o)&&(a[l.C_CENTERED]=!0),s.disabled=!0,p(j,Object.assign({},s));default:return p("div",{class:"f-cell__text"},t)}}(V,H,W,X,d,v,n));let Y=null;!K&&(v.icon||d.icon)&&W&&(Y=p(h,Object.assign({},{color:`rgba(var(${t.TEXT}-rgb), 0.375)`,resource:d.icon?d.icon:v.icon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"obj-icon"})));let B=null;_.ketchup.debug.isDebug()&&D?B=d.obj.t+"; "+d.obj.p+"; "+d.obj.k+";":null!=d.title&&""!=d.title.trim()&&(B=d.title);let S=null;if(d.info){const e=Object.assign({},d.info);e.color||(e.color=`var(${t.INFO})`),e.icon||(e.icon="info"),S=p(h,Object.assign({},{color:e.color,resource:e.icon,sizeX:"1.25em",sizeY:"1.25em",title:e.message?e.message:"",wrapperClass:"cell-info"}))}return p("div",{onKeyUp:e=>I(e,n,V,u.KEYUP),class:X,"kup-get-cell-props":()=>n,ref:e=>d.element=e,style:d.style},p("div",{class:"f-cell__content",style:d.styleContent,title:B},o&&o.length>0?o:[n.indents,S,Y,W]))};function I(e,s,t,a){const i=s.cell,n=s.column,l=s.component,o=s.row;let p=function(e,s){const t=!("INPUT"!==e.target.tagName);let a=t?e.target.value:e.detail.value;return s===c.CHECKBOX&&t&&(a=e.target.checked?"off":"on"),s===c.NUMBER&&t&&(a=_.ketchup.math.formattedStringToNumberString(a,"")),a}(e,t);if(a===u.UPDATE){switch(t){case c.AUTOCOMPLETE:case c.COMBOBOX:case c.DATE:case c.TIME:i.data&&(i.data.initialValue=p);break;case c.CHECKBOX:case c.SWITCH:p="on"===p?"0":"1",i.data&&(i.data.checked="0"!==p);break;case c.CHIP:case c.MULTI_AUTOCOMPLETE:case c.MULTI_COMBOBOX:p=e.detail.stringifiedValues,i.data&&(i.data.data=e.detail.comp.data)}i.obj&&(i.obj.k=p.toString()),i.value=p.toString(),i.displayedValue=null,i.displayedValue=r(n,i)}if(l&&l.rootElement){const s=new CustomEvent(a,{bubbles:!0,cancelable:!0,composed:!0,detail:{comp:l,id:l.rootElement.id,cell:i,column:n,event:e,row:o,type:t}});if(l.rootElement.dispatchEvent(s),a===u.UPDATE)try{l.refresh()}catch(e){}}}function F(e){var s;return o.includes(null===(s=e.component)||void 0===s?void 0:s.rootElement.tagName)}function z(e){var s;return n.includes(null===(s=e.component)||void 0===s?void 0:s.rootElement.tagName)}export{C as F,y as I,w as K,v as a,$ as b,x as c,O as d,j as e}
@@ -1 +1 @@
1
- import{r as t,f as i,h as s,H as e,d as o}from"./p-cd9a4274.js";import{k as a,g as c,s as n,l as r,d as h,ai as l,N as u,aj as p,U as d,c as b}from"./p-7e1d9192.js";import{F as m}from"./p-c634eb82.js";import{F as k}from"./p-9e68a4c0.js";import{c as g}from"./p-635bb4b3.js";import"./p-c23731ca.js";var f,x;!function(t){t.customStyle="Custom style of the component.",t.data="Sets the data that will be used to display different components."}(f||(f={})),function(t){t.BOX="Box",t.BUTTON_LIST="Button List",t.CHART="Chart",t.CHIP="Chip",t.ECHART="Echart",t.DATATABLE="Datatable",t.JSON="JSON",t.TREE="Tree"}(x||(x={}));const y=class{constructor(i){t(this,i),this.dragHandler=null,this.kupManager=a(),this.textArea=null,this.wrapperRef=null,this.display=x.DATATABLE,this.customStyle="",this.data=null}async getProps(t){return c(this,f,t)}async refresh(){i(this)}async setProps(t){n(this,f,t)}comboboxProps(){const t=[];for(const i in x)Object.prototype.hasOwnProperty.call(x,i)&&t.push({id:x[i],selected:!1,value:x[i]});return{data:{"kup-list":{data:t,id:"kup-debug-theme-changer-list"},"kup-text-field":{emitSubmitEventOnEnter:!1,inputType:"text",label:this.kupManager.language.translate(r.VIEW_AS)}},id:"comp-switcher",initialValue:this.display,isSelect:!0,"onKup-combobox-itemclick":t=>{this.display=t.detail.value}}}setContent(){const t=!!(this.data&&this.data.columns&&this.data.columns.length>0),i=[],e={};if(this.display===x.JSON)e.initialValue=this.data?JSON.stringify(this.data,null,2):"",e.textArea=!0,i.push(s("kup-text-field",Object.assign({class:"kup-full-width kup-full-height"},e,{ref:t=>this.textArea=t,"onkup-textfield-input":t=>{try{this.data=JSON.parse(t.detail.value)}catch(t){this.data={columns:[{name:"ERROR",title:"Error"}],rows:[{cells:{ERROR:{value:"Invalid JSON:"+t}}}]}}}})));else if(t)switch(this.display){case x.BOX:e.data=this.data,i.push(s("kup-box",Object.assign({},e)));break;case x.BUTTON_LIST:e.data=this.data,i.push(s("kup-button-list",Object.assign({},e)));break;case x.CHIP:e.data=this.data,i.push(s("kup-chip",Object.assign({},e)));break;case x.CHART:case x.ECHART:e.data=this.data,e.series=[],e.axis=null;for(let t=0;t<this.data.columns.length;t++){const i=this.data.columns[t];i.obj&&this.kupManager.objects.isNumber(i.obj)||null!==e.axis?e.series.push(this.display===x.CHART?{code:i.name,decode:i.title}:i.name):e.axis=i.name}0===e.series.length&&this.kupManager.debug.logMessage(this,"Not enough numerical columns to display a chart!",h.WARNING),e.axis||this.kupManager.debug.logMessage(this,"No axis for the chart!",h.WARNING),i.push(s(this.display===x.CHART?"kup-chart":"kup-echart",Object.assign({},e)));break;case x.DATATABLE:e.data=this.data,e.autoFillMissingCells=!0,i.push(s("kup-data-table",Object.assign({},e)));break;case x.TREE:e.data=this.data,i.push(s("kup-tree",Object.assign({class:"kup-full-width"},e)));break;default:return void this.kupManager.debug.logMessage(this,"Display mode not supported ("+this.display+")!",h.ERROR)}else i.push(s("div",{class:"empty"},s(k,{sizeY:"100px",resource:"move_to_inbox"}),s("div",{class:"empty-text"},this.kupManager.language.translate(r.DROP_YOUR_DATA))));return i}updateData(t){{const i=Object.assign({},this.data),s=t.detail.sourceElement&&t.detail.sourceElement.column?t.detail.sourceElement.column:null,e=t.detail.sourceElement&&t.detail.sourceElement.row?t.detail.sourceElement.row:null;if(s&&s.name?i.columns?this.data.columns.find((t=>t.name===s.name))||i.columns.push(s):i.columns=[s]:this.kupManager.debug.logMessage(this,"Invalid column received.",h.WARNING),e&&(i.rows?i.rows.push(e):i.rows=[e]),this.data=i,this.data&&this.textArea)try{this.textArea.setValue(JSON.stringify(this.data,null,2))}catch(t){this.textArea.setValue("Invalid JSON:"+t)}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.rootElement.addEventListener(l,(t=>this.updateData(t))),this.dragHandler=this.rootElement.shadowRoot.querySelector("#drag-handle"),this.kupManager.interact.dialogify(this.rootElement,this.dragHandler),this.kupManager.interact.dropzone(this.wrapperRef,{accept:`[${u}],[${p}]`},{dispatcher:this.rootElement,type:d.MAGICBOX}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return s(e,null,s("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{id:g},s("div",{class:"magic-box-wrapper"},s("div",{class:"actions",id:"drag-handle"},s("kup-combobox",Object.assign({},this.comboboxProps())),s("kup-button",{styling:m.FLAT,icon:"delete",label:"Reset","onkup-button-click":()=>{this.data=null}}),s("kup-button",{id:"close-dialog",customStyle:`:host{${b.PRIMARY}: var(${b.TITLE});}`,icon:"clear","onkup-button-click":()=>{this.kupManager.hideMagicBox()}})),s("div",{class:"content",ref:t=>this.wrapperRef=t},this.setContent()))))}disconnectedCallback(){this.kupManager.interact.unregister([this.rootElement,this.wrapperRef]),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return o(this)}};y.style=":host{background-color:var(--kup-background-color);color:var(--kup-text-color);display:block;height:300px;min-width:700px;width:700px}#kup-component,.magic-box-wrapper{height:100%;width:100%}.magic-box-wrapper{border:3px dashed var(--kup-border-color);box-sizing:border-box;display:flex;flex-direction:column}.actions{align-items:center;background-color:var(--kup-title-background-color);display:inline-flex;height:52px;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.actions kup-button{margin:0.5em}.actions #comp-switcher{margin:auto 0}.actions #close-dialog{position:absolute;margin:0;top:0;right:0;background-color:var(--kup-title-background-color)}.content{box-sizing:border-box;height:100%;margin-top:52px;overflow:auto;transition:background-color 125ms ease}.empty{flex-direction:column;display:flex;text-align:center;justify-content:center;height:100%;width:100%;opacity:0.5;transition:opacity 0.25s ease-out}.empty .f-image{margin:0}.json{font-family:var(--kup-font-family-monospace);margin:0}[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}";export{y as kup_magic_box}
1
+ import{r as t,f as i,h as s,H as e,d as o}from"./p-cd9a4274.js";import{k as a,g as c,s as n,l as r,d as h,ai as l,N as u,aj as p,U as d,c as b}from"./p-937a322f.js";import{F as m}from"./p-c634eb82.js";import{F as k}from"./p-b396d0f8.js";import{c as g}from"./p-635bb4b3.js";import"./p-c23731ca.js";var f,x;!function(t){t.customStyle="Custom style of the component.",t.data="Sets the data that will be used to display different components."}(f||(f={})),function(t){t.BOX="Box",t.BUTTON_LIST="Button List",t.CHART="Chart",t.CHIP="Chip",t.ECHART="Echart",t.DATATABLE="Datatable",t.JSON="JSON",t.TREE="Tree"}(x||(x={}));const y=class{constructor(i){t(this,i),this.dragHandler=null,this.kupManager=a(),this.textArea=null,this.wrapperRef=null,this.display=x.DATATABLE,this.customStyle="",this.data=null}async getProps(t){return c(this,f,t)}async refresh(){i(this)}async setProps(t){n(this,f,t)}comboboxProps(){const t=[];for(const i in x)Object.prototype.hasOwnProperty.call(x,i)&&t.push({id:x[i],selected:!1,value:x[i]});return{data:{"kup-list":{data:t,id:"kup-debug-theme-changer-list"},"kup-text-field":{emitSubmitEventOnEnter:!1,inputType:"text",label:this.kupManager.language.translate(r.VIEW_AS)}},id:"comp-switcher",initialValue:this.display,isSelect:!0,"onKup-combobox-itemclick":t=>{this.display=t.detail.value}}}setContent(){const t=!!(this.data&&this.data.columns&&this.data.columns.length>0),i=[],e={};if(this.display===x.JSON)e.initialValue=this.data?JSON.stringify(this.data,null,2):"",e.textArea=!0,i.push(s("kup-text-field",Object.assign({class:"kup-full-width kup-full-height"},e,{ref:t=>this.textArea=t,"onkup-textfield-input":t=>{try{this.data=JSON.parse(t.detail.value)}catch(t){this.data={columns:[{name:"ERROR",title:"Error"}],rows:[{cells:{ERROR:{value:"Invalid JSON:"+t}}}]}}}})));else if(t)switch(this.display){case x.BOX:e.data=this.data,i.push(s("kup-box",Object.assign({},e)));break;case x.BUTTON_LIST:e.data=this.data,i.push(s("kup-button-list",Object.assign({},e)));break;case x.CHIP:e.data=this.data,i.push(s("kup-chip",Object.assign({},e)));break;case x.CHART:case x.ECHART:e.data=this.data,e.series=[],e.axis=null;for(let t=0;t<this.data.columns.length;t++){const i=this.data.columns[t];i.obj&&this.kupManager.objects.isNumber(i.obj)||null!==e.axis?e.series.push(this.display===x.CHART?{code:i.name,decode:i.title}:i.name):e.axis=i.name}0===e.series.length&&this.kupManager.debug.logMessage(this,"Not enough numerical columns to display a chart!",h.WARNING),e.axis||this.kupManager.debug.logMessage(this,"No axis for the chart!",h.WARNING),i.push(s(this.display===x.CHART?"kup-chart":"kup-echart",Object.assign({},e)));break;case x.DATATABLE:e.data=this.data,e.autoFillMissingCells=!0,i.push(s("kup-data-table",Object.assign({},e)));break;case x.TREE:e.data=this.data,i.push(s("kup-tree",Object.assign({class:"kup-full-width"},e)));break;default:return void this.kupManager.debug.logMessage(this,"Display mode not supported ("+this.display+")!",h.ERROR)}else i.push(s("div",{class:"empty"},s(k,{sizeY:"100px",resource:"move_to_inbox"}),s("div",{class:"empty-text"},this.kupManager.language.translate(r.DROP_YOUR_DATA))));return i}updateData(t){{const i=Object.assign({},this.data),s=t.detail.sourceElement&&t.detail.sourceElement.column?t.detail.sourceElement.column:null,e=t.detail.sourceElement&&t.detail.sourceElement.row?t.detail.sourceElement.row:null;if(s&&s.name?i.columns?this.data.columns.find((t=>t.name===s.name))||i.columns.push(s):i.columns=[s]:this.kupManager.debug.logMessage(this,"Invalid column received.",h.WARNING),e&&(i.rows?i.rows.push(e):i.rows=[e]),this.data=i,this.data&&this.textArea)try{this.textArea.setValue(JSON.stringify(this.data,null,2))}catch(t){this.textArea.setValue("Invalid JSON:"+t)}}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.rootElement.addEventListener(l,(t=>this.updateData(t))),this.dragHandler=this.rootElement.shadowRoot.querySelector("#drag-handle"),this.kupManager.interact.dialogify(this.rootElement,this.dragHandler),this.kupManager.interact.dropzone(this.wrapperRef,{accept:`[${u}],[${p}]`},{dispatcher:this.rootElement,type:d.MAGICBOX}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return s(e,null,s("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{id:g},s("div",{class:"magic-box-wrapper"},s("div",{class:"actions",id:"drag-handle"},s("kup-combobox",Object.assign({},this.comboboxProps())),s("kup-button",{styling:m.FLAT,icon:"delete",label:"Reset","onkup-button-click":()=>{this.data=null}}),s("kup-button",{id:"close-dialog",customStyle:`:host{${b.PRIMARY}: var(${b.TITLE});}`,icon:"clear","onkup-button-click":()=>{this.kupManager.hideMagicBox()}})),s("div",{class:"content",ref:t=>this.wrapperRef=t},this.setContent()))))}disconnectedCallback(){this.kupManager.interact.unregister([this.rootElement,this.wrapperRef]),this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return o(this)}};y.style=":host{background-color:var(--kup-background-color);color:var(--kup-text-color);display:block;height:300px;min-width:700px;width:700px}#kup-component,.magic-box-wrapper{height:100%;width:100%}.magic-box-wrapper{border:3px dashed var(--kup-border-color);box-sizing:border-box;display:flex;flex-direction:column}.actions{align-items:center;background-color:var(--kup-title-background-color);display:inline-flex;height:52px;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.actions kup-button{margin:0.5em}.actions #comp-switcher{margin:auto 0}.actions #close-dialog{position:absolute;margin:0;top:0;right:0;background-color:var(--kup-title-background-color)}.content{box-sizing:border-box;height:100%;margin-top:52px;overflow:auto;transition:background-color 125ms ease}.empty{flex-direction:column;display:flex;text-align:center;justify-content:center;height:100%;width:100%;opacity:0.5;transition:opacity 0.25s ease-out}.empty .f-image{margin:0}.json{font-family:var(--kup-font-family-monospace);margin:0}[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}";export{y as kup_magic_box}
@@ -1 +1 @@
1
- import{r as t,f as s,h as i,H as h,d as e}from"./p-cd9a4274.js";import{k as o}from"./p-7e1d9192.js";import{c as l}from"./p-635bb4b3.js";import"./p-c23731ca.js";const n=class{constructor(s){t(this,s),this.kupManager=o(),this.startTime=performance.now(),this.featuresStartTime=null,this.endTime=null,this.content=null,this.customStyle="",this.features={debug:!1,language:!1,longCycleProp:!1,longCycleVar:!1,objects:!1,objectsFunction:!1,theme:!1}}async printLifecycleTime(){const t=this.endTime-this.featuresStartTime,s=this.endTime-this.startTime;return this.content="Full lifecycle of this probe ("+this.rootElement.tagName+"#"+this.rootElement.id+") took "+s+"ms, while features took "+t+"ms.",{id:this.rootElement.id,fullTime:s,featuresTime:t}}async refresh(){s(this)}longCycleProp(){}longCycleVar(){}longCycleObjects(){for(let t=0;t<1e6;t++)this.kupManager.objects.isNumber({t:"NR",p:"",k:""})}longCycleObjectsFunction(){}componentWillLoad(){this.featuresStartTime=performance.now(),this.features.debug&&this.kupManager.debug.logLoad(this,!1),this.features.language&&this.kupManager.language.register(this),this.features.longCycleProp&&this.longCycleProp(),this.features.longCycleVar&&this.longCycleVar(),this.features.objects&&this.longCycleObjects(),this.features.objectsFunction&&this.longCycleObjectsFunction(),this.features.theme&&this.kupManager.theme.register(this)}componentDidLoad(){this.features.debug&&this.kupManager.debug.logLoad(this,!0),this.endTime=performance.now()}componentWillRender(){this.features.debug&&this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.features.debug&&this.kupManager.debug.logRender(this,!0)}render(){let t=null;return this.features.theme&&(t=this.kupManager.theme.setKupStyle(this.rootElement)),i(h,null,t?i("style",null,t):null,i("div",{id:l},this.content))}disconnectedCallback(){this.features.language&&this.kupManager.language.unregister(this),this.features.theme&&this.kupManager.theme.unregister(this)}get rootElement(){return e(this)}};export{n as kup_probe}
1
+ import{r as t,f as s,h as i,H as h,d as e}from"./p-cd9a4274.js";import{k as o}from"./p-937a322f.js";import{c as l}from"./p-635bb4b3.js";import"./p-c23731ca.js";const n=class{constructor(s){t(this,s),this.kupManager=o(),this.startTime=performance.now(),this.featuresStartTime=null,this.endTime=null,this.content=null,this.customStyle="",this.features={debug:!1,language:!1,longCycleProp:!1,longCycleVar:!1,objects:!1,objectsFunction:!1,theme:!1}}async printLifecycleTime(){const t=this.endTime-this.featuresStartTime,s=this.endTime-this.startTime;return this.content="Full lifecycle of this probe ("+this.rootElement.tagName+"#"+this.rootElement.id+") took "+s+"ms, while features took "+t+"ms.",{id:this.rootElement.id,fullTime:s,featuresTime:t}}async refresh(){s(this)}longCycleProp(){}longCycleVar(){}longCycleObjects(){for(let t=0;t<1e6;t++)this.kupManager.objects.isNumber({t:"NR",p:"",k:""})}longCycleObjectsFunction(){}componentWillLoad(){this.featuresStartTime=performance.now(),this.features.debug&&this.kupManager.debug.logLoad(this,!1),this.features.language&&this.kupManager.language.register(this),this.features.longCycleProp&&this.longCycleProp(),this.features.longCycleVar&&this.longCycleVar(),this.features.objects&&this.longCycleObjects(),this.features.objectsFunction&&this.longCycleObjectsFunction(),this.features.theme&&this.kupManager.theme.register(this)}componentDidLoad(){this.features.debug&&this.kupManager.debug.logLoad(this,!0),this.endTime=performance.now()}componentWillRender(){this.features.debug&&this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.features.debug&&this.kupManager.debug.logRender(this,!0)}render(){let t=null;return this.features.theme&&(t=this.kupManager.theme.setKupStyle(this.rootElement)),i(h,null,t?i("style",null,t):null,i("div",{id:l},this.content))}disconnectedCallback(){this.features.language&&this.kupManager.language.unregister(this),this.features.theme&&this.kupManager.theme.unregister(this)}get rootElement(){return e(this)}};export{n as kup_probe}
@@ -1 +1 @@
1
- import{r as t,c as s,f as e,h as i,H as a,d as c}from"./p-cd9a4274.js";import{k as r,g as o,s as h,r as l,ac as n}from"./p-7e1d9192.js";import{c as d}from"./p-635bb4b3.js";import"./p-c23731ca.js";var u;!function(t){t.columnsNumber="Sets the number of columns.",t.customStyle="Custom style of the component.",t.data="Actual data of the component.",t.decvalueCol="Sets the decimal value column.",t.descrCol="Sets the description column.",t.fullWidth="Sets whether the component occupies all available width.",t.horizontal="Sets whether the cards are placed horizontally or not.",t.iconCol="Sets the icon column.",t.iconcolorCol="Sets the icon color column.",t.intvalueCol="Sets the integer value column.",t.isClickable="Sets whether a single card is clickable or not.",t.layoutCol="Sets the layout column.",t.measureCol="Sets the unit of measure column.",t.textcolorCol="Sets the text color column.",t.valueCol="Sets the value column.",t.valuecolorCol="Sets the value color column."}(u||(u={}));var m,p=function(t,s,e,i){if("a"===e&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof s?t!==s||!i:!s.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?i:"a"===e?i.call(t):i?i.value:s.get(t)};const k=class{constructor(e){t(this,e),this.kupCardListClickEvent=s(this,"kup-cardlist-click",7),m.set(this,r()),this.columnsNumber=1,this.customStyle="",this.data=null,this.fullWidth=!0,this.horizontal=!1,this.descrCol="",this.iconCol="",this.valueCol="",this.measureCol="",this.intvalueCol="",this.decvalueCol="",this.textcolorCol="",this.valuecolorCol="",this.iconcolorCol="",this.layoutCol="",this.isClickable=!1}async getProps(t){return o(this,u,t)}async refresh(){e(this)}async setProps(t){h(this,u,t)}componentWillLoad(){p(this,m,"f").debug.logLoad(this,!1),p(this,m,"f").theme.register(this)}componentDidLoad(){p(this,m,"f").debug.logLoad(this,!0)}componentDidRender(){p(this,m,"f").debug.logRender(this,!0)}render(){if(!this.data||!this.data.columns||!this.data.columns.length)return;const t=[];let s,e,c,r,o,h,u,k,_,f;for(let t=0;t<this.data.columns.length;t++){const i=this.data.columns[t];if(i.name)switch(i.name){case this.decvalueCol:s=i;break;case this.descrCol:e=i;break;case this.iconCol:c=i;break;case this.iconcolorCol:r=i;break;case this.intvalueCol:o=i;break;case this.layoutCol:h=i;break;case this.measureCol:u=i;break;case this.textcolorCol:k=i;break;case this.valueCol:_=i;break;case this.valuecolorCol:f=i}}for(let a=0;a<this.data.rows.length;a++){const d=this.data.rows[a],b={color:[],image:[],text:[]},g=h&&d.cells[h.name].value?parseInt(d.cells[h.name].value):1,w=i("kup-card",{class:this.isClickable?"is-clickable":"",customStyle:"#kup-component, .scalable-card { min-height: var(--kup_cardlist_cardsminheight) }",data:b,layoutFamily:l.SCALABLE,layoutNumber:g,key:a,"onKup-card-click":()=>{this.isClickable&&this.kupCardListClickEvent.emit({comp:this,id:this.rootElement.id,index:a,row:d})},slot:a.toString()}),x=(t,s,e)=>{if(t){const i=d.cells[t.name];if(i){const a=i.value;switch(s){case"color":b[s][e]=p(this,m,"f").theme.colorCheck(a).hexColor;break;case"image":b[s][e]={resource:a};break;default:b[s][e]=n(t,i)}}}};switch(g){case 1:x(k,"color",0),x(f,"color",1),x(e,"text",0),x(_,"text",1);break;case 2:x(r,"color",0),x(f,"color",1),x(c,"image",0),x(o,"text",0),x(s,"text",1),x(u,"text",2);break;case 3:x(f,"color",0),x(k,"color",1),x(_,"text",0),x(e,"text",1);break;case 4:x(r,"color",0),x(f,"color",1),x(k,"color",2),x(c,"image",0),x(o,"text",0),x(s,"text",1),x(u,"text",2),x(e,"text",3);break;case 5:x(r,"color",0),x(k,"color",1),x(f,"color",2),x(c,"image",0),x(e,"text",0),x(_,"text",1);break;case 6:case 7:case 8:x(r,"color",0),x(f,"color",1),x(k,"color",2),x(c,"image",0),x(_,"text",0),x(e,"text",1)}t.push(w)}return i(a,null,i("style",null,p(this,m,"f").theme.setKupStyle(this.rootElement)),i("div",{id:d},i("kup-grid",{class:(this.fullWidth?"kup-full-width":"")+" scalable-cards",columns:this.columnsNumber,singleLine:this.horizontal},t)))}disconnectedCallback(){p(this,m,"f").theme.unregister(this)}get rootElement(){return c(this)}};m=new WeakMap,k.style=":host{--kup_cardlist_cards_max_height:var(--kup-cardlist-cards-max-height, unset);--kup_cardlist_cards_min_height:var(--kup-cardlist-cards-min-height, unset);--kup_cardlist_cards_max_width:var(--kup-cardlist-cards-max-width, unset);--kup_cardlist_cards_min_width:var(--kup-cardlist-cards-min-width, unset);display:block;height:100%;width:100%}#kup-component{height:100%;width:100%}kup-card{max-height:var(--kup_cardlist_cards_max_height);min-height:var(--kup_cardlist_cards_min_height);max-width:var(--kup_cardlist_cards_max_width);min-width:var(--kup_cardlist_cards_min_width)}kup-card.is-clickable{cursor:pointer}kup-grid{--kup-grid-padding:0}";export{k as kup_card_list}
1
+ import{r as t,c as s,f as e,h as i,H as a,d as c}from"./p-cd9a4274.js";import{k as r,g as o,s as h,r as l,ac as n}from"./p-937a322f.js";import{c as d}from"./p-635bb4b3.js";import"./p-c23731ca.js";var u;!function(t){t.columnsNumber="Sets the number of columns.",t.customStyle="Custom style of the component.",t.data="Actual data of the component.",t.decvalueCol="Sets the decimal value column.",t.descrCol="Sets the description column.",t.fullWidth="Sets whether the component occupies all available width.",t.horizontal="Sets whether the cards are placed horizontally or not.",t.iconCol="Sets the icon column.",t.iconcolorCol="Sets the icon color column.",t.intvalueCol="Sets the integer value column.",t.isClickable="Sets whether a single card is clickable or not.",t.layoutCol="Sets the layout column.",t.measureCol="Sets the unit of measure column.",t.textcolorCol="Sets the text color column.",t.valueCol="Sets the value column.",t.valuecolorCol="Sets the value color column."}(u||(u={}));var m,p=function(t,s,e,i){if("a"===e&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof s?t!==s||!i:!s.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?i:"a"===e?i.call(t):i?i.value:s.get(t)};const k=class{constructor(e){t(this,e),this.kupCardListClickEvent=s(this,"kup-cardlist-click",7),m.set(this,r()),this.columnsNumber=1,this.customStyle="",this.data=null,this.fullWidth=!0,this.horizontal=!1,this.descrCol="",this.iconCol="",this.valueCol="",this.measureCol="",this.intvalueCol="",this.decvalueCol="",this.textcolorCol="",this.valuecolorCol="",this.iconcolorCol="",this.layoutCol="",this.isClickable=!1}async getProps(t){return o(this,u,t)}async refresh(){e(this)}async setProps(t){h(this,u,t)}componentWillLoad(){p(this,m,"f").debug.logLoad(this,!1),p(this,m,"f").theme.register(this)}componentDidLoad(){p(this,m,"f").debug.logLoad(this,!0)}componentDidRender(){p(this,m,"f").debug.logRender(this,!0)}render(){if(!this.data||!this.data.columns||!this.data.columns.length)return;const t=[];let s,e,c,r,o,h,u,k,_,f;for(let t=0;t<this.data.columns.length;t++){const i=this.data.columns[t];if(i.name)switch(i.name){case this.decvalueCol:s=i;break;case this.descrCol:e=i;break;case this.iconCol:c=i;break;case this.iconcolorCol:r=i;break;case this.intvalueCol:o=i;break;case this.layoutCol:h=i;break;case this.measureCol:u=i;break;case this.textcolorCol:k=i;break;case this.valueCol:_=i;break;case this.valuecolorCol:f=i}}for(let a=0;a<this.data.rows.length;a++){const d=this.data.rows[a],b={color:[],image:[],text:[]},g=h&&d.cells[h.name].value?parseInt(d.cells[h.name].value):1,w=i("kup-card",{class:this.isClickable?"is-clickable":"",customStyle:"#kup-component, .scalable-card { min-height: var(--kup_cardlist_cardsminheight) }",data:b,layoutFamily:l.SCALABLE,layoutNumber:g,key:a,"onKup-card-click":()=>{this.isClickable&&this.kupCardListClickEvent.emit({comp:this,id:this.rootElement.id,index:a,row:d})},slot:a.toString()}),x=(t,s,e)=>{if(t){const i=d.cells[t.name];if(i){const a=i.value;switch(s){case"color":b[s][e]=p(this,m,"f").theme.colorCheck(a).hexColor;break;case"image":b[s][e]={resource:a};break;default:b[s][e]=n(t,i)}}}};switch(g){case 1:x(k,"color",0),x(f,"color",1),x(e,"text",0),x(_,"text",1);break;case 2:x(r,"color",0),x(f,"color",1),x(c,"image",0),x(o,"text",0),x(s,"text",1),x(u,"text",2);break;case 3:x(f,"color",0),x(k,"color",1),x(_,"text",0),x(e,"text",1);break;case 4:x(r,"color",0),x(f,"color",1),x(k,"color",2),x(c,"image",0),x(o,"text",0),x(s,"text",1),x(u,"text",2),x(e,"text",3);break;case 5:x(r,"color",0),x(k,"color",1),x(f,"color",2),x(c,"image",0),x(e,"text",0),x(_,"text",1);break;case 6:case 7:case 8:x(r,"color",0),x(f,"color",1),x(k,"color",2),x(c,"image",0),x(_,"text",0),x(e,"text",1)}t.push(w)}return i(a,null,i("style",null,p(this,m,"f").theme.setKupStyle(this.rootElement)),i("div",{id:d},i("kup-grid",{class:(this.fullWidth?"kup-full-width":"")+" scalable-cards",columns:this.columnsNumber,singleLine:this.horizontal},t)))}disconnectedCallback(){p(this,m,"f").theme.unregister(this)}get rootElement(){return c(this)}};m=new WeakMap,k.style=":host{--kup_cardlist_cards_max_height:var(--kup-cardlist-cards-max-height, unset);--kup_cardlist_cards_min_height:var(--kup-cardlist-cards-min-height, unset);--kup_cardlist_cards_max_width:var(--kup-cardlist-cards-max-width, unset);--kup_cardlist_cards_min_width:var(--kup-cardlist-cards-min-width, unset);display:block;height:100%;width:100%}#kup-component{height:100%;width:100%}kup-card{max-height:var(--kup_cardlist_cards_max_height);min-height:var(--kup_cardlist_cards_min_height);max-width:var(--kup_cardlist_cards_max_width);min-width:var(--kup_cardlist_cards_min_width)}kup-card.is-clickable{cursor:pointer}kup-grid{--kup-grid-padding:0}";export{k as kup_card_list}