@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{h as n}from"./p-b0b3989b.js";import{F as t}from"./p-6c77a36c.js";import{F as o}from"./p-0cf10db0.js";const e=(e,u)=>{if(e.styling||(e.styling=t.RAISED),!e.label&&!e.icon)return;const i=!!(e.styling.toLowerCase()===t.ICON||e.styling.toLowerCase()===t.RAISED&&e.icon&&null==e.label);return n("div",Object.assign({class:`f-button ${e.danger?"kup-danger":""} ${e.fullHeight?"kup-full-height":""} ${e.fullWidth?"kup-full-width":""} ${e.info?"kup-info":""} ${e.large?"kup-large":""} ${e.pulsating?"kup-pulsating":""} ${e.shaped?"kup-shaped":""} ${e.secondary?"kup-secondary":""} ${e.slim?"kup-slim":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),i?function(t){const e={color:t.disabled?"var(--kup_button_disabled_color)":"var(--kup_button_primary_color)",sizeX:t.large?"calc(1.75em * 1.5)":"1.75em",sizeY:t.large?"calc(1.75em * 1.5)":"1.75em"};return n("button",{type:t.buttonType?t.buttonType:"button",class:{"icon-button":!0,"button--disabled":!!t.disabled,"icon-button--on":!(!t.toggable||!t.checked),toggable:!!t.toggable,"button--with-spinner":!(!t.showSpinner||t.disabled)},disabled:t.disabled,onClick:t.onClick,style:{"--kup_button_spinner_height":e.sizeY,"--kup_button_spinner_width":e.sizeX},value:t.checked?"on":"off","aria-label":t.title},!t.showSpinner||t.disabled?n(o,Object.assign({},e,{resource:t.toggable&&!t.checked?t.iconOff?t.iconOff:t.icon+"_border":t.icon,wrapperClass:"icon-button__icon kup-icon"})):null,t.toggable&&!t.showSpinner?n(o,Object.assign({},e,{resource:t.icon,wrapperClass:"icon-button__icon icon-button__icon--on kup-icon"})):null,t.showSpinner&&!t.disabled?n("div",{class:"icon-button__spinner-container"},n("slot",{name:"spinner"})):void 0)}(e):function(e){const u=e.styling.toLowerCase()===t.FLAT,i=e.styling.toLowerCase()===t.FLOATING,s=e.styling.toLowerCase()===t.ICON,r=e.styling.toLowerCase()===t.OUTLINED,c=!(u||i||r||s),l={color:e.disabled?"var(--kup_button_disabled_color)":r||u?"var(--kup_button_primary_color)":"var(--kup_button_text_on_primary_color)",resource:e.icon,sizeX:i?"1.75em":"1.475em",sizeY:i?"1.75em":"1.475em",wrapperClass:"button__icon kup-icon"};e.showSpinner&&(l.wrapperClass+=" content--hidden");const a={button__label:!0,"content--hidden":!(!e.showSpinner||e.disabled)};return n("button",{type:e.buttonType?e.buttonType:"button",class:{button:!0,"button--disabled":!!e.disabled,"button--floating":!!i,"button--outlined":!!r,"button--raised":!!c,"button--no-label":!e.label||" "===e.label,"button--with-spinner":!(!e.showSpinner||e.disabled)},disabled:e.disabled,onBlur:e.onBlur,onClick:e.onClick,onFocus:e.onFocus,style:{"--kup_button_spinner_height":l.sizeY},"aria-label":e.title},e.trailingIcon?[n("span",{class:a},e.label),e.icon?n(o,Object.assign({},l)):void 0]:[e.icon?n(o,Object.assign({},l)):void 0,n("span",{class:a},e.label)],e.showSpinner&&!e.disabled?n("div",{class:"button__spinner-container"},n("slot",{name:"spinner"})):void 0)}(e),u)};export{e as F}
1
+ import{h as n}from"./p-b0b3989b.js";import{F as t}from"./p-6c77a36c.js";import{F as o}from"./p-20221a50.js";const e=(e,u)=>{if(e.styling||(e.styling=t.RAISED),!e.label&&!e.icon)return;const i=!!(e.styling.toLowerCase()===t.ICON||e.styling.toLowerCase()===t.RAISED&&e.icon&&null==e.label);return n("div",Object.assign({class:`f-button ${e.danger?"kup-danger":""} ${e.fullHeight?"kup-full-height":""} ${e.fullWidth?"kup-full-width":""} ${e.info?"kup-info":""} ${e.large?"kup-large":""} ${e.pulsating?"kup-pulsating":""} ${e.shaped?"kup-shaped":""} ${e.secondary?"kup-secondary":""} ${e.slim?"kup-slim":""} ${e.success?"kup-success":""} ${e.warning?"kup-warning":""} ${e.wrapperClass?e.wrapperClass:""}`},e.dataSet,{id:e.id,title:e.title}),i?function(t){const e={color:t.disabled?"var(--kup_button_disabled_color)":"var(--kup_button_primary_color)",sizeX:t.large?"calc(1.75em * 1.5)":"1.75em",sizeY:t.large?"calc(1.75em * 1.5)":"1.75em"};return n("button",{type:t.buttonType?t.buttonType:"button",class:{"icon-button":!0,"button--disabled":!!t.disabled,"icon-button--on":!(!t.toggable||!t.checked),toggable:!!t.toggable,"button--with-spinner":!(!t.showSpinner||t.disabled)},disabled:t.disabled,onClick:t.onClick,style:{"--kup_button_spinner_height":e.sizeY,"--kup_button_spinner_width":e.sizeX},value:t.checked?"on":"off","aria-label":t.title},!t.showSpinner||t.disabled?n(o,Object.assign({},e,{resource:t.toggable&&!t.checked?t.iconOff?t.iconOff:t.icon+"_border":t.icon,wrapperClass:"icon-button__icon kup-icon"})):null,t.toggable&&!t.showSpinner?n(o,Object.assign({},e,{resource:t.icon,wrapperClass:"icon-button__icon icon-button__icon--on kup-icon"})):null,t.showSpinner&&!t.disabled?n("div",{class:"icon-button__spinner-container"},n("slot",{name:"spinner"})):void 0)}(e):function(e){const u=e.styling.toLowerCase()===t.FLAT,i=e.styling.toLowerCase()===t.FLOATING,s=e.styling.toLowerCase()===t.ICON,r=e.styling.toLowerCase()===t.OUTLINED,a=!(u||i||r||s),c={color:e.disabled?"var(--kup_button_disabled_color)":r||u?"var(--kup_button_primary_color)":"var(--kup_button_text_on_primary_color)",resource:e.icon,sizeX:i?"1.75em":"1.475em",sizeY:i?"1.75em":"1.475em",wrapperClass:"button__icon kup-icon"};e.showSpinner&&(c.wrapperClass+=" content--hidden");const l={button__label:!0,"content--hidden":!(!e.showSpinner||e.disabled)};return n("button",{type:e.buttonType?e.buttonType:"button",class:{button:!0,"button--disabled":!!e.disabled,"button--floating":!!i,"button--outlined":!!r,"button--raised":!!a,"button--no-label":!e.label||" "===e.label,"button--with-spinner":!(!e.showSpinner||e.disabled)},disabled:e.disabled,onBlur:e.onBlur,onClick:e.onClick,onFocus:e.onFocus,style:{"--kup_button_spinner_height":c.sizeY},"aria-label":e.title},e.trailingIcon?[n("span",{class:l},e.label),e.icon?n(o,Object.assign({},c)):void 0]:[e.icon?n(o,Object.assign({},c)):void 0,n("span",{class:l},e.label)],e.showSpinner&&!e.disabled?n("div",{class:"button__spinner-container"},n("slot",{name:"spinner"})):void 0)}(e),u)};export{e as F}
@@ -1 +1 @@
1
- import{r as t,c as e,f as h,h as i,H as s,g as a}from"./p-b0b3989b.js";import{k as o,g as n,s as l}from"./p-b8c921ee.js";import{c as p}from"./p-97e8ea42.js";var r,c;!function(t){t.componentName="Sets the tag name of the component to be lazy loaded.",t.customStyle="Custom style of the component.",t.data="Sets the data of the component to be lazy loaded.",t.showPlaceholder="Displays an animated SVG placeholder until the component is loaded."}(r||(r={})),function(t){t.VIEWPORT="viewport",t.PROPS="props",t.BOTH="both"}(c||(c={}));const d=class{constructor(h){t(this,h),this.kupLazyLoaded=e(this,"kup-lazy-loaded",6),this.isInViewport=!1,this.componentName=null,this.customStyle="",this.data=null,this.renderMode=c.BOTH,this.showPlaceholder=!0,this.intObserver=null,this.kupManager=o(),this.lazyComponent=null,this.lazyComponentLoaded=!1}async getProps(t){return n(this,r,t)}async getComponent(){return this.lazyComponent}async refresh(){h(this)}async setProps(t){l(this,r,t)}setObserver(){this.intObserver=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.kupManager.debug.logMessage(this,"kup-lazy entering the viewport, rendering "+this.componentName+"."),this.isInViewport=!0,this.intObserver.unobserve(this.rootElement))}))}),{threshold:.25})}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.setObserver()}componentDidLoad(){this.intObserver.observe(this.rootElement),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.lazyComponent&&!this.lazyComponentLoaded&&(this.lazyComponentLoaded=!0,this.kupLazyLoaded.emit({comp:this,id:this.rootElement.id})),this.kupManager.debug.logRender(this,!0)}render(){let t,e,h=this.componentName;switch(this.componentName){case"kup-button":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M42 6H6c-2.2 0-4 1.8-4 4v28c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4V10c0-2.2-1.8-4-4-4zm0 32H6v-6h36v6z"}));break;case"kup-card":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}));break;case"kup-checkbox":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M38 10v28H10V10h28m0-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4z"}));break;case"kup-chart":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},i("path",{d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},i("path",{d:"M4,3H20A2,2 0 0,1 22,5V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V5A2,2 0 0,1 4,3M4,7V10H8V7H4M10,7V10H14V7H10M20,10V7H16V10H20M4,12V15H8V12H4M4,20H8V17H4V20M10,12V15H14V12H10M10,20H14V17H10V20M20,20V17H16V20H20M20,12H16V15H20V12Z"}));break;case"kup-image":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"}));break;case"kup-progress-bar":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M39 19c-2.05 0-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3s-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3-2.77 0-5 2.23-5 5s2.23 5 5 5c2.05 0 3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3s3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3 2.77 0 5-2.23 5-5s-2.23-5-5-5z"}));break;case"kup-radio":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z"}));break;default:e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}))}return this.renderMode===c.VIEWPORT&&this.isInViewport||this.renderMode===c.PROPS&&this.data||this.renderMode===c.BOTH&&this.data&&this.isInViewport?(t=i(this.componentName,Object.assign({},this.data,{ref:t=>this.lazyComponent=t})),h+=" kup-loaded"):this.showPlaceholder&&(t=e,h+=" kup-to-be-loaded"),i(s,{class:h},i("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{id:p},t))}disconnectedCallback(){this.kupManager.theme.unregister(this),this.intObserver.unobserve(this.rootElement)}get rootElement(){return a(this)}};d.style=":host{--kup_lazy_animation_time:var(--kup-lazy-animation-time, 2s);--kup_lazy_hor_alignment:var(--kup-lazy-hor-alignment, center);--kup_lazy_placeholder_color:var(\n --kup-lazy-placeholder-color,\n var(--kup-icon-color)\n );--kup_lazy_height:var(--kup-lazy-height, 100%);--kup_lazy_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_width:var(--kup-lazy-width, 100%);display:block;height:var(--kup_lazy_height);width:var(--kup_lazy_width);position:relative}#kup-component{align-items:var(--kup_lazy_ver_alignment);display:flex;justify-content:var(--kup_lazy_hor_alignment);height:var(--kup_lazy_height);width:var(--kup_lazy_width)}#kup-component>*{height:var(--kup_lazy_height)}#kup-component kup-data-table{min-width:100%}.kup-loaded,.kup-to-be-loaded{height:var(--kup_lazy_height);width:var(--kup_lazy_width)}svg{fill:var(--kup_lazy_placeholder_color);animation:shine ease var(--kup_lazy_animation_time) infinite}@keyframes shine{0%{opacity:0.4}50%{opacity:0.8}100%{opacity:0.4}}:host(.kup-bottom-aligned){--kup-lazy-ver-alignment:flex-end}:host(.kup-left-aligned){--kup-lazy-hor-alignment:flex-start}:host(.kup-right-aligned){--kup-lazy-hor-alignment:flex-end}:host(.kup-top-aligned){--kup-lazy-ver-alignment:flex-start}:host(.kup-to-be-loaded) #kup-component{position:absolute}:host(.kup-to-be-loaded) #kup-component>*{margin:auto}";export{d as kup_lazy}
1
+ import{r as t,c as e,f as h,h as i,H as s,g as a}from"./p-b0b3989b.js";import{k as o,g as n,s as l}from"./p-c05f2638.js";import{c as p}from"./p-97e8ea42.js";var r,c;!function(t){t.componentName="Sets the tag name of the component to be lazy loaded.",t.customStyle="Custom style of the component.",t.data="Sets the data of the component to be lazy loaded.",t.showPlaceholder="Displays an animated SVG placeholder until the component is loaded."}(r||(r={})),function(t){t.VIEWPORT="viewport",t.PROPS="props",t.BOTH="both"}(c||(c={}));const d=class{constructor(h){t(this,h),this.kupLazyLoaded=e(this,"kup-lazy-loaded",6),this.isInViewport=!1,this.componentName=null,this.customStyle="",this.data=null,this.renderMode=c.BOTH,this.showPlaceholder=!0,this.intObserver=null,this.kupManager=o(),this.lazyComponent=null,this.lazyComponentLoaded=!1}async getProps(t){return n(this,r,t)}async getComponent(){return this.lazyComponent}async refresh(){h(this)}async setProps(t){l(this,r,t)}setObserver(){this.intObserver=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.kupManager.debug.logMessage(this,"kup-lazy entering the viewport, rendering "+this.componentName+"."),this.isInViewport=!0,this.intObserver.unobserve(this.rootElement))}))}),{threshold:.25})}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this),this.setObserver()}componentDidLoad(){this.intObserver.observe(this.rootElement),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.lazyComponent&&!this.lazyComponentLoaded&&(this.lazyComponentLoaded=!0,this.kupLazyLoaded.emit({comp:this,id:this.rootElement.id})),this.kupManager.debug.logRender(this,!0)}render(){let t,e,h=this.componentName;switch(this.componentName){case"kup-button":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M42 6H6c-2.2 0-4 1.8-4 4v28c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4V10c0-2.2-1.8-4-4-4zm0 32H6v-6h36v6z"}));break;case"kup-card":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}));break;case"kup-checkbox":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M38 10v28H10V10h28m0-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4z"}));break;case"kup-chart":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},i("path",{d:"M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z"}));break;case"kup-data-table":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",viewBox:"0 0 24 24"},i("path",{d:"M4,3H20A2,2 0 0,1 22,5V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V5A2,2 0 0,1 4,3M4,7V10H8V7H4M10,7V10H14V7H10M20,10V7H16V10H20M4,12V15H8V12H4M4,20H8V17H4V20M10,12V15H14V12H10M10,20H14V17H10V20M20,20V17H16V20H20M20,12H16V15H20V12Z"}));break;case"kup-image":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"}));break;case"kup-progress-bar":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M39 19c-2.05 0-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3s-3.81 1.23-4.58 3h-5.84c-.77-1.77-2.53-3-4.58-3-2.77 0-5 2.23-5 5s2.23 5 5 5c2.05 0 3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3s3.81-1.23 4.58-3h5.84c.77 1.77 2.53 3 4.58 3 2.77 0 5-2.23 5-5s-2.23-5-5-5z"}));break;case"kup-radio":e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z"}));break;default:e=i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 48 48"},i("path",{d:"M44 26H28v-4h16v4zm0-12H28v4h16v-4zM28 34h16v-4H28v4zm-4-16v12c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4V18c0-2.2 1.8-4 4-4h12c2.2 0 4 1.8 4 4zm-3 12l-4.5-6-3.5 4.51-2.5-3.01L7 30h14z"}))}return this.renderMode===c.VIEWPORT&&this.isInViewport||this.renderMode===c.PROPS&&this.data||this.renderMode===c.BOTH&&this.data&&this.isInViewport?(t=i(this.componentName,Object.assign({},this.data,{ref:t=>this.lazyComponent=t})),h+=" kup-loaded"):this.showPlaceholder&&(t=e,h+=" kup-to-be-loaded"),i(s,{class:h},i("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{id:p},t))}disconnectedCallback(){this.kupManager.theme.unregister(this),this.intObserver.unobserve(this.rootElement)}get rootElement(){return a(this)}};d.style=":host{--kup_lazy_animation_time:var(--kup-lazy-animation-time, 2s);--kup_lazy_hor_alignment:var(--kup-lazy-hor-alignment, center);--kup_lazy_placeholder_color:var(\n --kup-lazy-placeholder-color,\n var(--kup-icon-color)\n );--kup_lazy_height:var(--kup-lazy-height, 100%);--kup_lazy_ver_alignment:var(--kup-lazy-ver-alignment, center);--kup_lazy_width:var(--kup-lazy-width, 100%);display:block;height:var(--kup_lazy_height);width:var(--kup_lazy_width);position:relative}#kup-component{align-items:var(--kup_lazy_ver_alignment);display:flex;justify-content:var(--kup_lazy_hor_alignment);height:var(--kup_lazy_height);width:var(--kup_lazy_width)}#kup-component>*{height:var(--kup_lazy_height)}#kup-component kup-data-table{min-width:100%}.kup-loaded,.kup-to-be-loaded{height:var(--kup_lazy_height);width:var(--kup_lazy_width)}svg{fill:var(--kup_lazy_placeholder_color);animation:shine ease var(--kup_lazy_animation_time) infinite}@keyframes shine{0%{opacity:0.4}50%{opacity:0.8}100%{opacity:0.4}}:host(.kup-bottom-aligned){--kup-lazy-ver-alignment:flex-end}:host(.kup-left-aligned){--kup-lazy-hor-alignment:flex-start}:host(.kup-right-aligned){--kup-lazy-hor-alignment:flex-end}:host(.kup-top-aligned){--kup-lazy-ver-alignment:flex-start}:host(.kup-to-be-loaded) #kup-component{position:absolute}:host(.kup-to-be-loaded) #kup-component>*{margin:auto}";export{d as kup_lazy}