@sme.up/ketchup 6.4.0 → 6.6.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.
Files changed (130) hide show
  1. package/dist/cjs/{f-button-826a470e.js → f-button-a531feb2.js} +1 -1
  2. package/dist/cjs/{f-cell-2d5bcf0c.js → f-cell-75cb7933.js} +8 -6
  3. package/dist/cjs/{f-chip-2fd3363e.js → f-chip-9508a2e4.js} +2 -2
  4. package/dist/cjs/{f-image-0f17d599.js → f-image-c21cc616.js} +1 -1
  5. package/dist/cjs/{f-paginator-utils-946b579d.js → f-paginator-utils-2b72d7e8.js} +2 -4
  6. package/dist/cjs/{f-text-field-d243e4d8.js → f-text-field-a5b2bd0e.js} +2 -2
  7. package/dist/cjs/ketchup.cjs.js +1 -1
  8. package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
  9. package/dist/cjs/kup-autocomplete_25.cjs.entry.js +241 -86
  10. package/dist/cjs/kup-box.cjs.entry.js +41 -21
  11. package/dist/cjs/kup-calendar.cjs.entry.js +4 -4
  12. package/dist/cjs/kup-cell.cjs.entry.js +5 -5
  13. package/dist/cjs/kup-dash-list.cjs.entry.js +1 -1
  14. package/dist/cjs/kup-dash_2.cjs.entry.js +1 -1
  15. package/dist/cjs/kup-dashboard.cjs.entry.js +4 -4
  16. package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
  17. package/dist/cjs/kup-echart.cjs.entry.js +1 -1
  18. package/dist/cjs/kup-family-tree.cjs.entry.js +18 -6
  19. package/dist/cjs/kup-form.cjs.entry.js +6 -6
  20. package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
  21. package/dist/cjs/kup-image-list.cjs.entry.js +7 -7
  22. package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
  23. package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
  24. package/dist/cjs/{kup-manager-a8eecc60.js → kup-manager-8e67afec.js} +34 -21
  25. package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
  26. package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
  27. package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
  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/cjs/loader.cjs.js +1 -1
  32. package/dist/collection/assets/card.js +23 -0
  33. package/dist/collection/components/kup-box/kup-box.js +36 -14
  34. package/dist/collection/components/kup-button/kup-button.css +1 -0
  35. package/dist/collection/components/kup-card/box/kup-card-box.js +132 -0
  36. package/dist/collection/components/kup-card/kup-card-declarations.js +2 -0
  37. package/dist/collection/components/kup-card/kup-card.css +100 -0
  38. package/dist/collection/components/kup-card/kup-card.js +5 -1
  39. package/dist/collection/components/kup-combobox/kup-combobox.js +1 -0
  40. package/dist/collection/components/kup-data-table/kup-data-table.js +20 -13
  41. package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +1 -0
  42. package/dist/collection/components/kup-family-tree/kup-family-tree.js +38 -3
  43. package/dist/collection/components/kup-image-list/kup-image-list.js +1 -1
  44. package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +1 -0
  45. package/dist/collection/components/kup-text-field/kup-text-field.js +27 -0
  46. package/dist/collection/components/kup-tree/kup-tree-declarations.js +0 -2
  47. package/dist/collection/components/kup-tree/kup-tree.js +116 -107
  48. package/dist/collection/f-components/f-cell/f-cell.js +4 -2
  49. package/dist/collection/f-components/f-text-field/f-text-field.js +1 -1
  50. package/dist/collection/managers/kup-objects/kup-objects.js +11 -1
  51. package/dist/collection/managers/kup-theme/kup-theme-declarations.js +1 -0
  52. package/dist/esm/{f-button-2d0a5f21.js → f-button-15719ec1.js} +1 -1
  53. package/dist/esm/{f-cell-ee7d7b5c.js → f-cell-692c37bf.js} +8 -6
  54. package/dist/esm/{f-chip-0d29f91f.js → f-chip-abab04bf.js} +2 -2
  55. package/dist/esm/{f-image-ab131d59.js → f-image-98783644.js} +1 -1
  56. package/dist/esm/{f-paginator-utils-aa52af0f.js → f-paginator-utils-d12ee737.js} +2 -4
  57. package/dist/esm/{f-text-field-0729b19f.js → f-text-field-282025dd.js} +2 -2
  58. package/dist/esm/ketchup.js +1 -1
  59. package/dist/esm/kup-accordion.entry.js +2 -2
  60. package/dist/esm/kup-autocomplete_25.entry.js +241 -86
  61. package/dist/esm/kup-box.entry.js +41 -21
  62. package/dist/esm/kup-calendar.entry.js +4 -4
  63. package/dist/esm/kup-cell.entry.js +5 -5
  64. package/dist/esm/kup-dash-list.entry.js +1 -1
  65. package/dist/esm/kup-dash_2.entry.js +1 -1
  66. package/dist/esm/kup-dashboard.entry.js +4 -4
  67. package/dist/esm/kup-drawer.entry.js +1 -1
  68. package/dist/esm/kup-echart.entry.js +1 -1
  69. package/dist/esm/kup-family-tree.entry.js +18 -6
  70. package/dist/esm/kup-form.entry.js +6 -6
  71. package/dist/esm/kup-iframe.entry.js +1 -1
  72. package/dist/esm/kup-image-list.entry.js +7 -7
  73. package/dist/esm/kup-lazy.entry.js +1 -1
  74. package/dist/esm/kup-magic-box.entry.js +2 -2
  75. package/dist/esm/{kup-manager-13b4f989.js → kup-manager-abbae73e.js} +17 -4
  76. package/dist/esm/kup-nav-bar.entry.js +1 -1
  77. package/dist/esm/kup-numeric-picker.entry.js +2 -2
  78. package/dist/esm/kup-photo-frame.entry.js +1 -1
  79. package/dist/esm/kup-probe.entry.js +1 -1
  80. package/dist/esm/kup-qlik.entry.js +1 -1
  81. package/dist/esm/kup-snackbar.entry.js +3 -3
  82. package/dist/esm/loader.js +1 -1
  83. package/dist/ketchup/ketchup.esm.js +1 -1
  84. package/dist/ketchup/p-1d2dea0a.entry.js +1 -0
  85. package/dist/ketchup/{p-e0f659c9.entry.js → p-1ef5d16d.entry.js} +1 -1
  86. package/dist/ketchup/{p-0cf10db0.js → p-20221a50.js} +1 -1
  87. package/dist/ketchup/{p-18b68e86.entry.js → p-27538d6f.entry.js} +1 -1
  88. package/dist/ketchup/{p-e01fa411.entry.js → p-29d72040.entry.js} +1 -1
  89. package/dist/ketchup/{p-adcfcd4f.entry.js → p-3760a159.entry.js} +1 -1
  90. package/dist/ketchup/p-3e74e1ed.js +1 -0
  91. package/dist/ketchup/{p-d7091875.entry.js → p-5933aa02.entry.js} +1 -1
  92. package/dist/ketchup/{p-83c214d7.entry.js → p-5ea2a1ff.entry.js} +1 -1
  93. package/dist/ketchup/{p-e21c744a.js → p-62421bcf.js} +1 -1
  94. package/dist/ketchup/{p-84957bbf.entry.js → p-62f3ec78.entry.js} +1 -1
  95. package/dist/ketchup/p-680a8cb4.entry.js +9 -0
  96. package/dist/ketchup/{p-fa9f161a.entry.js → p-6946b614.entry.js} +1 -1
  97. package/dist/ketchup/{p-bfe88b03.js → p-6f3040fb.js} +1 -1
  98. package/dist/ketchup/{p-816f0938.entry.js → p-725c6268.entry.js} +1 -1
  99. package/dist/ketchup/{p-28d514d0.entry.js → p-7d37ea62.entry.js} +1 -1
  100. package/dist/ketchup/{p-5f51009b.entry.js → p-7e16265d.entry.js} +1 -1
  101. package/dist/ketchup/{p-3fe35411.entry.js → p-9419919c.entry.js} +1 -1
  102. package/dist/ketchup/{p-13666119.entry.js → p-a450d60a.entry.js} +6 -6
  103. package/dist/ketchup/{p-e1d82570.entry.js → p-a4a30e0e.entry.js} +1 -1
  104. package/dist/ketchup/p-c05f2638.js +30 -0
  105. package/dist/ketchup/{p-d8656956.entry.js → p-ccef2553.entry.js} +1 -1
  106. package/dist/ketchup/{p-e5a9d60a.entry.js → p-d7a92197.entry.js} +1 -1
  107. package/dist/ketchup/{p-dc69549c.entry.js → p-d8af7ba6.entry.js} +1 -1
  108. package/dist/ketchup/{p-0986ad5d.js → p-e07a10fb.js} +1 -1
  109. package/dist/ketchup/{p-b705be3b.js → p-e6ebdb80.js} +1 -1
  110. package/dist/ketchup/{p-2ffdbee1.entry.js → p-eeadd688.entry.js} +1 -1
  111. package/dist/ketchup/{p-982d3e3a.entry.js → p-f6409c42.entry.js} +1 -1
  112. package/dist/ketchup/p-fd930a34.entry.js +1 -0
  113. package/dist/types/components/kup-card/box/kup-card-box.d.ts +26 -0
  114. package/dist/types/components/kup-card/kup-card-declarations.d.ts +3 -0
  115. package/dist/types/components/kup-combobox/kup-combobox-declarations.d.ts +3 -1
  116. package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +1 -0
  117. package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +5 -0
  118. package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +1 -0
  119. package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
  120. package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +0 -4
  121. package/dist/types/components/kup-tree/kup-tree.d.ts +18 -12
  122. package/dist/types/components.d.ts +30 -16
  123. package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
  124. package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
  125. package/package.json +3 -2
  126. package/dist/ketchup/p-3dcfffbe.entry.js +0 -1
  127. package/dist/ketchup/p-86795579.entry.js +0 -1
  128. package/dist/ketchup/p-8f85b8bb.entry.js +0 -9
  129. package/dist/ketchup/p-b8c921ee.js +0 -30
  130. package/dist/ketchup/p-f50cbed9.js +0 -1
@@ -1 +1 @@
1
- import{r as t,c as s,f as i,h as o,H as a,g as n}from"./p-b0b3989b.js";import{k as e,g as r,s as c}from"./p-b8c921ee.js";import{c as l}from"./p-97e8ea42.js";import{F as p}from"./p-e21c744a.js";import"./p-6c77a36c.js";import"./p-0cf10db0.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 b=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=e()}onKupActionClick(){this.hide(),this.kupActionClick.emit({comp:this,id:this.rootElement.id})}async getProps(t){return r(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)}};b.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{b as kup_snackbar}
1
+ import{r as t,c as s,f as i,h as o,H as a,g as n}from"./p-b0b3989b.js";import{k as r,g as e,s as c}from"./p-c05f2638.js";import{c as l}from"./p-97e8ea42.js";import{F as p}from"./p-62421bcf.js";import"./p-6c77a36c.js";import"./p-20221a50.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{r as t,c as i,f as s,h as e,H as o,g as h}from"./p-b0b3989b.js";import{k as n,g as r,s as a,c}from"./p-b8c921ee.js";var d;!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."}(d||(d={}));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 r(this,d,t)}async refresh(){s(this)}async setProps(t){a(this,d,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!",c.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
+ import{r as t,c as i,f as s,h as e,H as o,g as h}from"./p-b0b3989b.js";import{k as n,g as r,s as a,c}from"./p-c05f2638.js";var d;!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."}(d||(d={}));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 r(this,d,t)}async refresh(){s(this)}async setProps(t){a(this,d,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!",c.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,f as o,h as e,H as i,g as l}from"./p-b0b3989b.js";import{k as r,y as n,g as s,s as a,al as c,j as f}from"./p-b8c921ee.js";import{c as u}from"./p-97e8ea42.js";import{F as m}from"./p-0986ad5d.js";import{F as d}from"./p-a203f78b.js";import{F as h}from"./p-e21c744a.js";import"./p-5552f156.js";import"./p-bfe88b03.js";import"./p-0cf10db0.js";import"./p-b705be3b.js";import"./p-79b0730b.js";import"./p-81605f08.js";import"./p-6c77a36c.js";var p,_,b;!function(t){t.customStyle="Custom style of the component.",t.data="Actual data of the form.",t.hiddenSubmitButton="Creates a hidden submit button in order to submit the form with enter.",t.layout="How the form will arrange its content."}(p||(p={})),function(t){t.CENTER="center",t.LEFT="left",t.RIGHT="right"}(_||(_={})),function(t){t.BOTTOM="bottom",t.LEFT="left",t.HIDDEN="hidden",t.PLACEHOLDER="placeholder",t.RIGHT="right",t.TOP="top"}(b||(b={}));const v=document.documentElement,g=class{constructor(o){t(this,o),this.customStyle="",this.data=null,this.hiddenSubmitButton=!1,this.layout=null,this.kupManager=r(),this.visibleColumns=[]}onDataChanged(){n(this.getRows()),this.initVisibleColumns(),this.checkLayout()}onLayoutChanged(){this.checkLayout()}async getProps(t){return s(this,p,t)}async refresh(){o(this)}async setFocus(t,o){const e=this.rootElement.shadowRoot.querySelectorAll('td[data-column="'+t+'"]');for(let t=0;e&&t<e.length;t++){const i=e[t];if(i["data-row"]&&i["data-row"].id==o){const t=i.querySelector("input");if(t)t.focus();else{const t=i.querySelector(".hydrated");if(t)try{t.setFocus()}catch(t){}}}}}async setProps(t){a(this,p,t)}getColumns(){return this.data&&this.data.columns?this.data.columns:[{title:"",name:"",size:void 0}]}initVisibleColumns(){this.visibleColumns=this.getColumns().filter((t=>!t.hasOwnProperty("visible")||t.visible))}getRows(){return this.data&&this.data.rows?this.data.rows:[]}checkLayout(){if(this.layout)return void(this.formLayout=this.layout);const t={horizontal:!1,sections:[]},o=this.visibleColumns;let e=o.length;const i=[];let l=0;for(;e-- >0;)i.push({column:o[l++].name});t.content=i,this.formLayout={sections:[t]}}renderRow(t){const o=[...this.visibleColumns];let i=null,l=t.layout;l||(l=this.formLayout);let r=!1;if(l){l.horizontal&&(r=!0);const e=l.sections;let n=e.length,s=0;n>0&&(i=[]);const a={horizontal:r};for(;n-- >0;)i.push(this.renderSection(e[s++],a,t,o))}return e("form",{class:{form:!0,"form--column":!r},name:this.rootElement.id},i,this.hiddenSubmitButton?e(h,{buttonType:"submit",label:"submit",wrapperClass:"form__submit"}):null)}renderSection(t,o,i,l){var r;let n=null;if(t.sections&&t.sections.length>0){const o=t.sections;let e=o.length,r=0;for(e>0&&(n=[]);e-- >0;)n.push(this.renderSection(o[r++],t,i,l))}else if(t.content){const o=t.content;let r=o.length,s=0;for(r>0&&(n=[]);r-- >0;){const r=this.renderFormField({formField:o[s++],row:i,visibleColumns:l},t);let a=r;t.horizontal||(a=e("tr",null,r)),n.push(a)}}else l.length>0&&(n=this.renderFormField({formField:{column:l[0].name},row:i,visibleColumns:l}));const s=!!t.columns,a=(null===(r=null==t?void 0:t.label)||void 0===r?void 0:r.placement)||b.LEFT,c={form__section:!0,"form__section--column":!s&&!t.horizontal,"form__section--grid":s,"form__section--titled":!!t.title,"form__section--last":!t.sections||0===t.sections.length,[`form__section--${a}`]:!0},f=t.style||{};return t.dim&&o&&(f.flex=`0 0 ${t.dim}`,o.horizontal?f.maxWidth=t.dim:f.maxHeight=t.dim),s&&(f["grid-template-columns"]=`repeat(${t.columns}, 1fr)`),e("div",{class:c,style:f},t.title?e("h3",null,t.title):null,e("table",null,e("tbody",null,t.horizontal?e("tr",null,n):n)))}renderFormField({formField:t,row:o,visibleColumns:i},l){var r;const n={form__field:!0},s={};let a=null,f=-1;for(let o=0;o<i.length;o++)if(i[o].name===t.column){f=o;break}f>=0?(a=i[f],i.splice(f,1)):l&&(a=this.data.columns.find((o=>o.name===t.column)));const u=o.cells[t.column];let d;if(!u)return null;u.isEditable=!0,this.kupManager.objects.isEmptyKupObj(u.obj)||this.kupManager.debug.isDebug()&&(d=u.obj.t+"; "+u.obj.p+"; "+u.obj.k+";");const h={cell:u,column:a,component:this,editable:!0,renderKup:!0,row:o,setSizes:!0,shape:t.shape},p=t.label||a.title;switch(function(){u.data||(u.data={});try{delete u.data.label}catch(t){}try{delete u.data.data["kup-text-field"].label}catch(t){}}(),null===(r=l.label)||void 0===r?void 0:r.placement){case b.BOTTOM:return[e("tr",null,g()),e("tr",null,k(p))];case b.PLACEHOLDER:!function(){switch(v.ketchup.data.cell.getType(u,u.shape||a.shape||null)){case c.AUTOCOMPLETE:case c.COLOR_PICKER:case c.COMBOBOX:case c.DATE:case c.DATETIME:case c.TIME:u.data.data&&u.data.data["kup-text-field"]?u.data.data["kup-text-field"].label=a.title:u.data.data={"kup-text-field":{label:a.title}};break;case c.CHECKBOX:case c.NUMBER:case c.STRING:case c.SWITCH:u.data.label=a.title}}();case b.HIDDEN:return l?[g()]:[e("tr",null,g())];case b.RIGHT:return l?[g(),k(p)]:[e("tr",null,g(),k(p))];case b.TOP:return[e("tr",null,k(p)),e("tr",null,g())];default:return l?[k(p),g()]:[e("tr",null,k(p),g())]}function g(){return e("td",{"data-cell":u,"data-row":o,"data-column":t.column,class:n,style:s,title:d},u&&a?e(m,Object.assign({},h)):e("span",null,t.value))}function k(t){var o,i,r;const n=(null===(o=null==l?void 0:l.label)||void 0===o?void 0:o.alignment)||_.LEFT,s={width:(null===(i=null==l?void 0:l.label)||void 0===i?void 0:i.width)?null===(r=null==l?void 0:l.label)||void 0===r?void 0:r.width:""};return e("td",{class:`form__label form__label--${n}`,style:s},e("span",null,t))}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this),this.onDataChanged()}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const o=t.querySelectorAll(".f-text-field");for(let t=0;t<o.length;t++)d(o[t])}this.kupManager.debug.logRender(this,!0)}render(){let t=null;if(0===this.data.rows.length)t=e("p",null,this.kupManager.language.translate(f.EMPTY_DATA));else{const o=this.data.rows;let e=o.length,i=0;for(t=[];e-- >0;)t.push(this.renderRow(o[i++]))}return e(i,null,e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{id:u},t))}disconnectedCallback(){this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return l(this)}static get watchers(){return{data:["onDataChanged"],layout:["onLayoutChanged"]}}};g.style=":host{--kup_form_background_color:var(\n --kup-form-background-color,\n var(--kup-background-color)\n );--kup_form_color:var(--kup-form-color, var(--kup-text-color));--kup_form_font_family:var(--kup-form-font-family, var(--kup-font-family));--kup_form_font_size:var(--kup-form-font-size, var(--kup-font-size));--kup_form_label_alignment:var(--kup-form-label-alignment);--kup_form_label_width:var(--kup-form-label-width);display:block;font-family:var(--kup_form_font_family);font-size:var(--kup_form_font_size)}.form{background:var(--kup_form_background_color);color:var(--kup_form_color);display:flex;flex-grow:1;overflow:auto;padding:1em 0;position:relative}.form--column{flex-direction:column}.form__section{display:flex;flex:1 1 1%;flex-direction:row;flex-wrap:wrap}.form__section--column{flex-direction:column;flex-wrap:unset}.form__section--column>.form__section{flex:0 0 auto}.form__section--grid{display:grid}.form__section--titled{border:1px solid var(--kup-border-color);padding-top:5px;position:relative;margin:10px}.form__section--titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}.form__section--left .form__label{width:var(--kup_form_label_width, 0)}.form__section--right .form__field{min-width:200px;width:0}.form__label{-webkit-font-smoothing:antialiased;box-sizing:border-box;font-size:0.875em;letter-spacing:0.0178571429em;white-space:nowrap;width:var(--kup_form_label_width)}.form__label--center{text-align:var(--kup_form_label_alignment, center)}.form__label--left{text-align:var(--kup_form_label_alignment, left)}.form__label--right{text-align:var(--kup_form_label_alignment, right)}.form__field{min-height:16px}.form__field img{height:auto}.form__submit{height:0;opacity:0;overflow:hidden;position:absolute;width:0}.form .f-cell.c-right-aligned:not(.c-centered) .f-cell__content{justify-content:flex-start}";export{g as kup_form}
1
+ import{r as t,f as o,h as e,H as i,g as l}from"./p-b0b3989b.js";import{k as r,z as n,g as s,s as a,am as c,l as f}from"./p-c05f2638.js";import{c as u}from"./p-97e8ea42.js";import{F as m}from"./p-e07a10fb.js";import{F as h}from"./p-a203f78b.js";import{F as d}from"./p-62421bcf.js";import"./p-5552f156.js";import"./p-6f3040fb.js";import"./p-20221a50.js";import"./p-e6ebdb80.js";import"./p-79b0730b.js";import"./p-81605f08.js";import"./p-6c77a36c.js";var p,_,b;!function(t){t.customStyle="Custom style of the component.",t.data="Actual data of the form.",t.hiddenSubmitButton="Creates a hidden submit button in order to submit the form with enter.",t.layout="How the form will arrange its content."}(p||(p={})),function(t){t.CENTER="center",t.LEFT="left",t.RIGHT="right"}(_||(_={})),function(t){t.BOTTOM="bottom",t.LEFT="left",t.HIDDEN="hidden",t.PLACEHOLDER="placeholder",t.RIGHT="right",t.TOP="top"}(b||(b={}));const v=document.documentElement,g=class{constructor(o){t(this,o),this.customStyle="",this.data=null,this.hiddenSubmitButton=!1,this.layout=null,this.kupManager=r(),this.visibleColumns=[]}onDataChanged(){n(this.getRows()),this.initVisibleColumns(),this.checkLayout()}onLayoutChanged(){this.checkLayout()}async getProps(t){return s(this,p,t)}async refresh(){o(this)}async setFocus(t,o){const e=this.rootElement.shadowRoot.querySelectorAll('td[data-column="'+t+'"]');for(let t=0;e&&t<e.length;t++){const i=e[t];if(i["data-row"]&&i["data-row"].id==o){const t=i.querySelector("input");if(t)t.focus();else{const t=i.querySelector(".hydrated");if(t)try{t.setFocus()}catch(t){}}}}}async setProps(t){a(this,p,t)}getColumns(){return this.data&&this.data.columns?this.data.columns:[{title:"",name:"",size:void 0}]}initVisibleColumns(){this.visibleColumns=this.getColumns().filter((t=>!t.hasOwnProperty("visible")||t.visible))}getRows(){return this.data&&this.data.rows?this.data.rows:[]}checkLayout(){if(this.layout)return void(this.formLayout=this.layout);const t={horizontal:!1,sections:[]},o=this.visibleColumns;let e=o.length;const i=[];let l=0;for(;e-- >0;)i.push({column:o[l++].name});t.content=i,this.formLayout={sections:[t]}}renderRow(t){const o=[...this.visibleColumns];let i=null,l=t.layout;l||(l=this.formLayout);let r=!1;if(l){l.horizontal&&(r=!0);const e=l.sections;let n=e.length,s=0;n>0&&(i=[]);const a={horizontal:r};for(;n-- >0;)i.push(this.renderSection(e[s++],a,t,o))}return e("form",{class:{form:!0,"form--column":!r},name:this.rootElement.id},i,this.hiddenSubmitButton?e(d,{buttonType:"submit",label:"submit",wrapperClass:"form__submit"}):null)}renderSection(t,o,i,l){var r;let n=null;if(t.sections&&t.sections.length>0){const o=t.sections;let e=o.length,r=0;for(e>0&&(n=[]);e-- >0;)n.push(this.renderSection(o[r++],t,i,l))}else if(t.content){const o=t.content;let r=o.length,s=0;for(r>0&&(n=[]);r-- >0;){const r=this.renderFormField({formField:o[s++],row:i,visibleColumns:l},t);let a=r;t.horizontal||(a=e("tr",null,r)),n.push(a)}}else l.length>0&&(n=this.renderFormField({formField:{column:l[0].name},row:i,visibleColumns:l}));const s=!!t.columns,a=(null===(r=null==t?void 0:t.label)||void 0===r?void 0:r.placement)||b.LEFT,c={form__section:!0,"form__section--column":!s&&!t.horizontal,"form__section--grid":s,"form__section--titled":!!t.title,"form__section--last":!t.sections||0===t.sections.length,[`form__section--${a}`]:!0},f=t.style||{};return t.dim&&o&&(f.flex=`0 0 ${t.dim}`,o.horizontal?f.maxWidth=t.dim:f.maxHeight=t.dim),s&&(f["grid-template-columns"]=`repeat(${t.columns}, 1fr)`),e("div",{class:c,style:f},t.title?e("h3",null,t.title):null,e("table",null,e("tbody",null,t.horizontal?e("tr",null,n):n)))}renderFormField({formField:t,row:o,visibleColumns:i},l){var r;const n={form__field:!0},s={};let a=null,f=-1;for(let o=0;o<i.length;o++)if(i[o].name===t.column){f=o;break}f>=0?(a=i[f],i.splice(f,1)):l&&(a=this.data.columns.find((o=>o.name===t.column)));const u=o.cells[t.column];let h;if(!u)return null;u.isEditable=!0,this.kupManager.objects.isEmptyKupObj(u.obj)||this.kupManager.debug.isDebug()&&(h=u.obj.t+"; "+u.obj.p+"; "+u.obj.k+";");const d={cell:u,column:a,component:this,editable:!0,renderKup:!0,row:o,setSizes:!0,shape:t.shape},p=t.label||a.title;switch(function(){u.data||(u.data={});try{delete u.data.label}catch(t){}try{delete u.data.data["kup-text-field"].label}catch(t){}}(),null===(r=l.label)||void 0===r?void 0:r.placement){case b.BOTTOM:return[e("tr",null,g()),e("tr",null,k(p))];case b.PLACEHOLDER:!function(){switch(v.ketchup.data.cell.getType(u,u.shape||a.shape||null)){case c.AUTOCOMPLETE:case c.COLOR_PICKER:case c.COMBOBOX:case c.DATE:case c.DATETIME:case c.TIME:u.data.data&&u.data.data["kup-text-field"]?u.data.data["kup-text-field"].label=a.title:u.data.data={"kup-text-field":{label:a.title}};break;case c.CHECKBOX:case c.NUMBER:case c.STRING:case c.SWITCH:u.data.label=a.title}}();case b.HIDDEN:return l?[g()]:[e("tr",null,g())];case b.RIGHT:return l?[g(),k(p)]:[e("tr",null,g(),k(p))];case b.TOP:return[e("tr",null,k(p)),e("tr",null,g())];default:return l?[k(p),g()]:[e("tr",null,k(p),g())]}function g(){return e("td",{"data-cell":u,"data-row":o,"data-column":t.column,class:n,style:s,title:h},u&&a?e(m,Object.assign({},d)):e("span",null,t.value))}function k(t){var o,i,r;const n=(null===(o=null==l?void 0:l.label)||void 0===o?void 0:o.alignment)||_.LEFT,s={width:(null===(i=null==l?void 0:l.label)||void 0===i?void 0:i.width)?null===(r=null==l?void 0:l.label)||void 0===r?void 0:r.width:""};return e("td",{class:`form__label form__label--${n}`,style:s},e("span",null,t))}}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this),this.onDataChanged()}componentDidLoad(){this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){const t=this.rootElement.shadowRoot;if(t){const o=t.querySelectorAll(".f-text-field");for(let t=0;t<o.length;t++)h(o[t])}this.kupManager.debug.logRender(this,!0)}render(){let t=null;if(0===this.data.rows.length)t=e("p",null,this.kupManager.language.translate(f.EMPTY_DATA));else{const o=this.data.rows;let e=o.length,i=0;for(t=[];e-- >0;)t.push(this.renderRow(o[i++]))}return e(i,null,e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{id:u},t))}disconnectedCallback(){this.kupManager.language.unregister(this),this.kupManager.theme.unregister(this)}get rootElement(){return l(this)}static get watchers(){return{data:["onDataChanged"],layout:["onLayoutChanged"]}}};g.style=":host{--kup_form_background_color:var(\n --kup-form-background-color,\n var(--kup-background-color)\n );--kup_form_color:var(--kup-form-color, var(--kup-text-color));--kup_form_font_family:var(--kup-form-font-family, var(--kup-font-family));--kup_form_font_size:var(--kup-form-font-size, var(--kup-font-size));--kup_form_label_alignment:var(--kup-form-label-alignment);--kup_form_label_width:var(--kup-form-label-width);display:block;font-family:var(--kup_form_font_family);font-size:var(--kup_form_font_size)}.form{background:var(--kup_form_background_color);color:var(--kup_form_color);display:flex;flex-grow:1;overflow:auto;padding:1em 0;position:relative}.form--column{flex-direction:column}.form__section{display:flex;flex:1 1 1%;flex-direction:row;flex-wrap:wrap}.form__section--column{flex-direction:column;flex-wrap:unset}.form__section--column>.form__section{flex:0 0 auto}.form__section--grid{display:grid}.form__section--titled{border:1px solid var(--kup-border-color);padding-top:5px;position:relative;margin:10px}.form__section--titled>h3{background:var(--kup-background-color);font-size:calc(var(--kup-font-size) * 1.15);position:absolute;margin:0px;padding:0 8px;top:-11px;left:5px;transition:background-color 0.25s ease}.form__section--left .form__label{width:var(--kup_form_label_width, 0)}.form__section--right .form__field{min-width:200px;width:0}.form__label{-webkit-font-smoothing:antialiased;box-sizing:border-box;font-size:0.875em;letter-spacing:0.0178571429em;white-space:nowrap;width:var(--kup_form_label_width)}.form__label--center{text-align:var(--kup_form_label_alignment, center)}.form__label--left{text-align:var(--kup_form_label_alignment, left)}.form__label--right{text-align:var(--kup_form_label_alignment, right)}.form__field{min-height:16px}.form__field img{height:auto}.form__submit{height:0;opacity:0;overflow:hidden;position:absolute;width:0}.form .f-cell.c-right-aligned:not(.c-centered) .f-cell__content{justify-content:flex-start}";export{g as kup_form}
@@ -1 +1 @@
1
- import{aj as e,ak as c,b as t,al as a,am as s,an as n,ag as l,ao as i,ap as r,ad as u,aq as o}from"./p-b8c921ee.js";import{h as p}from"./p-b0b3989b.js";import{F as b}from"./p-5552f156.js";import{F as k}from"./p-bfe88b03.js";import{F as d}from"./p-0cf10db0.js";import{a as h}from"./p-b705be3b.js";const f=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))),m=document.documentElement,j=(n,r)=>{const j=n.cell,v=n.column,_=n.row,x=n.shape?n.shape:j.shape?j.shape:v.shape?v.shape:null,$=!m.ketchup.objects.isEmptyKupObj(j.obj),y=!(!j.isEditable||!n.editable),C=n.previousValue!==j.value?j.value:"",z=m.ketchup.data.cell.getType(j,x),F=Object.assign({},j.data);let V=j.cssClass?j.cssClass:v.cssClass?v.cssClass:"";const H={"f-cell":!0,[i.OBJ]:!!$,[z+"-cell"]:!0,[n.wrapperClass]:!!n.wrapperClass,[n.density]:!(!n.density||z===a.BAR),[V]:!!V};let I=C;y&&e.includes(z)?I=function(e,c,t,s,n){switch(e){case a.AUTOCOMPLETE:return p("kup-autocomplete",Object.assign({initialValue:t.value},t.data,{class:O(n)?"kup-full-width":"","onkup-autocomplete-change":c=>w(c,n,e,o.UPDATE),"onkup-autocomplete-input":c=>w(c,n,e,o.INPUT),"onkup-autocomplete-iconclick":c=>w(c,n,e,o.ICON_CLICK)}));case a.CHECKBOX:return g(n)&&(c[i.C_CENTERED]=!0),p(b,Object.assign({},t.data,{onChange:c=>w(c,n,e,o.UPDATE)}));case a.COLOR_PICKER:return p("kup-color-picker",Object.assign({initialValue:t.value},t.data,{class:O(n)?"kup-full-width":"",disabled:!1,"onkup-colorpicker-change":c=>w(c,n,e,o.UPDATE)}));case a.COMBOBOX:return p("kup-combobox",Object.assign({initialValue:t.value},t.data,{class:O(n)?"kup-full-width":"","onkup-combobox-change":c=>w(c,n,e,o.UPDATE),"onkup-combobox-input":c=>w(c,n,e,o.INPUT),"onkup-combobox-iconclick":c=>w(c,n,e,o.ICON_CLICK)}));case a.DATE:return p("kup-date-picker",Object.assign({initialValue:t.value},t.data,{class:O(n)?"kup-full-width":"","onkup-datepicker-change":c=>w(c,n,e,o.UPDATE),"onkup-datepicker-input":c=>w(c,n,e,o.INPUT)}));case a.RATING:return p("kup-rating",Object.assign({},t.data,{disabled:!1,"onkup-rating-click":c=>w(c,n,e,o.UPDATE)}));case a.SWITCH:return p(f,Object.assign({},t.data,{disabled:!1,onChange:c=>w(c,n,e,o.UPDATE)}));case a.TIME:return p("kup-time-picker",Object.assign({initialValue:t.value},t.data,{class:O(n)?"kup-full-width":"","onkup-timepicker-change":c=>w(c,n,e,o.UPDATE),"onkup-timepicker-input":c=>w(c,n,e,o.INPUT)}));case a.NUMBER:c[i.C_RIGHT_ALIGNED]=!0;case a.STRING:return p(k,Object.assign({inputType:e===a.NUMBER?"number":null,fullWidth:!!O(n)},t.data,{icon:t.icon?t.icon:s.icon?s.icon:null,value:e===a.NUMBER?l(t.value).toString():t.value,onChange:c=>w(c,n,e,o.UPDATE),onInput:c=>w(c,n,e,o.INPUT),onIconClick:c=>w(c,n,e,o.ICON_CLICK)}))}}(z,H,j,v,n):j.data&&c.includes(z)?(n.setSizes&&function(e,c,t){switch(e){case a.BAR:c.sizeY||(c.sizeY="26px");break;case a.BUTTON:let e="";c.label&&(e="36px"),t.style?t.style.height||(t.style.minHeight=e):t.style={minHeight:e};break;case a.CHART:c.sizeX||(c.sizeX="100%"),c.sizeY||(c.sizeY="100%");break;case a.CHIP:case a.RADIO:t.style?t.style.height||(t.style.minHeight="40px"):t.style={minHeight:"40px"}}}(z,F,j),I=n.renderKup?function(e,c,t,s,n,r,u){switch(e){case a.BAR:return t.data?p("div",{style:{height:t.sizeY,width:"100%"}},p(d,Object.assign({},t))):p("kup-image",Object.assign({},t));case a.BUTTON:return g(u)&&(c[i.C_CENTERED]=!0),p("kup-button",Object.assign({},t,{"onkup-button-click":c=>w(c,u,e,o.CLICK)}));case a.BUTTON_LIST:return g(u)&&(c[i.C_CENTERED]=!0),t["data-storage"]={cell:s,row:n,column:r},p("kup-button-list",Object.assign({},t));case a.CHART:return g(u)&&(c[i.C_CENTERED]=!0),p("kup-chart",Object.assign({},t));case a.CHIP:return p(h,Object.assign({},t));case a.COLOR_PICKER:return p("kup-color-picker",Object.assign({},t,{class:O(u)?"kup-full-width":"",disabled:!0}));case a.GAUGE:return p("kup-gauge",Object.assign({value:l(s.value),"width-component":"280px"},t));case a.KNOB:case a.PROGRESS_BAR:return p("kup-progress-bar",Object.assign({},t));case a.RADIO:return g(u)&&(c[i.C_CENTERED]=!0),t.disabled=n.readOnly,p("kup-radio",Object.assign({},t));case a.RATING:return p("kup-rating",Object.assign({},t,{disabled:!0}))}}(z,H,F,j,_,v,n):p("span",{class:"cell-"+z+" placeholder"})):(n.setSizes&&function(e,c,t,n){switch(e){case a.CHECKBOX:case a.ICON:c.sizeX||(c.sizeX="18px"),c.sizeY||(c.sizeY="18px"),t.style?t.style.height||(t.style.minHeight=c.sizeY):t.style={minHeight:c.sizeY};break;case a.IMAGE:n.component.rootElement.tagName===s.BOX?(c.sizeY||(c.sizeY="auto"),void 0===c.fit&&(c.fit=!0)):c.sizeX||(c.sizeX="auto"),c.sizeY||(c.sizeY="64px")}}(z,F,j,n),I=function(e,c,t,s,n,r,o){switch(e){case a.AUTOCOMPLETE:case a.COMBOBOX:case a.DATE:case a.DATETIME:case a.TIME:if(t&&""!=t){const e=u(r,n);return p("div",{class:"f-cell__text"},e)}return t;case a.CHECKBOX:return g(o)&&(s[i.C_CENTERED]=!0),p(d,{resource:c.checked?"check_box":"check_box_outline_blank",sizeX:"18px",sizeY:"18px"});case a.EDITOR:return p("div",{innerHTML:n.value});case a.ICON:case a.IMAGE:return g(o)&&(s[i.C_CENTERED]=!0),c.badgeData&&(s[i.C_PADDED]=!0),p(d,Object.assign({},c));case a.LINK:return p("a",{href:t,target:"_blank"},n.value);case a.NUMBER:if(t&&""!=t){const e=l(n.value),c=u(r,n);return e<0&&(s[i.TEXT_DANGER]=!0),g(o)&&(s[i.C_RIGHT_ALIGNED]=!0),p("div",{class:"f-cell__text"},c)}return p("div",{class:"f-cell__text"},t);case a.SWITCH:return g(o)&&(s[i.C_CENTERED]=!0),c.disabled=!0,p(f,Object.assign({},c));default:return p("div",{class:"f-cell__text"},t)}}(z,F,I,H,j,v,n));let T=null;!y&&(v.icon||j.icon)&&I&&(T=p(d,Object.assign({},{color:`rgba(var(${t.TEXT}-rgb), 0.375)`,resource:j.icon?j.icon:v.icon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"obj-icon"})));let X=null;m.ketchup.debug.isDebug()&&$?X=j.obj.t+"; "+j.obj.p+"; "+j.obj.k+";":null!=j.title&&""!=j.title.trim()&&(X=j.title);let Y=null;if(j.info){const e=Object.assign({},j.info);e.color||(e.color=`var(${t.INFO})`),e.icon||(e.icon="info"),Y=p(d,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",{class:H,"kup-get-cell-props":()=>n,style:j.style},p("div",{class:"f-cell__content",style:j.styleContent,title:X},r&&r.length>0?r:[n.indents,Y,T,I]))};function w(e,c,t,s){const n=c.cell,l=c.column,i=c.component,r=c.row;let p="INPUT"===e.target.tagName?e.target.value:e.detail.value;if(s===o.UPDATE){switch(t){case a.AUTOCOMPLETE:case a.COMBOBOX:case a.DATE:case a.TIME:n.data&&(n.data.initialValue=p);break;case a.CHECKBOX:case a.SWITCH:p="on"===p?"0":"1",n.data&&(n.data.checked="0"!==p)}n.obj&&(n.obj.k=p.toString()),n.value=p.toString(),n.displayedValue=null,n.displayedValue=u(l,n)}if(i&&i.rootElement){const c=new CustomEvent(s,{bubbles:!0,cancelable:!0,composed:!0,detail:{comp:i,id:i.rootElement.id,cell:n,column:l,event:e,row:r,type:t}});i.rootElement.dispatchEvent(c);try{i.refresh()}catch(e){}}}function g(e){return r.includes(e.component.rootElement.tagName)}function O(e){return n.includes(e.component.rootElement.tagName)}export{j as F,f as a}
1
+ import{ak as e,al as c,b as t,am as a,an as s,ao as n,ah as l,ap as i,aq as r,ae as u,ar as o}from"./p-c05f2638.js";import{h as p}from"./p-b0b3989b.js";import{F as b}from"./p-5552f156.js";import{F as k}from"./p-6f3040fb.js";import{F as d}from"./p-20221a50.js";import{a as h}from"./p-e6ebdb80.js";const f=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))),m=document.documentElement,j=(n,r)=>{const j=n.cell,O=n.column,_=n.row,x=n.shape?n.shape:j.shape?j.shape:O.shape?O.shape:null,$=!m.ketchup.objects.isEmptyKupObj(j.obj),y=!(!j.isEditable||!n.editable),C=n.previousValue!==j.value?j.value:"",z=m.ketchup.data.cell.getType(j,x),F=Object.assign({},j.data);let V=j.cssClass?j.cssClass:O.cssClass?O.cssClass:"";const H={"f-cell":!0,[i.OBJ]:!!$,[z+"-cell"]:!0,[n.wrapperClass]:!!n.wrapperClass,[n.density]:!(!n.density||z===a.BAR),[V]:!!V};let I=C;y&&e.includes(z)?I=function(e,c,t,s,n){switch(e){case a.AUTOCOMPLETE:return p("kup-autocomplete",Object.assign({initialValue:t.value},t.data,{class:g(n)?"kup-full-width":"","onkup-autocomplete-change":c=>v(c,n,e,o.UPDATE),"onkup-autocomplete-input":c=>v(c,n,e,o.INPUT),"onkup-autocomplete-iconclick":c=>v(c,n,e,o.ICON_CLICK)}));case a.CHECKBOX:return w(n)&&(c[i.C_CENTERED]=!0),p(b,Object.assign({},t.data,{onChange:c=>v(c,n,e,o.UPDATE)}));case a.COLOR_PICKER:return p("kup-color-picker",Object.assign({initialValue:t.value},t.data,{class:g(n)?"kup-full-width":"",disabled:!1,"onkup-colorpicker-change":c=>v(c,n,e,o.UPDATE)}));case a.COMBOBOX:return p("kup-combobox",Object.assign({initialValue:t.value},t.data,{class:g(n)?"kup-full-width":"","onkup-combobox-change":c=>v(c,n,e,o.UPDATE),"onkup-combobox-input":c=>v(c,n,e,o.INPUT),"onkup-combobox-iconclick":c=>v(c,n,e,o.ICON_CLICK)}));case a.DATE:return p("kup-date-picker",Object.assign({initialValue:t.value},t.data,{class:g(n)?"kup-full-width":"","onkup-datepicker-change":c=>v(c,n,e,o.UPDATE),"onkup-datepicker-input":c=>v(c,n,e,o.INPUT)}));case a.RATING:return p("kup-rating",Object.assign({},t.data,{disabled:!1,"onkup-rating-click":c=>v(c,n,e,o.UPDATE)}));case a.SWITCH:return p(f,Object.assign({},t.data,{disabled:!1,onChange:c=>v(c,n,e,o.UPDATE)}));case a.TIME:return p("kup-time-picker",Object.assign({initialValue:t.value},t.data,{class:g(n)?"kup-full-width":"","onkup-timepicker-change":c=>v(c,n,e,o.UPDATE),"onkup-timepicker-input":c=>v(c,n,e,o.INPUT)}));case a.NUMBER:c[i.C_RIGHT_ALIGNED]=!0;case a.STRING:return p(k,Object.assign({inputType:e===a.NUMBER?"number":null,fullWidth:!!g(n)},t.data,{icon:t.icon?t.icon:s.icon?s.icon:null,value:e===a.NUMBER?l(t.value).toString():t.value,onChange:c=>v(c,n,e,o.UPDATE),onInput:c=>v(c,n,e,o.INPUT),onIconClick:c=>v(c,n,e,o.ICON_CLICK)}))}}(z,H,j,O,n):j.data&&c.includes(z)?(n.setSizes&&function(e,c,t){switch(e){case a.BAR:c.sizeY||(c.sizeY="26px");break;case a.BUTTON:let e="";c.label&&(e="36px"),t.style?t.style.height||(t.style.minHeight=e):t.style={minHeight:e};break;case a.CHART:c.sizeX||(c.sizeX="100%"),c.sizeY||(c.sizeY="100%");break;case a.CHIP:case a.RADIO:t.style?t.style.height||(t.style.minHeight="40px"):t.style={minHeight:"40px"}}}(z,F,j),I=n.renderKup?function(e,c,t,s,n,r,u){switch(e){case a.BAR:return t.data?p("div",{style:{height:t.sizeY,width:"100%"}},p(d,Object.assign({},t))):p("kup-image",Object.assign({},t));case a.BUTTON:return w(u)&&(c[i.C_CENTERED]=!0),p("kup-button",Object.assign({},t,{"onkup-button-click":c=>v(c,u,e,o.CLICK)}));case a.BUTTON_LIST:return w(u)&&(c[i.C_CENTERED]=!0),t["data-storage"]={cell:s,row:n,column:r},p("kup-button-list",Object.assign({},t));case a.CHART:return w(u)&&(c[i.C_CENTERED]=!0),p("kup-chart",Object.assign({},t));case a.CHIP:return p(h,Object.assign({},t));case a.COLOR_PICKER:return p("kup-color-picker",Object.assign({},t,{class:g(u)?"kup-full-width":"",disabled:!0}));case a.GAUGE:return p("kup-gauge",Object.assign({value:l(s.value),"width-component":"280px"},t));case a.KNOB:case a.PROGRESS_BAR:return p("kup-progress-bar",Object.assign({},t));case a.RADIO:return w(u)&&(c[i.C_CENTERED]=!0),t.disabled=n.readOnly,p("kup-radio",Object.assign({},t));case a.RATING:return p("kup-rating",Object.assign({},t,{disabled:!0}))}}(z,H,F,j,_,O,n):p("span",{class:"cell-"+z+" placeholder"})):(n.setSizes&&function(e,c,t,n){switch(e){case a.CHECKBOX:case a.ICON:c.sizeX||(c.sizeX="18px"),c.sizeY||(c.sizeY="18px"),t.style?t.style.height||(t.style.minHeight=c.sizeY):t.style={minHeight:c.sizeY};break;case a.IMAGE:n.component.rootElement.tagName===s.BOX?(c.sizeY||(c.sizeY="auto"),void 0===c.fit&&(c.fit=!0)):c.sizeX||(c.sizeX="auto"),c.sizeY||(c.sizeY="64px")}}(z,F,j,n),I=function(e,c,t,s,n,r,o){switch(e){case a.AUTOCOMPLETE:case a.COMBOBOX:case a.DATE:case a.DATETIME:case a.TIME:if(t&&""!=t){const e=u(r,n);return p("div",{class:"f-cell__text"},e)}return t;case a.CHECKBOX:return w(o)&&(s[i.C_CENTERED]=!0),p(d,{resource:c.checked?"check_box":"check_box_outline_blank",sizeX:"18px",sizeY:"18px"});case a.EDITOR:return p("div",{innerHTML:n.value});case a.ICON:case a.IMAGE:return w(o)&&(s[i.C_CENTERED]=!0),c.badgeData&&(s[i.C_PADDED]=!0),p(d,Object.assign({},c));case a.LINK:return p("a",{href:t,target:"_blank"},n.value);case a.NUMBER:if(t&&""!=t){const e=l(n.value),c=u(r,n);return e<0&&(s[i.TEXT_DANGER]=!0),w(o)&&(s[i.C_RIGHT_ALIGNED]=!0),p("div",{class:"f-cell__text"},c)}return p("div",{class:"f-cell__text"},t);case a.SWITCH:return w(o)&&(s[i.C_CENTERED]=!0),c.disabled=!0,p(f,Object.assign({},c));default:return p("div",{class:"f-cell__text"},t)}}(z,F,I,H,j,O,n));let T=null;!y&&(O.icon||j.icon)&&I&&(T=p(d,Object.assign({},{color:`rgba(var(${t.TEXT}-rgb), 0.375)`,resource:j.icon?j.icon:O.icon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"obj-icon"})));let X=null;m.ketchup.debug.isDebug()&&$?X=j.obj.t+"; "+j.obj.p+"; "+j.obj.k+";":null!=j.title&&""!=j.title.trim()&&(X=j.title);let Y=null;if(j.info){const e=Object.assign({},j.info);e.color||(e.color=`var(${t.INFO})`),e.icon||(e.icon="info"),Y=p(d,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",{class:H,"kup-get-cell-props":()=>n,style:j.style},p("div",{class:"f-cell__content",style:j.styleContent,title:X},r&&r.length>0?r:[n.indents,Y,T,I]))};function v(e,c,t,s){const n=c.cell,l=c.column,i=c.component,r=c.row;let p="INPUT"===e.target.tagName?e.target.value:e.detail.value;if(s===o.UPDATE){switch(t){case a.AUTOCOMPLETE:case a.COMBOBOX:case a.DATE:case a.TIME:n.data&&(n.data.initialValue=p);break;case a.CHECKBOX:case a.SWITCH:p="on"===p?"0":"1",n.data&&(n.data.checked="0"!==p)}n.obj&&(n.obj.k=p.toString()),n.value=p.toString(),n.displayedValue=null,n.displayedValue=u(l,n)}if(i&&i.rootElement){const c=new CustomEvent(s,{bubbles:!0,cancelable:!0,composed:!0,detail:{comp:i,id:i.rootElement.id,cell:n,column:l,event:e,row:r,type:t}});i.rootElement.dispatchEvent(c);try{i.refresh()}catch(e){}}}function w(e){var c;return r.includes(null===(c=e.component)||void 0===c?void 0:c.rootElement.tagName)}function g(e){var c;return n.includes(null===(c=e.component)||void 0===c?void 0:c.rootElement.tagName)}export{j as F,f as a}
@@ -1 +1 @@
1
- import{h as c}from"./p-b0b3989b.js";import{F as i}from"./p-0cf10db0.js";import{K as s,j as e,b as n}from"./p-b8c921ee.js";var p;!function(c){c.CHOICE="choice",c.FILTER="filter",c.INPUT="input",c.STANDARD="standard"}(p||(p={}));const l=document.documentElement,a=a=>{a.type||(a.type=p.STANDARD);const r=a.type.toLowerCase()===p.CHOICE,t=a.type.toLowerCase()===p.FILTER,o=a.type.toLowerCase()===p.INPUT,d={"chip-set":!0,"chip-set--choice":!!r,"chip-set--filter":!!t,"chip-set--input":!!o};return c("div",Object.assign({class:`f-chip ${a.danger?"kup-danger":""} ${a.info?"kup-info":""} ${a.secondary?"kup-secondary":""} ${a.success?"kup-success":""} ${a.warning?"kup-warning":""} ${a.wrapperClass?a.wrapperClass:""}`},a.dataSet,{id:a.id,title:a.title}),c("div",{class:d,role:"grid"},function(p,a,r,t){const o=[];for(let u=0;p.data&&u<p.data.length;u++){const _=[];function d(n,a){const r=!!(n.children&&n.children.length>0),t=!(!r||!n.isExpanded),o={"--kup_chip_indent_offset":a.toString()};if(_.push(c("div",{class:"chip-set__wrapper "+(r&&!t?"chip-set__wrapper--hidden-children":"")},c("div",{class:"chip-set__indent",style:o}),r?c(i,{onClick:p.onExpansionClick&&p.onExpansionClick[u]?p.onExpansionClick[u].bind(p.onExpansionClick[u],n):null,resource:`${s.DROPDOWN}`,sizeX:"18px",sizeY:"18px",title:l.ketchup.language.translate(e.EXPAND)+"/"+l.ketchup.language.translate(e.COLLAPSE)+" (CTRL + Click)",wrapperClass:"dropdown-icon"}):a?c(i,{resource:"blank",sizeX:"18px",sizeY:"18px",wrapperClass:"dropdown-icon"}):null,h(n))),t)for(let c=0;c<n.children.length;c++)n.children[c]&&d(n.children[c],a+1)}function h(e){let l="chip "+(e.icon&&!e.value?"chip--only-icon":""),o=[],d="chip__icon chip__icon--leading";return(r||a)&&e.checked&&(l+=" chip--selected",r&&(d+=" chip__icon--leading-hidden")),e.icon&&o.push(c(i,Object.assign({},{color:a&&e.checked?`var(${n.PRIMARY})`:`var(${n.TEXT})`,resource:e.icon,sizeX:"18px",sizeY:"18px",wrapperClass:d}))),r&&o.push(c("span",{class:"chip__checkmark"},c("svg",{class:"chip__checkmark-svg",viewBox:"-2 -3 30 30"},c("path",{class:"chip__checkmark-path",fill:"none",stroke:"black",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})))),c("div",{class:l,"data-value":e.id,onClick:p.onClick&&p.onClick[u]?p.onClick[u].bind(p.onClick[u],e):null,role:"row",title:e.title?e.title:""},c("span",{class:"chip-set__indent"}),o,c("span",{role:"gridcell"},c("span",{role:"button",tabindex:u,class:"chip__primary-action",value:e.id,checked:e.checked,onBlur:p.onBlur&&p.onBlur[u]?p.onBlur[u].bind(p.onBlur[u],e):null,onFocus:p.onFocus&&p.onFocus[u]?p.onFocus[u].bind(p.onFocus[u],e):null},c("span",{class:"chip__text"},e.value))),t?c("span",{role:"gridcell"},c("span",{tabindex:"-1",class:`kup-icon chip__icon ${s.CLEAR.replace("--","")}`,onClick:p.onIconClick&&p.onIconClick[u]?p.onIconClick[u].bind(p.onIconClick[u],e):null})):null)}d(p.data[u],0),o.push(c("div",{class:"chip-set__item"},..._))}return o}(a,r,t,o)))};export{p as F,a}
1
+ import{h as c}from"./p-b0b3989b.js";import{F as i}from"./p-20221a50.js";import{K as s,l as e,b as n}from"./p-c05f2638.js";var p;!function(c){c.CHOICE="choice",c.FILTER="filter",c.INPUT="input",c.STANDARD="standard"}(p||(p={}));const l=document.documentElement,a=a=>{a.type||(a.type=p.STANDARD);const r=a.type.toLowerCase()===p.CHOICE,t=a.type.toLowerCase()===p.FILTER,o=a.type.toLowerCase()===p.INPUT,d={"chip-set":!0,"chip-set--choice":!!r,"chip-set--filter":!!t,"chip-set--input":!!o};return c("div",Object.assign({class:`f-chip ${a.danger?"kup-danger":""} ${a.info?"kup-info":""} ${a.secondary?"kup-secondary":""} ${a.success?"kup-success":""} ${a.warning?"kup-warning":""} ${a.wrapperClass?a.wrapperClass:""}`},a.dataSet,{id:a.id,title:a.title}),c("div",{class:d,role:"grid"},function(p,a,r,t){const o=[];for(let u=0;p.data&&u<p.data.length;u++){const _=[];function d(n,a){const r=!!(n.children&&n.children.length>0),t=!(!r||!n.isExpanded),o={"--kup_chip_indent_offset":a.toString()};if(_.push(c("div",{class:"chip-set__wrapper "+(r&&!t?"chip-set__wrapper--hidden-children":"")},c("div",{class:"chip-set__indent",style:o}),r?c(i,{onClick:p.onExpansionClick&&p.onExpansionClick[u]?p.onExpansionClick[u].bind(p.onExpansionClick[u],n):null,resource:`${s.DROPDOWN}`,sizeX:"18px",sizeY:"18px",title:l.ketchup.language.translate(e.EXPAND)+"/"+l.ketchup.language.translate(e.COLLAPSE)+" (CTRL + Click)",wrapperClass:"dropdown-icon"}):a?c(i,{resource:"blank",sizeX:"18px",sizeY:"18px",wrapperClass:"dropdown-icon"}):null,h(n))),t)for(let c=0;c<n.children.length;c++)n.children[c]&&d(n.children[c],a+1)}function h(e){let l="chip "+(e.icon&&!e.value?"chip--only-icon":""),o=[],d="chip__icon chip__icon--leading";return(r||a)&&e.checked&&(l+=" chip--selected",r&&(d+=" chip__icon--leading-hidden")),e.icon&&o.push(c(i,Object.assign({},{color:a&&e.checked?`var(${n.PRIMARY})`:`var(${n.TEXT})`,resource:e.icon,sizeX:"18px",sizeY:"18px",wrapperClass:d}))),r&&o.push(c("span",{class:"chip__checkmark"},c("svg",{class:"chip__checkmark-svg",viewBox:"-2 -3 30 30"},c("path",{class:"chip__checkmark-path",fill:"none",stroke:"black",d:"M1.73,12.91 8.1,19.28 22.79,4.59"})))),c("div",{class:l,"data-value":e.id,onClick:p.onClick&&p.onClick[u]?p.onClick[u].bind(p.onClick[u],e):null,role:"row",title:e.title?e.title:""},c("span",{class:"chip-set__indent"}),o,c("span",{role:"gridcell"},c("span",{role:"button",tabindex:u,class:"chip__primary-action",value:e.id,checked:e.checked,onBlur:p.onBlur&&p.onBlur[u]?p.onBlur[u].bind(p.onBlur[u],e):null,onFocus:p.onFocus&&p.onFocus[u]?p.onFocus[u].bind(p.onFocus[u],e):null},c("span",{class:"chip__text"},e.value))),t?c("span",{role:"gridcell"},c("span",{tabindex:"-1",class:`kup-icon chip__icon ${s.CLEAR.replace("--","")}`,onClick:p.onIconClick&&p.onIconClick[u]?p.onIconClick[u].bind(p.onIconClick[u],e):null})):null)}d(p.data[u],0),o.push(c("div",{class:"chip-set__item"},..._))}return o}(a,r,t,o)))};export{p as F,a}
@@ -1 +1 @@
1
- import{r as t,c as n,h as i,g as a,f as e,H as l}from"./p-b0b3989b.js";import{k as s,g as o,s as d,c as r}from"./p-b8c921ee.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 o(this,g,t)}async refresh(){e(this)}async setProps(t){d(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!",r.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
+ import{r as t,c as n,h as i,g as a,f as e,H as l}from"./p-b0b3989b.js";import{k as s,g as o,s as d,c as r}from"./p-c05f2638.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 o(this,g,t)}async refresh(){e(this)}async setProps(t){d(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!",r.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 t,f as s,h as i,H as e,g as h}from"./p-b0b3989b.js";import{I as o,k as n,g as r,s as l,R as a,j as c}from"./p-b8c921ee.js";import{c as d}from"./p-97e8ea42.js";import{F as p}from"./p-0986ad5d.js";import"./p-5552f156.js";import"./p-bfe88b03.js";import"./p-0cf10db0.js";import"./p-b705be3b.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 r(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},a.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}
1
+ import{r as t,f as s,h as i,H as e,g as h}from"./p-b0b3989b.js";import{d as o,k as n,g as r,s as l,U as a,l as c}from"./p-c05f2638.js";import{c as d}from"./p-97e8ea42.js";import{F as p}from"./p-e07a10fb.js";import"./p-5552f156.js";import"./p-6f3040fb.js";import"./p-20221a50.js";import"./p-e6ebdb80.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 r(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},a.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 r,H as a,g as l}from"./p-b0b3989b.js";import{F as o}from"./p-62421bcf.js";import{F as s}from"./p-6c77a36c.js";import{F as _}from"./p-20221a50.js";import{k as n,g as m,s as f,l as h,O as c}from"./p-c05f2638.js";import{c as u}from"./p-97e8ea42.js";var p;!function(t){t.autofitOnExpand="The component will autofit everytime a node is expanded.",t.autofitOnLoad="The component's initial render will fit the container by invoking the runAutofit method.",t.cardData="Used to render the family tree boxes as kup-cards (through kup-box).",t.collapsible="Nodes can be expanded/collapsed.",t.customStyle="Custom style of the component.",t.data="Actual data of the component",t.layout="Layout of the boxes.",t.stackedLeaves="Child nodes that have no children are arranged vertically."}(p||(p={}));var d,y,k,v,g,b,x,w,j,C,E,T,W,M,S,z,O,D,L,P,A,F,R,X,Y,H,$=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)},B=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 N=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.autofitOnExpand=!0,this.autofitOnLoad=!0,this.cardData=null,this.collapsible=!0,this.customStyle="",this.data=null,this.layout=null,this.stackedLeaves=!1,y.set(this,[]),k.set(this,!1),v.set(this,0),g.set(this,0),b.set(this,[]),x.set(this,n()),w.set(this,(t=>{const e=t.clientX-$(this,v,"f"),i=t.clientY-$(this,g,"f");this.rootElement.scrollTop-=i,this.rootElement.scrollLeft-=e,B(this,v,t.clientX,"f"),B(this,g,t.clientY,"f")})),j.set(this,!1),C.set(this,null)}async collapseAll(t=this.data.rows){$(this,x,"f").data.node.setProperties(t,{isExpanded:!1},!0),this.refresh()}async expandAll(t=this.data.rows){$(this,x,"f").data.node.setProperties(t,{isExpanded:!0},!0),this.refresh()}async getProps(t){return m(this,p,t)}async refresh(){i(this)}async runAutofit(){const t=$(this,C,"f").clientWidth,e=$(this,C,"f").children[0].clientWidth,i=.01,r=.85*t,a=.95*t;let l=1,o=2e3,s=e;for(;(s<r||s>a)&&o>0&&l>i;)o--,s<r?l+=i:s>a?l-=i:o=0,s=e*l;$(this,C,"f").style.setProperty("--kup_familytree_scale",l<=1?l.toFixed(2):"1")}async setProps(t){f(this,p,t)}componentWillLoad(){$(this,x,"f").debug.logLoad(this,!1),$(this,x,"f").language.register(this),$(this,x,"f").theme.register(this)}componentDidLoad(){$(this,d,"m",Y).call(this),this.autofitOnLoad&&this.runAutofit(),$(this,x,"f").debug.logLoad(this,!0)}componentWillRender(){$(this,x,"f").debug.logRender(this,!1)}componentDidRender(){$(this,j,"f")&&(B(this,j,!1,"f"),this.runAutofit()),$(this,x,"f").debug.logRender(this,!0)}render(){return r(a,{onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault(),$(this,d,"m",L).call(this,t)},onWheel:t=>{$(this,d,"m",H).call(this,t)}},r("style",null,$(this,x,"f").theme.setKupStyle(this.rootElement)),r("div",{id:u},$(this,d,"m",O).call(this)))}disconnectedCallback(){$(this,x,"f").language.unregister(this),$(this,x,"f").theme.unregister(this)}get rootElement(){return l(this)}};y=new WeakMap,k=new WeakMap,v=new WeakMap,g=new WeakMap,b=new WeakMap,x=new WeakMap,w=new WeakMap,j=new WeakMap,C=new WeakMap,d=new WeakSet,E=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},T=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 _=this.stackedLeaves&&a&&a.every((t=>!t.children||0==t.children.length)),n=a?2*a.length:1,m={"family-tree__line":!0,"family-tree__line--placeholder":!(!a&&!l),"family-tree__line--vertical":!(!a&&!l)},f={columns:[{name:"*TREECOL",title:"Fake column",visible:!1},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]},c=e.layout||this.layout||1,u={icon:e.isExpanded?"remove":"plus",shaped:!0,slim:!0,styling:s.OUTLINED,title:`${$(this,x,"f").language.translate(h.EXPAND)}/${$(this,x,"f").language.translate(h.COLLAPSE)} (CTRL + Click)`,onClick:t=>{t.ctrlKey&&e.children&&e.children.length>0&&(e.isExpanded?this.collapseAll(e.children):this.expandAll(e.children)),e.isExpanded=!e.isExpanded,this.autofitOnExpand&&B(this,j,!0,"f"),this.refresh()},wrapperClass:"family-tree__item__expand"};let p=null;$(this,d,"m",D).call(this,c)&&(p=r("kup-box",{class:"kup-borderless kup-paddingless",customStyle:"#kup-component { background: var(--kup_familytree_item_background_color); border: 2px solid var(--kup_familytree_lines_color); box-sizing: border-box; height: var(--kup_familytree_item_height); padding: 0 var(--kup_familytree_item_h_padding); } #kup-component .box-component { background: var(--kup_familytree_item_background_color); box-sizing: border-box; height: 100%;} #kup-component .f-cell__text { color: var(--kup_familytree_item_color); }",data:f,cardData:this.cardData,layout:this.cardData?null:c,showSelection:!1}));const y=r("div",{class:"family-tree__item"},r("div",{class:"family-tree__item__wrapper"},$(this,d,"m",D).call(this,c)?p:$(this,d,"m",W).call(this,e,c),this.collapsible&&e.children&&e.children.length>0?r(o,Object.assign({},u)):void 0)),k={"--kup_familytree_staffchildren":(null==l?void 0:l.length.toString())||"0"};return r("table",{class:{"family-tree__node":!0,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||0==e.children.length)}},r("tr",null,r("td",{"data-row":e,colSpan:n},y)),r("tr",null,r("td",{colSpan:n},r("div",{class:m}))),l?[r("tr",null,r("td",{colSpan:n},r("div",{class:Object.assign(Object.assign({},m),{"family-tree__line--staff":!0}),style:k}),r("div",{class:"family-tree__node__staff",style:k},l.map((e=>[r("div",{class:"family-tree__node__staff__item"},$(this,d,"m",t).call(this,e))])))))]:null,l&&a?[r("tr",null,r("td",{colSpan:n},r("div",{class:m})))]:null,a?[r("tr",null,_?r("td",{colSpan:n},r("div",{class:m})):a.map((t=>$(this,d,"m",E).call(this,0==a.indexOf(t),a.indexOf(t)==a.length-1,1==a.length,a.length>2)))),r("tr",null,_?r("td",{colSpan:n},a.map((e=>$(this,d,"m",t).call(this,e)))):a.map((e=>r("td",{colSpan:2},$(this,d,"m",t).call(this,e)))))]:void 0)},W=function(t,e){switch(e){case 2:return $(this,d,"m",S).call(this,t);default:return $(this,d,"m",M).call(this,t)}},M=function(t){return r("div",{class:"family-tree__item__layout family-tree__item__layout--1"},r("div",{class:"family-tree__item__layout__text__title"},t.value))},S=function(t){return r("div",{class:"family-tree__item__layout family-tree__item__layout--2"},r("div",{class:"family-tree__item__layout__color"}),r("div",{class:"family-tree__item__layout__image"},r(_,{resource:t.icon,sizeX:"48px",sizeY:"48px"})),r("div",{class:"family-tree__item__layout__text"},r("div",{class:"family-tree__item__layout__text__title"},t.value),t.title?r("div",{class:"family-tree__item__layout__text__subtitle"},t.title):null))},z=function(t){return t.map((t=>$(this,d,"m",T).call(this,t)))},O=function(){return r("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>B(this,C,t,"f")},this.data&&this.data.rows&&this.data.rows.length?$(this,d,"m",z).call(this,this.data.rows):r("div",null,$(this,x,"f").language.translate(h.EMPTY_DATA)))},D=function(t){return!!this.cardData||t&&t.sections&&t.sections.length>0},L=function(t){B(this,v,t.clientX,"f"),B(this,g,t.clientY,"f"),$(this,C,"f").classList.add("family-tree--dragging");const e=()=>{document.removeEventListener("pointermove",$(this,w,"f")),document.removeEventListener("pointerup",e),$(this,C,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",$(this,w,"f")),document.addEventListener("pointerup",e)},P=function(t){const e=[];for(;t&&t!==this.rootElement&&t!==document.body;)e.push(t),t=t.parentNode?t.parentNode:t.host;return e},A=function(t,e){let i,r;if(t)for(let e=t.length-1;e>=0;e--){const a=t[e];if(a.tagName)switch(a.classList.contains("family-tree__item__expand")&&(i=a),a.tagName.toUpperCase()){case"TD":r=a}}let a=null,l=null,o=null;return r&&(a=r["data-cell"],l=r["data-column"],o=r["data-row"]),{cell:a||null,column:l||null,expandButton:i||null,originalEvent:e,row:o||null,td:r||null}},F=function(t){return $(this,d,"m",A).call(this,$(this,d,"m",P).call(this,t.target),t)},R=function(t){return $(this,d,"m",A).call(this,$(this,d,"m",P).call(this,t.target),t)},X=function(t){return $(this,d,"m",A).call(this,$(this,d,"m",P).call(this,t.target),t)},Y=function(){$(this,b,"f").push(this.rootElement),$(this,x,"f").interact.on(this.rootElement,c.TAP,(t=>{if($(this,k,"f"))B(this,k,!1,"f");else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];$(this,y,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:$(this,d,"m",F).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:$(this,d,"m",R).call(this,t)})}})),$(this,x,"f").interact.on(this.rootElement,c.DOUBLETAP,(t=>{switch(t.button){case 0:for(let t=0;t<$(this,y,"f").length;t++)clearTimeout($(this,y,"f")[t]),$(this,x,"f").debug.logMessage(this,"Cleared clickHandler timeout("+$(this,y,"f")[t]+").");B(this,y,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:$(this,d,"m",X).call(this,t)})}})),$(this,x,"f").interact.on(this.rootElement,c.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||(B(this,k,!0,"f"),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:$(this,d,"m",R).call(this,t)}))}))},H=function(t){if(t.ctrlKey){t.preventDefault();const e=parseFloat($(this,C,"f").style.getPropertyValue("--kup_familytree_scale"))||1,i=.05;let r=t.deltaY>0?e-i:e+i;r<i&&(r=i),$(this,C,"f").style.setProperty("--kup_familytree_scale",r.toFixed(2))}},N.style=':host{--kup_familytree_item_background_color:var(\n --kup-familytree-item-background-color,\n var(--kup-background-color)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-color)\n );--kup_familytree_item_height:var(--kup-familytree-item-height, 80px);--kup_familytree_item_h_padding:var(--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, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-color)\n );display:block;overflow:hidden}.family-tree{cursor:grab;display:flex;transform:scale(var(--kup_familytree_scale, 1));transform-origin:0px 0px}.family-tree--dragging{cursor:grabbing}.family-tree__node{border-collapse:collapse;margin:auto}.family-tree__node--stacked{margin-bottom:4px}.family-tree__node__staff{align-items:center;display:flex;flex-direction:column;height:0;transform:translateX(calc( ( var(--kup_familytree_item_width) + (var(--kup_familytree_item_h_padding) * 2) ) / 2 )) translateY(calc( 0px - ( var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * (var(--kup_familytree_item_v_padding) * 2) ) ))}.family-tree__node__staff__item{padding:var(--kup_familytree_item_v_padding);text-align:left}.family-tree__node__staff__item:before{border-top:2px solid var(--kup_familytree_lines_color);content:"";position:absolute;transform:translateX(calc(100% + 2px)) translateY(calc(var(--kup_familytree_item_height) / 2));width:var(--kup_familytree_item_h_padding)}.family-tree__node td{vertical-align:top;padding:0}.family-tree__line--left{border-left:2px solid var(--kup_familytree_lines_color)}.family-tree__line--placeholder{height:calc(var(--kup_familytree_item_height) / 2)}.family-tree__line--staff{height:calc( var(--kup_familytree_staffchildren) * var(--kup_familytree_item_height) + var(--kup_familytree_staffchildren) * (var(--kup_familytree_item_v_padding) * 2) )}.family-tree__line--right{border-right:2px solid var(--kup_familytree_lines_color)}.family-tree__line--top{border-top:2px solid var(--kup_familytree_lines_color)}.family-tree__line--vertical{background-color:var(--kup_familytree_lines_color);margin-left:auto;margin-right:auto;width:2px}.family-tree__item{display:flex}.family-tree__item__wrapper{margin:auto}.family-tree__item__wrapper kup-box{margin:0 auto;overflow:hidden;padding:0 18px;width:var(--kup_familytree_item_width);z-index:1}.family-tree__item__wrapper .f-button{--kup-button-primary-color:var(--kup-text-color);--kup-button-primary-color-rgb:var(--kup-text-color-rgb);--kup-button-primary-color-h:var(--kup-text-color-h);--kup-button-primary-color-s:var(--kup-text-color-s);--kup-button-primary-color-l:var(--kup-text-color-l);margin:0 auto;width:max-content}.family-tree__item__wrapper .f-button button{height:32px;width:32px}.family-tree__item__layout{background-color:var(--kup_familytree_item_background_color);border:1px solid var(--kup_familytree_lines_color);border-radius:8px;box-sizing:border-box;display:flex;height:var(--kup_familytree_item_height);margin:0 18px;width:var(--kup_familytree_item_width)}.family-tree__item__layout--1{justify-content:center;color:var(--kup_familytree_item_color)}.family-tree__item__layout--1>.family-tree__item__layout__text__title{margin-top:auto;margin-bottom:auto}.family-tree__item__layout--2{background-color:var(--kup_familytree_item_background_color);justify-content:flex-start}.family-tree__item__layout__color{background-color:var(--kup-secondary-color);border-bottom-left-radius:8px;border-top-left-radius:8px;height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto 10px}.family-tree__item__layout__image img{border-radius:50px;object-fit:cover}.family-tree__item__layout__text{display:flex;flex-direction:column;justify-content:center}.family-tree__item__layout__text__title{font-size:18px;margin-bottom:5px}.family-tree__item__layout__text__subtitle{font-size:14px}.family-tree__item__layout__text__title,.family-tree__item__layout__text__subtitle{max-width:calc(var(--kup_familytree_item_width) - 30%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}';export{N as kup_family_tree}
@@ -0,0 +1,26 @@
1
+ import { VNode } from '../../../stencil-public-runtime';
2
+ import type { KupCard } from '../kup-card';
3
+ /**
4
+ * 1st box card layout, it can be used as a key-value grid list.
5
+ * @param {KupCard} component - Card component.
6
+ * @returns {VNode} 1st box layout virtual node.
7
+ */
8
+ export declare function create1(component: KupCard): VNode;
9
+ /**
10
+ * 2nd box card layout, it can be used as a key-value grid list with text occupying the left/right edges of the box.
11
+ * @param {KupCard} component - Card component.
12
+ * @returns {VNode} 2nd box layout virtual node.
13
+ */
14
+ export declare function create2(component: KupCard): VNode;
15
+ /**
16
+ * 3rd box card layout, it can be used as a key-value row list.
17
+ * @param {KupCard} component - Card component.
18
+ * @returns {VNode} 3rd box layout virtual node.
19
+ */
20
+ export declare function create3(component: KupCard): VNode;
21
+ /**
22
+ * 4th box card layout, image and value.
23
+ * @param {KupCard} component - Card component.
24
+ * @returns {VNode} 4th box layout virtual node.
25
+ */
26
+ export declare function create4(component: KupCard): VNode;
@@ -133,6 +133,7 @@ export interface KupCardBuiltInNumeric extends HTMLElement {
133
133
  export interface KupCardData {
134
134
  autocomplete?: GenericObject[];
135
135
  button?: GenericObject[];
136
+ cell?: GenericObject[];
136
137
  chart?: GenericObject[];
137
138
  checkbox?: GenericObject[];
138
139
  chip?: GenericObject[];
@@ -156,6 +157,7 @@ export interface KupCardData {
156
157
  /**
157
158
  * Layout families of the kup-card component.
158
159
  * @enum {string}
160
+ * @property {string} BOX - Layouts tailored for kup-box.
159
161
  * @property {string} BUILT_IN - Cards belonging to this family will be created automatically by the library and will have premade behaviors.
160
162
  * @property {string} COLLAPSIBLE - Cards belonging to this family will display an area usable to expand the content of the card.
161
163
  * @property {string} DIALOG - Cards belonging to this family will be movable and usually closable.
@@ -164,6 +166,7 @@ export interface KupCardData {
164
166
  * @property {string} STANDARD - Stndard layouts.
165
167
  */
166
168
  export declare enum KupCardFamily {
169
+ BOX = "box",
167
170
  BUILT_IN = "built-in",
168
171
  COLLAPSIBLE = "collapsible",
169
172
  DIALOG = "dialog",
@@ -1,4 +1,5 @@
1
1
  import { KupEventPayload } from '../../types/GenericTypes';
2
+ import { KupListNode } from '../kup-list/kup-list-declarations';
2
3
  /**
3
4
  * Props of the kup-combobox component.
4
5
  * Used to export every prop in an object.
@@ -14,8 +15,9 @@ export declare enum KupComboboxProps {
14
15
  showDropDownIcon = "When true shows the drop-down icon, for open list."
15
16
  }
16
17
  export interface KupComboboxEventPayload extends KupEventPayload {
17
- value: any;
18
18
  inputValue: any;
19
+ node?: KupListNode;
20
+ value: any;
19
21
  }
20
22
  export interface KupComboboxIconClickEventPayload extends KupComboboxEventPayload {
21
23
  open: boolean;
@@ -8,6 +8,7 @@ import { KupBoxLayout } from '../kup-box/kup-box-declarations';
8
8
  export declare enum KupFamilyTreeProps {
9
9
  autofitOnExpand = "The component will autofit everytime a node is expanded.",
10
10
  autofitOnLoad = "The component's initial render will fit the container by invoking the runAutofit method.",
11
+ cardData = "Used to render the family tree boxes as kup-cards (through kup-box).",
11
12
  collapsible = "Nodes can be expanded/collapsed.",
12
13
  customStyle = "Custom style of the component.",
13
14
  data = "Actual data of the component",
@@ -17,6 +17,11 @@ export declare class KupFamilyTree {
17
17
  * @default true
18
18
  */
19
19
  autofitOnLoad: boolean;
20
+ /**
21
+ * Used to render the family tree boxes as kup-cards (through kup-box).
22
+ * @default null
23
+ */
24
+ cardData: GenericObject;
20
25
  /**
21
26
  * Nodes can be expanded/collapsed.
22
27
  * @default true
@@ -14,6 +14,7 @@ export declare enum KupTextFieldProps {
14
14
  helperWhenFocused = "When set, the helper will be shown only when the field is focused.",
15
15
  icon = "When set, the text-field will show this icon.",
16
16
  initialValue = "Sets the initial value of the component",
17
+ inputMode = "The HTML inputmode of the input element. It has no effect on text areas.",
17
18
  inputType = "The HTML type of the input element. It has no effect on text areas.",
18
19
  isClearable = "Enables a clear trailing icon.",
19
20
  label = "When set, its content will be shown as a label.",
@@ -62,6 +62,11 @@ export declare class KupTextField {
62
62
  * @default ""
63
63
  */
64
64
  initialValue: string;
65
+ /**
66
+ * The HTML inputmode of the input element.
67
+ * @default null
68
+ */
69
+ inputMode: string;
65
70
  /**
66
71
  * The HTML type of the input element. It has no effect on text areas.
67
72
  * @default "text"
@@ -8,7 +8,6 @@ import { KupCardEventPayload } from '../kup-card/kup-card-declarations';
8
8
  */
9
9
  export declare enum KupTreeProps {
10
10
  asAccordion = "When enabled, the first level of depth will give an accordion look to nodes.",
11
- autoSelectionNodeMode = "Auto select programmatic selectic node",
12
11
  columns = "The columns of the tree when tree visualization is active.",
13
12
  customStyle = "Custom style of the component.",
14
13
  data = "The json data used to populate the tree view: the basic, always visible tree nodes.",
@@ -25,7 +24,6 @@ export declare enum KupTreeProps {
25
24
  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.",
26
25
  ripple = "When enabled displays Material's ripple effect on nodes (only when no columns are displayed).",
27
26
  scrollOnHover = "Activates the scroll on hover function.",
28
- selectedNode = "An array of integers containing the path to a selected child. Groups up the properties SelFirst, SelItem, SelName.",
29
27
  showColumns = "Shows the tree data as a table.",
30
28
  showFilters = "When set to true enables the column filters.",
31
29
  showFooter = "When set to true shows the footer.",
@@ -76,12 +74,10 @@ export interface KupTreeNodeExpandEventPayload extends KupTreeNodeCollapseEventP
76
74
  }
77
75
  export interface KupTreeNodeSelectedEventPayload extends KupTreeNodeCollapseEventPayload {
78
76
  columnName: string;
79
- auto: boolean;
80
77
  }
81
78
  export interface KupTreeNodeButtonClickEventPayload extends KupTreeNodeCollapseEventPayload {
82
79
  column: KupDataColumn;
83
80
  columnName: string;
84
- auto: boolean;
85
81
  }
86
82
  export interface KupTreeContextMenuEventPayload extends KupEventPayload {
87
83
  details: KupTreeEventHandlerDetails;
@@ -19,8 +19,12 @@ export declare class KupTree {
19
19
  */
20
20
  private openedTotalMenu;
21
21
  private columnMenuAnchor;
22
- selectedNodeString: string;
23
22
  stateSwitcher: boolean;
23
+ /**
24
+ * An array of integers containing the path to a selected child.\
25
+ * Groups up the properties SelFirst, SelItem, SelName.
26
+ */
27
+ private selectedNode;
24
28
  initWithPersistedState(): void;
25
29
  persistState(): void;
26
30
  /**
@@ -28,10 +32,6 @@ export declare class KupTree {
28
32
  * @default false
29
33
  */
30
34
  asAccordion: boolean;
31
- /**
32
- * Auto select programmatic selectic node
33
- */
34
- autoSelectionNodeMode: boolean;
35
35
  /**
36
36
  * The columns of the tree when tree visualization is active.
37
37
  */
@@ -115,11 +115,6 @@ export declare class KupTree {
115
115
  * Activates the scroll on hover function.
116
116
  */
117
117
  scrollOnHover: boolean;
118
- /**
119
- * An array of integers containing the path to a selected child.\
120
- * Groups up the properties SelFirst, SelItem, SelName.
121
- */
122
- selectedNode: TreeNodePath;
123
118
  /**
124
119
  * Shows the tree data as a table.
125
120
  */
@@ -167,6 +162,7 @@ export declare class KupTree {
167
162
  */
168
163
  private columnMenuCard;
169
164
  private treeWrapperRef;
165
+ private selectedColumn;
170
166
  private clickTimeout;
171
167
  private globalFilterTimeout;
172
168
  private footer;
@@ -229,9 +225,18 @@ export declare class KupTree {
229
225
  * Event fired when columns are removed (set to hidden).
230
226
  */
231
227
  kupColumnRemove: EventEmitter<KupTreeColumnRemoveEventPayload>;
228
+ /**
229
+ * This method will get the selected nodes of the component.
230
+ */
231
+ getSelectedNode(): Promise<TreeNodePath>;
232
+ /**
233
+ * This method will set the selected rows of the component.
234
+ * @param {string|number[]} rowsIdentifiers - Array of ids (dataset) or indexes (rendered rows).
235
+ * @param {boolean} emitEvent - The event will always be emitted unless emitEvent is set to false.
236
+ */
237
+ setSelectedNode(treeNodePath: string, emitEvent?: boolean): Promise<void>;
232
238
  enrichDataWhenChanged(newData: KupTreeNode[] | KupDataDataset, oldData: KupTreeNode[]): void;
233
239
  enrichStructureStateWhenChanged(newValue: any, oldValue: any): void;
234
- selectedNodeToStr(newData: any): void;
235
240
  /**
236
241
  * True if there aren't visible nodes
237
242
  */
@@ -295,7 +300,7 @@ export declare class KupTree {
295
300
  private getEventDetails;
296
301
  private contextMenuHandler;
297
302
  private getEventPath;
298
- hdlTreeNodeClick(e: MouseEvent, treeNodeData: KupTreeNode, treeNodePath: string, auto: boolean): void;
303
+ hdlTreeNodeClick(e: MouseEvent, treeNodeData: KupTreeNode, treeNodePath: string): void;
299
304
  hdlTreeNodeExpanderClick(treeNodeData: KupTreeNode, treeNodePath: string, ctrlKey: boolean): void;
300
305
  private hasTotals;
301
306
  private handleChildren;
@@ -305,6 +310,7 @@ export declare class KupTree {
305
310
  */
306
311
  selectedNodeToString(nodePath: TreeNodePath): string;
307
312
  private getFilterValueForTooltip;
313
+ private getTreeNode;
308
314
  private onRemoveFilter;
309
315
  onGlobalFilterChange({ detail }: {
310
316
  detail: any;
@@ -1586,6 +1586,11 @@ export namespace Components {
1586
1586
  * @default true
1587
1587
  */
1588
1588
  "autofitOnLoad": boolean;
1589
+ /**
1590
+ * Used to render the family tree boxes as kup-cards (through kup-box).
1591
+ * @default null
1592
+ */
1593
+ "cardData": GenericObject;
1589
1594
  /**
1590
1595
  * Collapses all nodes.
1591
1596
  */
@@ -2705,6 +2710,11 @@ export namespace Components {
2705
2710
  * @default ""
2706
2711
  */
2707
2712
  "initialValue": string;
2713
+ /**
2714
+ * The HTML inputmode of the input element.
2715
+ * @default null
2716
+ */
2717
+ "inputMode": string;
2708
2718
  /**
2709
2719
  * The HTML type of the input element. It has no effect on text areas.
2710
2720
  * @default "text"
@@ -2864,10 +2874,6 @@ export namespace Components {
2864
2874
  * @default false
2865
2875
  */
2866
2876
  "asAccordion": boolean;
2867
- /**
2868
- * Auto select programmatic selectic node
2869
- */
2870
- "autoSelectionNodeMode": boolean;
2871
2877
  /**
2872
2878
  * Closes any opened column menu.
2873
2879
  */
@@ -2934,6 +2940,10 @@ export namespace Components {
2934
2940
  * @returns List of props as object, each key will be a prop.
2935
2941
  */
2936
2942
  "getProps": (descriptions?: boolean) => Promise<GenericObject>;
2943
+ /**
2944
+ * This method will get the selected nodes of the component.
2945
+ */
2946
+ "getSelectedNode": () => Promise<TreeNodePath>;
2937
2947
  /**
2938
2948
  * When set to true it activates the global filter.
2939
2949
  */
@@ -2986,15 +2996,17 @@ export namespace Components {
2986
2996
  * Activates the scroll on hover function.
2987
2997
  */
2988
2998
  "scrollOnHover": boolean;
2989
- /**
2990
- * An array of integers containing the path to a selected child.\ Groups up the properties SelFirst, SelItem, SelName.
2991
- */
2992
- "selectedNode": TreeNodePath;
2993
2999
  /**
2994
3000
  * Sets the props to the component.
2995
3001
  * @param props - Object containing props that will be set to the component.
2996
3002
  */
2997
3003
  "setProps": (props: GenericObject) => Promise<void>;
3004
+ /**
3005
+ * This method will set the selected rows of the component.
3006
+ * @param rowsIdentifiers - Array of ids (dataset) or indexes (rendered rows).
3007
+ * @param emitEvent - The event will always be emitted unless emitEvent is set to false.
3008
+ */
3009
+ "setSelectedNode": (treeNodePath: string, emitEvent?: boolean) => Promise<void>;
2998
3010
  /**
2999
3011
  * Shows the tree data as a table.
3000
3012
  */
@@ -4808,6 +4820,11 @@ declare namespace LocalJSX {
4808
4820
  * @default true
4809
4821
  */
4810
4822
  "autofitOnLoad"?: boolean;
4823
+ /**
4824
+ * Used to render the family tree boxes as kup-cards (through kup-box).
4825
+ * @default null
4826
+ */
4827
+ "cardData"?: GenericObject;
4811
4828
  /**
4812
4829
  * Nodes can be expanded/collapsed.
4813
4830
  * @default true
@@ -5638,6 +5655,11 @@ declare namespace LocalJSX {
5638
5655
  * @default ""
5639
5656
  */
5640
5657
  "initialValue"?: string;
5658
+ /**
5659
+ * The HTML inputmode of the input element.
5660
+ * @default null
5661
+ */
5662
+ "inputMode"?: string;
5641
5663
  /**
5642
5664
  * The HTML type of the input element. It has no effect on text areas.
5643
5665
  * @default "text"
@@ -5794,10 +5816,6 @@ declare namespace LocalJSX {
5794
5816
  * @default false
5795
5817
  */
5796
5818
  "asAccordion"?: boolean;
5797
- /**
5798
- * Auto select programmatic selectic node
5799
- */
5800
- "autoSelectionNodeMode"?: boolean;
5801
5819
  /**
5802
5820
  * The columns of the tree when tree visualization is active.
5803
5821
  */
@@ -5917,10 +5935,6 @@ declare namespace LocalJSX {
5917
5935
  * Activates the scroll on hover function.
5918
5936
  */
5919
5937
  "scrollOnHover"?: boolean;
5920
- /**
5921
- * An array of integers containing the path to a selected child.\ Groups up the properties SelFirst, SelItem, SelName.
5922
- */
5923
- "selectedNode"?: TreeNodePath;
5924
5938
  /**
5925
5939
  * Shows the tree data as a table.
5926
5940
  */
@@ -11,6 +11,7 @@ export interface FTextFieldProps extends FComponent {
11
11
  helperEnabled?: boolean;
12
12
  helperWhenFocused?: boolean;
13
13
  icon?: string;
14
+ inputMode?: string;
14
15
  inputType?: string;
15
16
  max?: number;
16
17
  maxLength?: number;
@@ -96,6 +96,12 @@ export declare class KupObjects {
96
96
  * @returns {boolean} True when the object is a number.
97
97
  */
98
98
  isNumber(obj: KupObj): boolean;
99
+ /**
100
+ * Checks whether the object represents a positive number or not.
101
+ * @param {KupObj} obj - Object to check.
102
+ * @returns {boolean} True when the object is a positive number.
103
+ */
104
+ isPositiveNumber(obj: KupObj): boolean;
99
105
  /**
100
106
  * Checks whether the object represents a password or not.
101
107
  * @param {KupObj} obj - Object to check.