@sme.up/ketchup 7.2.0 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{f-button-1d63db82.js → f-button-5856cd74.js} +1 -1
- package/dist/cjs/{f-cell-abc20cee.js → f-cell-9d7a9e97.js} +4 -4
- package/dist/cjs/{f-chip-ae40e47a.js → f-chip-675ed121.js} +2 -2
- package/dist/cjs/{f-image-c5f5880a.js → f-image-48facc89.js} +1 -1
- package/dist/cjs/{f-paginator-utils-e8449af2.js → f-paginator-utils-0c1227f6.js} +2 -2
- package/dist/cjs/{f-text-field-d200b904.js → f-text-field-3d8e7417.js} +1 -1
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +53 -49
- package/dist/cjs/kup-box.cjs.entry.js +7 -7
- package/dist/cjs/kup-calendar.cjs.entry.js +4 -4
- package/dist/cjs/kup-cell.cjs.entry.js +5 -5
- package/dist/cjs/kup-dash-list.cjs.entry.js +7 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +1 -1
- package/dist/cjs/kup-dashboard.cjs.entry.js +4 -4
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +1 -1
- package/dist/cjs/kup-family-tree.cjs.entry.js +3 -3
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +6 -6
- package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
- package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
- package/dist/cjs/{kup-manager-bbbe0491.js → kup-manager-22bb9699.js} +3 -4
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
- package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
- package/dist/cjs/kup-snackbar.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/card.js +10 -0
- package/dist/collection/assets/data-table.js +44 -0
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +3 -3
- package/dist/collection/components/kup-card/built-in/kup-card-message-box.js +10 -0
- package/dist/collection/components/kup-card/kup-card.css +12 -1
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +6 -3
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-dialog/kup-dialog.css +1 -0
- package/dist/collection/components/kup-form/kup-form.js +24 -0
- package/dist/collection/managers/kup-manager/kup-manager.js +3 -4
- package/dist/components/kup-autocomplete2.js +2138 -2260
- package/dist/components/kup-dash-list.js +6 -3
- package/dist/esm/{f-button-a8843fb2.js → f-button-eedbdba1.js} +1 -1
- package/dist/esm/{f-cell-aa0acc55.js → f-cell-90a418d2.js} +4 -4
- package/dist/esm/{f-chip-4555fb98.js → f-chip-45e7b3f6.js} +2 -2
- package/dist/esm/{f-image-fed7623c.js → f-image-3026f0fe.js} +1 -1
- package/dist/esm/{f-paginator-utils-8c88fab3.js → f-paginator-utils-6369da7c.js} +2 -2
- package/dist/esm/{f-text-field-b74f4b58.js → f-text-field-3b70a6f0.js} +1 -1
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-accordion.entry.js +2 -2
- package/dist/esm/kup-autocomplete_27.entry.js +53 -49
- package/dist/esm/kup-box.entry.js +7 -7
- package/dist/esm/kup-calendar.entry.js +4 -4
- package/dist/esm/kup-cell.entry.js +5 -5
- package/dist/esm/kup-dash-list.entry.js +7 -4
- package/dist/esm/kup-dash_2.entry.js +1 -1
- package/dist/esm/kup-dashboard.entry.js +4 -4
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +1 -1
- package/dist/esm/kup-family-tree.entry.js +3 -3
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +6 -6
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +2 -2
- package/dist/esm/{kup-manager-311c87ab.js → kup-manager-cad802b1.js} +3 -4
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +2 -2
- package/dist/esm/kup-photo-frame.entry.js +1 -1
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +1 -1
- package/dist/esm/kup-snackbar.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-1d7f90be.entry.js → p-138ac8b9.entry.js} +1 -1
- package/dist/ketchup/{p-fb6ee94f.entry.js → p-1ad48de4.entry.js} +1 -1
- package/dist/ketchup/{p-5f920acd.entry.js → p-1cd45a72.entry.js} +1 -1
- package/dist/ketchup/{p-6ae98bb0.entry.js → p-2217be0a.entry.js} +1 -1
- package/dist/ketchup/{p-910249f5.entry.js → p-23288eed.entry.js} +1 -1
- package/dist/ketchup/{p-4c0206cf.entry.js → p-263b2c73.entry.js} +1 -1
- package/dist/ketchup/{p-028e4c1d.entry.js → p-2d8b5bba.entry.js} +1 -1
- package/dist/ketchup/{p-7f9912b1.js → p-32dc31ad.js} +1 -1
- package/dist/ketchup/{p-cb28bc8c.js → p-4505a48d.js} +1 -1
- package/dist/ketchup/{p-115220b5.entry.js → p-4e68f629.entry.js} +1 -1
- package/dist/ketchup/p-5a1387bf.entry.js +9 -0
- package/dist/ketchup/p-70a0bc02.entry.js +1 -0
- package/dist/ketchup/{p-1e5fda58.entry.js → p-73becdb8.entry.js} +1 -1
- package/dist/ketchup/{p-06d55b09.entry.js → p-78b093e3.entry.js} +1 -1
- package/dist/ketchup/{p-48be0d93.js → p-7bd28eac.js} +1 -1
- package/dist/ketchup/{p-17d827e8.entry.js → p-97afbd71.entry.js} +1 -1
- package/dist/ketchup/{p-09b2668f.entry.js → p-9f1184cd.entry.js} +1 -1
- package/dist/ketchup/{p-7e9f8adf.js → p-a1adab40.js} +1 -1
- package/dist/ketchup/p-a7ae0b4d.js +1 -0
- package/dist/ketchup/{p-3a0cf42a.entry.js → p-a89f0884.entry.js} +1 -1
- package/dist/ketchup/{p-388d18a1.js → p-ae3e0d31.js} +1 -1
- package/dist/ketchup/{p-247362de.entry.js → p-b0675bce.entry.js} +1 -1
- package/dist/ketchup/{p-bc68a9de.entry.js → p-b1da7902.entry.js} +1 -1
- package/dist/ketchup/{p-b67a295b.js → p-b63a5a44.js} +1 -1
- package/dist/ketchup/{p-df6617bc.entry.js → p-bb6921bc.entry.js} +1 -1
- package/dist/ketchup/{p-a1708266.entry.js → p-c1d8fd43.entry.js} +1 -1
- package/dist/ketchup/{p-de9375f7.entry.js → p-d0f4457e.entry.js} +1 -1
- package/dist/ketchup/{p-6dde2079.entry.js → p-fe34fa6e.entry.js} +1 -1
- package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +1 -1
- package/dist/types/components/kup-card/built-in/{kup-card-form.d.ts → kup-card-message-box.d.ts} +1 -1
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +6 -8
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-form/kup-form.d.ts +6 -1
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/collection/components/kup-card/built-in/kup-card-form.js +0 -11
- package/dist/ketchup/p-519f4074.js +0 -1
- package/dist/ketchup/p-8df0191d.entry.js +0 -9
- package/dist/ketchup/p-9174622b.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as t,h as i}from"./p-9dcfbb1e.js";import{k as l,am as h,av as e}from"./p-b63a5a44.js";const o=class{constructor(i){s(this,i),this.dashClick=t(this,"kup-dash-click",7),this.kupManager=l(),this.layout="1",this.fontsize="",this.active=!1,this.columnsNumber=1,this.fullWidth=!0,this.horizontal=!1,this.iconColor=[],this.valueColor=[],this.textColor=[],this.data=void 0}render(){let s=[];var t=0;return this.data.rows.forEach((l=>{let o="",d="",a="",c="",n="",r="",v={color:this.kupManager.theme.colorCheck(this.iconColor[t]).hexColor},u={color:this.kupManager.theme.colorCheck(this.textColor[t]).hexColor},p={color:this.kupManager.theme.colorCheck(this.valueColor[t]).hexColor};if(o=this.data.columns[0]?i("div",{slot:"icon"},i("icon",{class:l.cells[this.data.columns[0].name].obj.k,style:v})):i("div",{slot:"icon"}),d=this.data.columns[1]?i("div",{slot:"unit",style:p},l.cells[this.data.columns[1].name].obj.k," "):i("div",{slot:"unit"}),a=this.data.columns[2]?i("div",{slot:"descr",style:u},l.cells[this.data.columns[2].name].obj.k):i("div",{slot:"descr"}),this.data.columns[3]){let s=this.data.columns[3];s.obj=l.cells[this.data.columns[3].name].obj;let t=h(s,l.cells[this.data.columns[3].name]);c=i("div",{slot:"value",style:p},t)}else c=i("div",{slot:"value"});if(this.data.columns[5]){let s=this.data.columns[5];s.obj=l.cells[this.data.columns[5].name].obj;let t=h(s,l.cells[this.data.columns[5].name]);this.data.columns[6]&&l.cells[this.data.columns[6].name].obj.k&&(t+=e(this.kupManager.dates.getLocale())),n=i("div",{slot:"value-int",style:p},t)}else n=i("div",{slot:"value-int"});r=this.data.columns[6]?i("div",{slot:"value-dec",style:p},l.cells[this.data.columns[6].name].obj.k):i("div",{slot:"value-dec"});const m=i("kup-dash",{layout:this.layout,fontsize:this.fontsize,index:t,active:this.active,slot:String(t)},o,d,a,c,n,r);s.push(m),t++})),i("div",null,i("link",{href:"https://cdn.materialdesignicons.com/4.5.95/css/materialdesignicons.min.css",rel:"stylesheet",type:"text/css"}),i("kup-grid",{columns:this.columnsNumber,singleLine:this.horizontal,class:this.fullWidth?"kup-full-width":""},s))}};o.style=".horizontal{display:inline-block;min-width:300px;max-width:100%;overflow:visible;white-space:nowrap;border:solid;border-width:1px;margin:2px}";export{o as kup_dash_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,c as o,f as t,h as e,H as a,g as i}from"./p-9dcfbb1e.js";import{k as s,g as p,s as d}from"./p-
|
|
1
|
+
import{r,c as o,f as t,h as e,H as a,g as i}from"./p-9dcfbb1e.js";import{k as s,g as p,s as d}from"./p-b63a5a44.js";import{c as n}from"./p-97e8ea42.js";const c="drawer";var u;!function(r){r.customStyle="Custom style of the component.",r.opened="Defaults at false. When set to true, the drawer appears."}(u||(u={}));const l=class{constructor(t){r(this,t),this.kupDrawerClose=o(this,"kup-drawer-close",6),this.kupDrawerOpen=o(this,"kup-drawer-open",6),this.kupDrawerReady=o(this,"kup-drawer-ready",6),this.kupManager=s(),this.opened=!1,this.customStyle=""}async close(){this.opened=!1,this.kupDrawerClose.emit({comp:this,id:this.rootElement.id})}async getProps(r){return p(this,u,r)}async isOpened(){return this.opened}async open(){this.opened=!0,this.kupDrawerOpen.emit({comp:this,id:this.rootElement.id})}async refresh(){t(this)}async setProps(r){d(this,u,r)}async toggle(){this.opened?this.close():this.open()}content(){const r=[],o=Array.prototype.slice.call(this.rootElement.children,0),t=[];for(let t=0;t<o.length;t++)r.push(e("slot",null));return t.push(e("div",{class:`${c}__content`},r)),t}componentWillLoad(){this.kupManager.debug.logLoad(this,!1),this.kupManager.theme.register(this)}componentDidLoad(){this.kupDrawerReady.emit({comp:this,id:this.rootElement.id}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return e(a,{"kup-opened":this.opened},e("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),e("div",{class:"backdrop",onClick:r=>{r.preventDefault(),r.stopPropagation()},onPointerDown:r=>{r.preventDefault(),r.stopPropagation(),this.close()},onTouchStart:r=>{r.preventDefault(),r.stopPropagation()}}),e("div",{id:n},e("div",{class:c},this.content())))}disconnectedCallback(){this.kupManager.theme.unregister(this)}get rootElement(){return i(this)}};l.style=":host{--kup_drawer_backdrop:var(--kup-drawer-backdrop, rgba(0, 0, 0, 0.32));--kup_drawer_box_shadow:var(\n --kup-drawer-box-shadow,\n 0 8px 10px -5px rgba(0, 0, 0, 0.2),\n 0 16px 24px 2px rgba(0, 0, 0, 0.14),\n 0 6px 30px 5px rgba(0, 0, 0, 0.12)\n );--kup_drawer_permanent_border:var(\n --kup-drawer-permanent-border,\n 1px solid var(--kup-border-color)\n );--kup_drawer_slide_transition:var(--kup-drawer-slide-transition, 750ms);--kup_drawer_transition:var(--kup-drawer-transition, 250ms);box-shadow:var(--kup_drawer_box_shadow);display:block;font-size:var(--kup-font-size);height:100vh;left:calc(var(--kup-drawer-width) * -1);position:fixed;top:0;transition:left var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1), right var(--kup_drawer_slide_transition) cubic-bezier(0.4, 0, 0.2, 1);width:var(--kup-drawer-width);z-index:var(--kup-drawer-zindex)}#kup-component{height:100%;width:100%}.backdrop{background:var(--kup_drawer_backdrop);display:none;height:100%;left:0;position:fixed;top:0;width:100%;z-index:var(--kup-drawer-zindex)}.drawer{height:100%;position:fixed;width:var(--kup-drawer-width);z-index:calc(var(--kup-drawer-zindex) + 1)}.drawer__content{background-color:var(--kup-drawer-background-color);box-sizing:border-box;height:100%;overflow-y:auto;width:100%}.drawer ::slotted(*){--kup-button-primary-color:var(--kup-drawer-color);--kup-button-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-button-primary-color-h:var(--kup-drawer-color-h);--kup-button-primary-color-s:var(--kup-drawer-color-s);--kup-button-primary-color-l:var(--kup-drawer-color-l);--kup-switch-label-color:var(--kup-drawer-color);--kup-switch-primary-color:var(--kup-drawer-color);--kup-switch-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-textfield-color:var(--kup-drawer-color);--kup-textfield-color-rgb:var(--kup-drawer-color-rgb);--kup-textfield-primary-color:var(--kup-drawer-color);--kup-textfield-primary-color-rgb:var(--kup-drawer-color-rgb);--kup-tree-color:var(--kup-drawer-color);--kup-tree-color-rgb:var(--kup-drawer-color-rgb);--kup-tree-filter-background-color:var(--kup-drawer-background-color);--kup-tree-icon-color:var(--kup-drawer-color);color:var(--kup-drawer-color);fill:var(--kup-drawer-color)}:host([kup-opened]){left:0}:host([kup-opened]) .backdrop{display:block}:host(.kup-right){left:unset;right:-100%}:host([kup-opened].kup-right){right:0}:host(.kup-permanent){box-shadow:unset;transition:all 250ms}:host(.kup-permanent) .backdrop{display:none}:host(.kup-permanent) .drawer{position:relative}:host(.kup-permanent) .drawer__content{border-right:var(--kup_drawer_permanent_border)}";export{l as kup_drawer}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as n,f as i,h as r,H as e,g as o,a}from"./p-9dcfbb1e.js";import{k as s,g as u,s as l,b as f,c as h,u as c,n as v}from"./p-
|
|
1
|
+
import{r as t,c as n,f as i,h as r,H as e,g as o,a}from"./p-9dcfbb1e.js";import{k as s,g as u,s as l,b as f,c as h,u as c,n as v}from"./p-b63a5a44.js";import{c as d}from"./p-97e8ea42.js";
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as c}from"./p-9dcfbb1e.js";import{F as i}from"./p-
|
|
1
|
+
import{h as c}from"./p-9dcfbb1e.js";import{F as i}from"./p-a7ae0b4d.js";import{K as s,l as e,b as n}from"./p-b63a5a44.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"},p.displayId?e.id+" - "+e.value: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 e,f as i,h as o,H as s,g as r}from"./p-9dcfbb1e.js";import{k as
|
|
1
|
+
import{r as t,c as e,f as i,h as o,H as s,g as r}from"./p-9dcfbb1e.js";import{k as a,g as h,s as n}from"./p-b63a5a44.js";import{c as p}from"./p-97e8ea42.js";var l;!function(t){t.customStyle="Custom style of the component.",t.placeholderAttrs="Html attributes of the picture before the component enters the viewport.",t.resourceAttrs="Html attributes of the picture after the component enters the viewport."}(l||(l={}));var f,c,d,u,m,w,b=function(t,e,i,o){if("a"===i&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?o:"a"===i?o.call(t):o?o.value:e.get(t)},v=function(t,e,i,o,s){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?s.call(t,i):s?s.value=i:e.set(t,i),i};const k=class{constructor(i){t(this,i),this.kupPhotoFramePlaceholderLoad=e(this,"kup-photoframe-placeholderload",6),this.kupPhotoFrameResourceLoad=e(this,"kup-photoframe-resourceload",6),f.set(this,null),c.set(this,a()),d.set(this,null),u.set(this,null),m.set(this,!1),w.set(this,null),this.isInViewport=!1,this.customStyle="",this.placeholderAttrs={},this.resourceAttrs={},this.threshold=.25}async getProps(t){return h(this,l,t)}async refresh(){i(this)}async setProps(t){n(this,l,t)}setObserver(){v(this,f,new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&(this.isInViewport=!0,b(this,f,"f").unobserve(this.rootElement))}))}),{threshold:this.threshold}),"f")}componentWillLoad(){b(this,c,"f").debug.logLoad(this,!1),b(this,c,"f").theme.register(this),this.setObserver()}componentDidLoad(){b(this,c,"f").debug.logLoad(this,!0)}componentWillRender(){b(this,c,"f").debug.logRender(this,!1)}componentDidRender(){b(this,c,"f").debug.logRender(this,!0)}render(){return this.isInViewport&&!b(this,m,"f")&&v(this,m,!0,"f"),o(s,null,o("style",null,b(this,c,"f").theme.setKupStyle(this.rootElement)),o("div",{id:p,ref:t=>{v(this,w,t,"f")}},o("img",Object.assign({},this.placeholderAttrs,{class:"placeholder",ref:t=>v(this,d,t,"f"),onLoad:()=>{b(this,d,"f").naturalWidth>b(this,d,"f").naturalHeight?b(this,w,"f").classList.add("horizontal"):b(this,w,"f").classList.add("vertical"),b(this,f,"f").observe(this.rootElement),b(this,d,"f").classList.add("placeholder--loaded"),this.kupPhotoFramePlaceholderLoad.emit({comp:this,id:this.rootElement.id})}})),b(this,m,"f")?o("img",Object.assign({},this.resourceAttrs,{class:"resource",ref:t=>v(this,u,t,"f"),onLoad:()=>{b(this,d,"f").classList.add("placeholder--fade-out"),b(this,u,"f").classList.add("resource--fade-in"),this.kupPhotoFrameResourceLoad.emit({comp:this,id:this.rootElement.id})}})):null))}disconnectedCallback(){var t;b(this,c,"f").theme.unregister(this),null===(t=b(this,f,"f"))||void 0===t||t.unobserve(this.rootElement)}get rootElement(){return r(this)}};f=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,m=new WeakMap,w=new WeakMap,k.style=":host{--kup_photoframe_border:var(\n --kup-photoframe-border,\n 1px inset var(--kup-border-color)\n );--kup_photoframe_fade_out_time:var(--kup-photoframe-fade-out-time, 2000ms);border:var(--kup_photoframe_border);display:block;height:100%;position:relative;width:100%}#kup-component{position:relative;height:100%;width:100%}img{max-height:100%;max-width:100%}.horizontal img{width:100%}.vertical img{height:100%}.placeholder{display:none;transition:opacity var(--kup_photoframe_fade_out_time) ease-out;will-change:opacity;z-index:1}.placeholder--loaded{display:block}.placeholder--fade-out{opacity:0;position:absolute}.resource{display:none;left:0;position:absolute;top:0;z-index:0}.resource--fade-in{display:block;position:relative}:host(.kup-fit) img{height:100%;object-fit:cover;width:100%}";export{k as kup_photo_frame}
|