@sme.up/ketchup 11.0.0-SNAPSHOT-20251003052954 → 11.0.0-SNAPSHOT-20251010074108

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 (74) hide show
  1. package/dist/cjs/kup-autocomplete_30.cjs.entry.js +13 -11
  2. package/dist/cjs/kup-family-tree.cjs.entry.js +1 -1
  3. package/dist/collection/components/kup-data-table/kup-data-table.js +13 -11
  4. package/dist/collection/components/kup-family-tree/kup-family-tree.css +1 -1
  5. package/dist/components/kup-accordion.js +1 -1
  6. package/dist/components/kup-activity-timeline.js +1 -1
  7. package/dist/components/kup-autocomplete.js +1 -1
  8. package/dist/components/kup-badge.js +1 -1
  9. package/dist/components/kup-box.js +1 -1
  10. package/dist/components/kup-button-list.js +1 -1
  11. package/dist/components/kup-button.js +1 -1
  12. package/dist/components/kup-calendar.js +1 -1
  13. package/dist/components/kup-card-list.js +2 -2
  14. package/dist/components/kup-card.js +1 -1
  15. package/dist/components/kup-cell.js +1 -1
  16. package/dist/components/kup-chart.js +1 -1
  17. package/dist/components/kup-checkbox.js +1 -1
  18. package/dist/components/kup-chip.js +1 -1
  19. package/dist/components/kup-color-picker.js +1 -1
  20. package/dist/components/kup-combobox.js +1 -1
  21. package/dist/components/kup-dashboard.js +1 -1
  22. package/dist/components/kup-data-table.js +1 -1
  23. package/dist/components/kup-date-picker.js +1 -1
  24. package/dist/components/kup-dialog.js +1 -1
  25. package/dist/components/kup-drawer.js +1 -1
  26. package/dist/components/kup-dropdown-button.js +1 -1
  27. package/dist/components/kup-echart.js +1 -1
  28. package/dist/components/kup-editor.js +1 -1
  29. package/dist/components/kup-family-tree.js +3 -3
  30. package/dist/components/kup-file-upload.js +1 -1
  31. package/dist/components/kup-form.js +1 -1
  32. package/dist/components/kup-gauge.js +1 -1
  33. package/dist/components/kup-grid.js +1 -1
  34. package/dist/components/kup-htm.js +1 -1
  35. package/dist/components/kup-iframe.js +1 -1
  36. package/dist/components/kup-image-list.js +1 -1
  37. package/dist/components/kup-image.js +1 -1
  38. package/dist/components/kup-input-panel.js +2 -2
  39. package/dist/components/kup-lazy.js +1 -1
  40. package/dist/components/kup-list.js +1 -1
  41. package/dist/components/kup-magic-box.js +3 -3
  42. package/dist/components/kup-nav-bar.js +1 -1
  43. package/dist/components/kup-numeric-picker.js +1 -1
  44. package/dist/components/kup-object-field.js +1 -1
  45. package/dist/components/kup-pdf.js +1 -1
  46. package/dist/components/kup-planner.js +1 -1
  47. package/dist/components/kup-probe.js +1 -1
  48. package/dist/components/kup-progress-bar.js +1 -1
  49. package/dist/components/kup-qlik.js +1 -1
  50. package/dist/components/kup-radio.js +1 -1
  51. package/dist/components/kup-rating.js +1 -1
  52. package/dist/components/kup-snackbar.js +1 -1
  53. package/dist/components/kup-spinner.js +1 -1
  54. package/dist/components/kup-switch.js +1 -1
  55. package/dist/components/kup-tab-bar.js +1 -1
  56. package/dist/components/kup-text-field.js +1 -1
  57. package/dist/components/kup-time-picker.js +1 -1
  58. package/dist/components/kup-toolbar.js +1 -1
  59. package/dist/components/kup-tree.js +1 -1
  60. package/dist/components/kup-txt.js +1 -1
  61. package/dist/components/kup-typography-list.js +1 -1
  62. package/dist/components/kup-typography.js +1 -1
  63. package/dist/components/{p-180ae30a.js → p-8ac71522.js} +1 -1
  64. package/dist/components/{p-359cbc3e.js → p-9f160476.js} +1 -1
  65. package/dist/components/{p-5791a2a6.js → p-ae15f575.js} +13 -11
  66. package/dist/components/{p-b089d9b6.js → p-d76c9502.js} +1 -1
  67. package/dist/components/{p-23b8f9a9.js → p-e738538e.js} +1 -1
  68. package/dist/esm/kup-autocomplete_30.entry.js +13 -11
  69. package/dist/esm/kup-family-tree.entry.js +1 -1
  70. package/dist/ketchup/ketchup.esm.js +1 -1
  71. package/dist/ketchup/p-3db5d0ce.entry.js +8 -0
  72. package/dist/ketchup/{p-4cb12245.entry.js → p-8aa2afee.entry.js} +1 -1
  73. package/package.json +1 -1
  74. package/dist/ketchup/p-759d0db7.entry.js +0 -8
@@ -1 +1 @@
1
- import{r as t,c as e,f as i,h as a,H as l,d as r}from"./p-710d0a7d.js";import{F as o}from"./p-ff735e62.js";import{a as n}from"./p-e3062c19.js";import{F as s}from"./p-cc9db65d.js";import{k as f,g as _,s as p,b as m,V as h}from"./p-f8aefe67.js";import{c}from"./p-635bb4b3.js";import"./p-cabebabc.js";var u;!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."}(u||(u={}));var d,y,k,g,v,x,b,w,z,j,C,E,T,W,M,S,D,L,O,P,R,A,F,X,Y,H=function(t,e,i,a){if("a"===i&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?a:"a"===i?a.call(t):a?a.value:e.get(t)},$=function(t,e,i,a,l){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!l)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!l:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?l.call(t,i):l?l.value=i:e.set(t,i),i};const B=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),y.set(this,[]),k.set(this,!1),g.set(this,0),v.set(this,0),x.set(this,[]),b.set(this,f()),w.set(this,(t=>{const e=t.clientX-H(this,g,"f"),i=t.clientY-H(this,v,"f");this.rootElement.scrollTop-=i,this.rootElement.scrollLeft-=e,$(this,g,t.clientX,"f"),$(this,v,t.clientY,"f")})),z.set(this,!1),j.set(this,null),this.autofitOnExpand=!0,this.autofitOnLoad=!0,this.cardData=null,this.collapsible=!0,this.customStyle="",this.data=null,this.layout=null,this.stackedLeaves=!1}async collapseAll(t=this.data.rows){H(this,b,"f").data.node.setProperties(t,{isExpanded:!1},!0),this.refresh()}async expandAll(t=this.data.rows){H(this,b,"f").data.node.setProperties(t,{isExpanded:!0},!0),this.refresh()}async getProps(t){return _(this,u,t)}async refresh(){i(this)}async runAutofit(){const t=H(this,j,"f").clientWidth,e=H(this,j,"f").children[0].clientWidth,i=.01,a=.85*t,l=.95*t;let r=1,o=2e3,n=e;for(;(n<a||n>l)&&o>0&&r>i;)o--,n<a?r+=i:n>l?r-=i:o=0,n=e*r;H(this,j,"f").style.setProperty("--kup_familytree_scale",r<=1?r.toFixed(2):"1")}async setProps(t){p(this,u,t)}componentWillLoad(){H(this,b,"f").debug.logLoad(this,!1),H(this,b,"f").language.register(this),H(this,b,"f").theme.register(this)}componentDidLoad(){H(this,d,"m",X).call(this),this.autofitOnLoad&&this.runAutofit(),H(this,b,"f").debug.logLoad(this,!0)}componentWillRender(){H(this,b,"f").debug.logRender(this,!1)}componentDidRender(){H(this,z,"f")&&($(this,z,!1,"f"),this.runAutofit()),H(this,b,"f").debug.logRender(this,!0)}render(){return a(l,{key:"e7a1464b62837b0ca1e57cda5c4184f778b29b6f",onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault(),H(this,d,"m",O).call(this,t)},onWheel:t=>{H(this,d,"m",Y).call(this,t)}},a("style",{key:"ff69c47ff4ee430357a2f53a29f027ea4c43888f"},H(this,b,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"6c92cde73c306fa704b16e7e800c608b3e30ff5d",id:c},H(this,d,"m",D).call(this)))}disconnectedCallback(){H(this,b,"f").language.unregister(this),H(this,b,"f").theme.unregister(this)}get rootElement(){return r(this)}};y=new WeakMap,k=new WeakMap,g=new WeakMap,v=new WeakMap,x=new WeakMap,b=new WeakMap,w=new WeakMap,z=new WeakMap,j=new WeakMap,d=new WeakSet,C=function(t,e,i,l){const r=[];return r.push(a("td",{class:{"family-tree__line":!0,"family-tree__line--right":!t,"family-tree__line--top":!t}},a("div",{class:"family-tree__line--placeholder"}))),r.push(a("td",{class:{"family-tree__line":!0,"family-tree__line--left":t,"family-tree__line--top":t&&!i||l&&!e}},a("div",{class:"family-tree__line--placeholder"}))),r},E=function t(e){var i;let l=null,r=null;(!this.collapsible||this.collapsible&&e.isExpanded)&&(null===(i=e.children)||void 0===i||i.forEach((t=>{t.isStaff?(r||(r=[]),r.push(t)):(l||(l=[]),l.push(t))})));const s=this.stackedLeaves&&l&&l.every((t=>!t.children||0==t.children.length)),f=l?2*l.length:1,_={"family-tree__line":!0,"family-tree__line--placeholder":!(!l&&!r),"family-tree__line--vertical":!(!l&&!r)},p={columns:[{name:"*TREECOL",title:"Fake column",visible:!1},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]},h=e.layout||this.layout||1,c={icon:e.isExpanded?"remove":"plus",shaped:!0,slim:!0,styling:n.OUTLINED,title:`${H(this,b,"f").language.translate(m.EXPAND)}/${H(this,b,"f").language.translate(m.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&&$(this,z,!0,"f"),this.refresh()},wrapperClass:"family-tree__item__expand"};let u=null;H(this,d,"m",L).call(this,h)&&(u=a("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:p,cardData:this.cardData,layout:this.cardData?null:h,showSelection:!1}));const y=a("div",{class:"family-tree__item"},a("div",{class:"family-tree__item__wrapper"},H(this,d,"m",L).call(this,h)?u:H(this,d,"m",T).call(this,e,h),this.collapsible&&e.children&&e.children.length>0?a(o,Object.assign({},c)):void 0)),k={"--kup_familytree_staffchildren":(null==r?void 0:r.length.toString())||"0"};return a("table",{class:{"family-tree__node":!0,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||0==e.children.length)}},a("tr",null,a("td",{"data-row":e,colSpan:f},y)),a("tr",null,a("td",{colSpan:f},a("div",{class:_}))),r?[a("tr",null,a("td",{colSpan:f},a("div",{class:Object.assign(Object.assign({},_),{"family-tree__line--staff":!0}),style:k}),a("div",{class:"family-tree__node__staff",style:k},r.map((e=>[a("div",{class:"family-tree__node__staff__item"},H(this,d,"m",t).call(this,e))])))))]:null,r&&l?[a("tr",null,a("td",{colSpan:f},a("div",{class:_})))]:null,l?[a("tr",null,s?a("td",{colSpan:f},a("div",{class:_})):l.map((t=>H(this,d,"m",C).call(this,0==l.indexOf(t),l.indexOf(t)==l.length-1,1==l.length,l.length>2)))),a("tr",null,s?a("td",{colSpan:f},l.map((e=>H(this,d,"m",t).call(this,e)))):l.map((e=>a("td",{colSpan:2},H(this,d,"m",t).call(this,e)))))]:void 0)},T=function(t,e){return 2===e?H(this,d,"m",M).call(this,t):H(this,d,"m",W).call(this,t)},W=function(t){return a("div",{class:"family-tree__item__layout family-tree__item__layout--1"},a("div",{class:"family-tree__item__layout__text__title"},t.value))},M=function(t){return a("div",{class:"family-tree__item__layout family-tree__item__layout--2"},a("div",{class:"family-tree__item__layout__color"}),a("div",{class:"family-tree__item__layout__image"},a(s,{resource:t.icon,placeholderResource:t.placeholderIcon,sizeX:"48px",sizeY:"48px"})),a("div",{class:"family-tree__item__layout__text"},a("div",{class:"family-tree__item__layout__text__title"},t.value),t.title?a("div",{class:"family-tree__item__layout__text__subtitle"},t.title):null))},S=function(t){return t.map((t=>H(this,d,"m",E).call(this,t)))},D=function(){return a("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>$(this,j,t,"f")},this.data&&this.data.rows&&this.data.rows.length?H(this,d,"m",S).call(this,this.data.rows):a("div",null,H(this,b,"f").language.translate(m.EMPTY_DATA)))},L=function(t){return!!this.cardData||t&&t.sections&&t.sections.length>0},O=function(t){$(this,g,t.clientX,"f"),$(this,v,t.clientY,"f"),H(this,j,"f").classList.add("family-tree--dragging");const e=()=>{document.removeEventListener("pointermove",H(this,w,"f")),document.removeEventListener("pointerup",e),H(this,j,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",H(this,w,"f")),document.addEventListener("pointerup",e)},P=function(t,e){let i,a;if(t)for(let e=t.length-1;e>=0;e--){const l=t[e];l.tagName&&(l.classList.contains("family-tree__item__expand")&&(i=l),"TD"===l.tagName.toUpperCase())&&(a=l)}let l=null,r=null,o=null;return a&&(l=a["data-cell"],r=a["data-column"],o=a["data-row"]),{cell:l||null,column:r||null,expandButton:i||null,originalEvent:e,row:o||null,td:a||null}},R=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},A=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},F=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},X=function(){H(this,x,"f").push(this.rootElement),H(this,b,"f").interact.on(this.rootElement,h.TAP,(t=>{if(H(this,k,"f"))$(this,k,!1,"f");else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];H(this,y,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",R).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,t)})}})),H(this,b,"f").interact.on(this.rootElement,h.DOUBLETAP,(t=>{if(0===t.button){for(let t=0;t<H(this,y,"f").length;t++)clearTimeout(H(this,y,"f")[t]),H(this,b,"f").debug.logMessage(this,"Cleared clickHandler timeout("+H(this,y,"f")[t]+").");$(this,y,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",F).call(this,t)})}})),H(this,b,"f").interact.on(this.rootElement,h.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||($(this,k,!0,"f"),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,t)}))}))},Y=function(t){if(t.ctrlKey){t.preventDefault();const e=parseFloat(H(this,j,"f").style.getPropertyValue("--kup_familytree_scale"))||1,i=.05;let a=t.deltaY>0?e-i:e+i;a<i&&(a=i),H(this,j,"f").style.setProperty("--kup_familytree_scale",a.toFixed(2))}},B.style='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_familytree_item_background_color:var(\n --kup-layer-1,\n var(--kup-layer-1)\n );--kup_familytree_border_color:var(\n --kup-familytree-border-color,\n var(--kup-info-color-50)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-color)\n );--kup_familytree_item_minheight:var(--kup-familytree-item-minheight, 32px);--kup_familytree_item_height:var(--kup-familytree-item-height, 100%);--kup_familytree_item_h_padding:var(\n --kup-familytree-item-h-padding,\n var(--kup-space-00)\n );--kup_familytree_item_v_padding:var(\n --kup-familytree-item-v-padding,\n var(--kup-space-03)\n );--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-subtle)\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_minheight) + 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_minheight) / 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:32px}.family-tree__line--staff{height:calc(var(--kup_familytree_staffchildren) * var(--kup_familytree_item_minheight) + 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;display:flex;flex-direction:column}.family-tree__item__wrapper kup-box{margin:0 auto;overflow:hidden;padding:0 var(--kup-space-05);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);box-sizing:border-box;display:flex;height:--kup_familytree_item_minheight;min-height:32px;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_familytree_border_color);height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto var(--kup-space-03)}.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{B as kup_family_tree}
1
+ import{r as t,c as e,f as i,h as a,H as l,d as r}from"./p-710d0a7d.js";import{F as o}from"./p-ff735e62.js";import{a as n}from"./p-e3062c19.js";import{F as s}from"./p-cc9db65d.js";import{k as f,g as _,s as p,b as m,V as h}from"./p-f8aefe67.js";import{c}from"./p-635bb4b3.js";import"./p-cabebabc.js";var u;!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."}(u||(u={}));var d,y,k,g,v,x,b,w,z,j,C,E,T,W,M,S,D,L,O,P,R,A,F,X,Y,H=function(t,e,i,a){if("a"===i&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?a:"a"===i?a.call(t):a?a.value:e.get(t)},$=function(t,e,i,a,l){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!l)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!l:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?l.call(t,i):l?l.value=i:e.set(t,i),i};const B=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),y.set(this,[]),k.set(this,!1),g.set(this,0),v.set(this,0),x.set(this,[]),b.set(this,f()),w.set(this,(t=>{const e=t.clientX-H(this,g,"f"),i=t.clientY-H(this,v,"f");this.rootElement.scrollTop-=i,this.rootElement.scrollLeft-=e,$(this,g,t.clientX,"f"),$(this,v,t.clientY,"f")})),z.set(this,!1),j.set(this,null),this.autofitOnExpand=!0,this.autofitOnLoad=!0,this.cardData=null,this.collapsible=!0,this.customStyle="",this.data=null,this.layout=null,this.stackedLeaves=!1}async collapseAll(t=this.data.rows){H(this,b,"f").data.node.setProperties(t,{isExpanded:!1},!0),this.refresh()}async expandAll(t=this.data.rows){H(this,b,"f").data.node.setProperties(t,{isExpanded:!0},!0),this.refresh()}async getProps(t){return _(this,u,t)}async refresh(){i(this)}async runAutofit(){const t=H(this,j,"f").clientWidth,e=H(this,j,"f").children[0].clientWidth,i=.01,a=.85*t,l=.95*t;let r=1,o=2e3,n=e;for(;(n<a||n>l)&&o>0&&r>i;)o--,n<a?r+=i:n>l?r-=i:o=0,n=e*r;H(this,j,"f").style.setProperty("--kup_familytree_scale",r<=1?r.toFixed(2):"1")}async setProps(t){p(this,u,t)}componentWillLoad(){H(this,b,"f").debug.logLoad(this,!1),H(this,b,"f").language.register(this),H(this,b,"f").theme.register(this)}componentDidLoad(){H(this,d,"m",X).call(this),this.autofitOnLoad&&this.runAutofit(),H(this,b,"f").debug.logLoad(this,!0)}componentWillRender(){H(this,b,"f").debug.logRender(this,!1)}componentDidRender(){H(this,z,"f")&&($(this,z,!1,"f"),this.runAutofit()),H(this,b,"f").debug.logRender(this,!0)}render(){return a(l,{key:"e7a1464b62837b0ca1e57cda5c4184f778b29b6f",onDrag:t=>t.preventDefault(),onPointerDown:t=>{t.preventDefault(),H(this,d,"m",O).call(this,t)},onWheel:t=>{H(this,d,"m",Y).call(this,t)}},a("style",{key:"ff69c47ff4ee430357a2f53a29f027ea4c43888f"},H(this,b,"f").theme.setKupStyle(this.rootElement)),a("div",{key:"6c92cde73c306fa704b16e7e800c608b3e30ff5d",id:c},H(this,d,"m",D).call(this)))}disconnectedCallback(){H(this,b,"f").language.unregister(this),H(this,b,"f").theme.unregister(this)}get rootElement(){return r(this)}};y=new WeakMap,k=new WeakMap,g=new WeakMap,v=new WeakMap,x=new WeakMap,b=new WeakMap,w=new WeakMap,z=new WeakMap,j=new WeakMap,d=new WeakSet,C=function(t,e,i,l){const r=[];return r.push(a("td",{class:{"family-tree__line":!0,"family-tree__line--right":!t,"family-tree__line--top":!t}},a("div",{class:"family-tree__line--placeholder"}))),r.push(a("td",{class:{"family-tree__line":!0,"family-tree__line--left":t,"family-tree__line--top":t&&!i||l&&!e}},a("div",{class:"family-tree__line--placeholder"}))),r},E=function t(e){var i;let l=null,r=null;(!this.collapsible||this.collapsible&&e.isExpanded)&&(null===(i=e.children)||void 0===i||i.forEach((t=>{t.isStaff?(r||(r=[]),r.push(t)):(l||(l=[]),l.push(t))})));const s=this.stackedLeaves&&l&&l.every((t=>!t.children||0==t.children.length)),f=l?2*l.length:1,_={"family-tree__line":!0,"family-tree__line--placeholder":!(!l&&!r),"family-tree__line--vertical":!(!l&&!r)},p={columns:[{name:"*TREECOL",title:"Fake column",visible:!1},...this.data.columns],rows:[{cells:Object.assign({"*TREECOL":e},e.cells)}]},h=e.layout||this.layout||1,c={icon:e.isExpanded?"remove":"plus",shaped:!0,slim:!0,styling:n.OUTLINED,title:`${H(this,b,"f").language.translate(m.EXPAND)}/${H(this,b,"f").language.translate(m.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&&$(this,z,!0,"f"),this.refresh()},wrapperClass:"family-tree__item__expand"};let u=null;H(this,d,"m",L).call(this,h)&&(u=a("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:p,cardData:this.cardData,layout:this.cardData?null:h,showSelection:!1}));const y=a("div",{class:"family-tree__item"},a("div",{class:"family-tree__item__wrapper"},H(this,d,"m",L).call(this,h)?u:H(this,d,"m",T).call(this,e,h),this.collapsible&&e.children&&e.children.length>0?a(o,Object.assign({},c)):void 0)),k={"--kup_familytree_staffchildren":(null==r?void 0:r.length.toString())||"0"};return a("table",{class:{"family-tree__node":!0,"family-tree__node--stacked":this.stackedLeaves&&!e.isStaff&&(!e.children||0==e.children.length)}},a("tr",null,a("td",{"data-row":e,colSpan:f},y)),a("tr",null,a("td",{colSpan:f},a("div",{class:_}))),r?[a("tr",null,a("td",{colSpan:f},a("div",{class:Object.assign(Object.assign({},_),{"family-tree__line--staff":!0}),style:k}),a("div",{class:"family-tree__node__staff",style:k},r.map((e=>[a("div",{class:"family-tree__node__staff__item"},H(this,d,"m",t).call(this,e))])))))]:null,r&&l?[a("tr",null,a("td",{colSpan:f},a("div",{class:_})))]:null,l?[a("tr",null,s?a("td",{colSpan:f},a("div",{class:_})):l.map((t=>H(this,d,"m",C).call(this,0==l.indexOf(t),l.indexOf(t)==l.length-1,1==l.length,l.length>2)))),a("tr",null,s?a("td",{colSpan:f},l.map((e=>H(this,d,"m",t).call(this,e)))):l.map((e=>a("td",{colSpan:2},H(this,d,"m",t).call(this,e)))))]:void 0)},T=function(t,e){return 2===e?H(this,d,"m",M).call(this,t):H(this,d,"m",W).call(this,t)},W=function(t){return a("div",{class:"family-tree__item__layout family-tree__item__layout--1"},a("div",{class:"family-tree__item__layout__text__title"},t.value))},M=function(t){return a("div",{class:"family-tree__item__layout family-tree__item__layout--2"},a("div",{class:"family-tree__item__layout__color"}),a("div",{class:"family-tree__item__layout__image"},a(s,{resource:t.icon,placeholderResource:t.placeholderIcon,sizeX:"48px",sizeY:"48px"})),a("div",{class:"family-tree__item__layout__text"},a("div",{class:"family-tree__item__layout__text__title"},t.value),t.title?a("div",{class:"family-tree__item__layout__text__subtitle"},t.title):null))},S=function(t){return t.map((t=>H(this,d,"m",E).call(this,t)))},D=function(){return a("div",{class:"family-tree",onContextMenu:t=>{t.preventDefault()},ref:t=>$(this,j,t,"f")},this.data&&this.data.rows&&this.data.rows.length?H(this,d,"m",S).call(this,this.data.rows):a("div",null,H(this,b,"f").language.translate(m.EMPTY_DATA)))},L=function(t){return!!this.cardData||t&&t.sections&&t.sections.length>0},O=function(t){$(this,g,t.clientX,"f"),$(this,v,t.clientY,"f"),H(this,j,"f").classList.add("family-tree--dragging");const e=()=>{document.removeEventListener("pointermove",H(this,w,"f")),document.removeEventListener("pointerup",e),H(this,j,"f").classList.remove("family-tree--dragging")};document.addEventListener("pointermove",H(this,w,"f")),document.addEventListener("pointerup",e)},P=function(t,e){let i,a;if(t)for(let e=t.length-1;e>=0;e--){const l=t[e];l.tagName&&(l.classList.contains("family-tree__item__expand")&&(i=l),"TD"===l.tagName.toUpperCase())&&(a=l)}let l=null,r=null,o=null;return a&&(l=a["data-cell"],r=a["data-column"],o=a["data-row"]),{cell:l||null,column:r||null,expandButton:i||null,originalEvent:e,row:o||null,td:a||null}},R=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},A=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},F=function(t){return H(this,d,"m",P).call(this,H(this,b,"f").getEventPath(t.target,this.rootElement),t)},X=function(){H(this,x,"f").push(this.rootElement),H(this,b,"f").interact.on(this.rootElement,h.TAP,(t=>{if(H(this,k,"f"))$(this,k,!1,"f");else switch(t.button){case 0:const e={};for(const i in t)e[i]=t[i];H(this,y,"f").push(setTimeout((()=>{this.kupClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",R).call(this,e)})}),300));break;case 2:this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,t)})}})),H(this,b,"f").interact.on(this.rootElement,h.DOUBLETAP,(t=>{if(0===t.button){for(let t=0;t<H(this,y,"f").length;t++)clearTimeout(H(this,y,"f")[t]),H(this,b,"f").debug.logMessage(this,"Cleared clickHandler timeout("+H(this,y,"f")[t]+").");$(this,y,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",F).call(this,t)})}})),H(this,b,"f").interact.on(this.rootElement,h.HOLD,(t=>{"pen"!==t.pointerType&&"touch"!==t.pointerType||($(this,k,!0,"f"),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,details:H(this,d,"m",A).call(this,t)}))}))},Y=function(t){if(t.ctrlKey){t.preventDefault();const e=parseFloat(H(this,j,"f").style.getPropertyValue("--kup_familytree_scale"))||1,i=.05;let a=t.deltaY>0?e-i:e+i;a<i&&(a=i),H(this,j,"f").style.setProperty("--kup_familytree_scale",a.toFixed(2))}},B.style='.kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:var(--kup-label-01-font-size, 12px);line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-compact-01-font-size, 14px);line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:var(--kup-heading-01-font-size, 14px);line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_familytree_item_background_color:var(\n --kup-layer-1,\n var(--kup-layer-1)\n );--kup_familytree_border_color:var(\n --kup-familytree-border-color,\n var(--kup-info-color-50)\n );--kup_familytree_item_color:var(\n --kup-familytree-item-color,\n var(--kup-text-color)\n );--kup_familytree_item_minheight:var(--kup-familytree-item-minheight, 32px);--kup_familytree_item_height:var(--kup-familytree-item-height, 100%);--kup_familytree_item_h_padding:var(\n --kup-familytree-item-h-padding,\n var(--kup-space-00)\n );--kup_familytree_item_v_padding:var(\n --kup-familytree-item-v-padding,\n var(--kup-space-03)\n );--kup_familytree_item_width:var(--kup-familytree-item-width, 280px);--kup_familytree_lines_color:var(\n --kup-familytree-lines-color,\n var(--kup-border-subtle)\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_minheight) + 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_minheight) / 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:32px}.family-tree__line--staff{height:calc(var(--kup_familytree_staffchildren) * var(--kup_familytree_item_minheight) + 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;display:flex;flex-direction:column}.family-tree__item__wrapper kup-box{margin:0 auto;overflow:hidden;padding:0 var(--kup-space-05);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);box-sizing:border-box;display:flex;height:var(--kup_familytree_item_minheight);min-height:32px;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_familytree_border_color);height:100%;width:10px}.family-tree__item__layout__image{display:flex;margin:auto var(--kup-space-03)}.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{B as kup_family_tree}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sme.up/ketchup",
3
- "version": "11.0.0-SNAPSHOT-20251003052954",
3
+ "version": "11.0.0-SNAPSHOT-20251010074108",
4
4
  "keywords": [
5
5
  "smeup",
6
6
  "KetchUP",