@sme.up/ketchup 11.0.0-SNAPSHOT-20250626150642 → 11.0.0-SNAPSHOT-20250630112121

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 (184) hide show
  1. package/dist/cjs/{f-cell-42434dd4.js → f-cell-aefb10a3.js} +6 -5
  2. package/dist/cjs/{f-chip-6ee9a857.js → f-chip-0c6382a4.js} +1 -1
  3. package/dist/cjs/{f-object-field-36a7a088.js → f-object-field-295001fd.js} +2 -2
  4. package/dist/cjs/{f-paginator-utils-85851c60.js → f-paginator-utils-68e0fc0b.js} +9 -7
  5. package/dist/cjs/{f-text-field-08cefe40.js → f-text-field-3bdef1fd.js} +1 -1
  6. package/dist/cjs/index.cjs.js +1 -1
  7. package/dist/cjs/kup-accordion.cjs.entry.js +1 -1
  8. package/dist/cjs/kup-activity-timeline.cjs.entry.js +2 -2
  9. package/dist/cjs/kup-autocomplete_30.cjs.entry.js +13 -13
  10. package/dist/cjs/kup-box.cjs.entry.js +7 -7
  11. package/dist/cjs/kup-calendar.cjs.entry.js +2 -2
  12. package/dist/cjs/kup-card-list.cjs.entry.js +1 -1
  13. package/dist/cjs/kup-cell.cjs.entry.js +5 -5
  14. package/dist/cjs/kup-dashboard.cjs.entry.js +2 -2
  15. package/dist/cjs/{kup-data-table-helper-a5e783ba.js → kup-data-table-helper-f77c1640.js} +1 -1
  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-editor.cjs.entry.js +1 -1
  19. package/dist/cjs/kup-family-tree.cjs.entry.js +1 -1
  20. package/dist/cjs/kup-grid.cjs.entry.js +1 -1
  21. package/dist/cjs/kup-htm.cjs.entry.js +1 -1
  22. package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
  23. package/dist/cjs/kup-input-panel.cjs.entry.js +5 -5
  24. package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
  25. package/dist/cjs/kup-magic-box.cjs.entry.js +1 -1
  26. package/dist/cjs/{kup-manager-c93c6720.js → kup-manager-b304484b.js} +1 -1
  27. package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
  28. package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
  29. package/dist/cjs/kup-object-field.cjs.entry.js +3 -3
  30. package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
  31. package/dist/cjs/kup-planner.cjs.entry.js +2 -2
  32. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  33. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  34. package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
  35. package/dist/cjs/kup-txt.cjs.entry.js +1 -1
  36. package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
  37. package/dist/cjs/kup-typography.cjs.entry.js +1 -1
  38. package/dist/collection/components/kup-data-table/kup-data-table.css +7 -4
  39. package/dist/collection/components/kup-data-table/kup-data-table.js +5 -5
  40. package/dist/collection/f-components/f-cell/f-cell.js +2 -1
  41. package/dist/collection/f-components/f-paginator/f-paginator.js +1 -1
  42. package/dist/components/index.js +1 -1
  43. package/dist/components/kup-accordion.js +2 -2
  44. package/dist/components/kup-activity-timeline.js +2 -2
  45. package/dist/components/kup-autocomplete.js +1 -1
  46. package/dist/components/kup-badge.js +1 -1
  47. package/dist/components/kup-box.js +1 -1
  48. package/dist/components/kup-button-list.js +1 -1
  49. package/dist/components/kup-button.js +1 -1
  50. package/dist/components/kup-calendar.js +2 -2
  51. package/dist/components/kup-card-list.js +3 -3
  52. package/dist/components/kup-card.js +1 -1
  53. package/dist/components/kup-cell.js +2 -2
  54. package/dist/components/kup-chart.js +1 -1
  55. package/dist/components/kup-checkbox.js +1 -1
  56. package/dist/components/kup-chip.js +1 -1
  57. package/dist/components/kup-color-picker.js +1 -1
  58. package/dist/components/kup-combobox.js +1 -1
  59. package/dist/components/kup-dashboard.js +2 -2
  60. package/dist/components/kup-data-table.js +1 -1
  61. package/dist/components/kup-date-picker.js +1 -1
  62. package/dist/components/kup-dialog.js +1 -1
  63. package/dist/components/kup-drawer.js +2 -2
  64. package/dist/components/kup-dropdown-button.js +1 -1
  65. package/dist/components/kup-echart.js +1 -1
  66. package/dist/components/kup-editor.js +1 -1
  67. package/dist/components/kup-family-tree.js +3 -3
  68. package/dist/components/kup-file-upload.js +1 -1
  69. package/dist/components/kup-form.js +1 -1
  70. package/dist/components/kup-gauge.js +1 -1
  71. package/dist/components/kup-grid.js +1 -1
  72. package/dist/components/kup-htm.js +2 -2
  73. package/dist/components/kup-iframe.js +2 -2
  74. package/dist/components/kup-image-list.js +1 -1
  75. package/dist/components/kup-image.js +1 -1
  76. package/dist/components/kup-input-panel.js +3 -3
  77. package/dist/components/kup-lazy.js +2 -2
  78. package/dist/components/kup-list.js +1 -1
  79. package/dist/components/kup-magic-box.js +4 -4
  80. package/dist/components/kup-nav-bar.js +2 -2
  81. package/dist/components/kup-numeric-picker.js +2 -2
  82. package/dist/components/kup-object-field.js +2 -2
  83. package/dist/components/kup-pdf.js +2 -2
  84. package/dist/components/kup-planner.js +2 -2
  85. package/dist/components/kup-probe.js +2 -2
  86. package/dist/components/kup-progress-bar.js +1 -1
  87. package/dist/components/kup-qlik.js +2 -2
  88. package/dist/components/kup-radio.js +1 -1
  89. package/dist/components/kup-rating.js +1 -1
  90. package/dist/components/kup-snackbar.js +2 -2
  91. package/dist/components/kup-spinner.js +1 -1
  92. package/dist/components/kup-switch.js +1 -1
  93. package/dist/components/kup-tab-bar.js +1 -1
  94. package/dist/components/kup-text-field.js +1 -1
  95. package/dist/components/kup-time-picker.js +1 -1
  96. package/dist/components/kup-toolbar.js +1 -1
  97. package/dist/components/kup-tree.js +1 -1
  98. package/dist/components/kup-txt.js +2 -2
  99. package/dist/components/kup-typography-list.js +2 -2
  100. package/dist/components/kup-typography.js +2 -2
  101. package/dist/components/{p-2e66f1da.js → p-36581da1.js} +1 -1
  102. package/dist/components/{p-52d3c303.js → p-4010edcb.js} +17 -14
  103. package/dist/components/{p-d4d184b9.js → p-41dca734.js} +2 -2
  104. package/dist/components/{p-b3d29034.js → p-850b345f.js} +2 -2
  105. package/dist/components/{p-14e9ae74.js → p-967a7033.js} +2 -2
  106. package/dist/components/{p-0d8d9c00.js → p-b799fbaa.js} +2 -2
  107. package/dist/esm/{f-cell-130ba220.js → f-cell-1e0c1c35.js} +6 -5
  108. package/dist/esm/{f-chip-5c55b1d9.js → f-chip-c6753f00.js} +1 -1
  109. package/dist/esm/{f-object-field-05b9ff32.js → f-object-field-27c01f5d.js} +2 -2
  110. package/dist/esm/{f-paginator-utils-dc850193.js → f-paginator-utils-97d60fcd.js} +9 -7
  111. package/dist/esm/{f-text-field-ebbc4372.js → f-text-field-e8071d43.js} +1 -1
  112. package/dist/esm/index.js +1 -1
  113. package/dist/esm/kup-accordion.entry.js +1 -1
  114. package/dist/esm/kup-activity-timeline.entry.js +2 -2
  115. package/dist/esm/kup-autocomplete_30.entry.js +13 -13
  116. package/dist/esm/kup-box.entry.js +7 -7
  117. package/dist/esm/kup-calendar.entry.js +2 -2
  118. package/dist/esm/kup-card-list.entry.js +1 -1
  119. package/dist/esm/kup-cell.entry.js +5 -5
  120. package/dist/esm/kup-dashboard.entry.js +2 -2
  121. package/dist/esm/{kup-data-table-helper-2429690f.js → kup-data-table-helper-9c1fb29b.js} +1 -1
  122. package/dist/esm/kup-drawer.entry.js +1 -1
  123. package/dist/esm/kup-echart.entry.js +1 -1
  124. package/dist/esm/kup-editor.entry.js +1 -1
  125. package/dist/esm/kup-family-tree.entry.js +1 -1
  126. package/dist/esm/kup-grid.entry.js +1 -1
  127. package/dist/esm/kup-htm.entry.js +1 -1
  128. package/dist/esm/kup-iframe.entry.js +1 -1
  129. package/dist/esm/kup-input-panel.entry.js +5 -5
  130. package/dist/esm/kup-lazy.entry.js +1 -1
  131. package/dist/esm/kup-magic-box.entry.js +1 -1
  132. package/dist/esm/{kup-manager-d5a07144.js → kup-manager-dd89a883.js} +1 -1
  133. package/dist/esm/kup-nav-bar.entry.js +1 -1
  134. package/dist/esm/kup-numeric-picker.entry.js +2 -2
  135. package/dist/esm/kup-object-field.entry.js +3 -3
  136. package/dist/esm/kup-pdf.entry.js +1 -1
  137. package/dist/esm/kup-planner.entry.js +2 -2
  138. package/dist/esm/kup-probe.entry.js +1 -1
  139. package/dist/esm/kup-qlik.entry.js +1 -1
  140. package/dist/esm/kup-snackbar.entry.js +1 -1
  141. package/dist/esm/kup-txt.entry.js +1 -1
  142. package/dist/esm/kup-typography-list.entry.js +1 -1
  143. package/dist/esm/kup-typography.entry.js +1 -1
  144. package/dist/ketchup/index.esm.js +1 -1
  145. package/dist/ketchup/ketchup.esm.js +1 -1
  146. package/dist/ketchup/{p-9e0f738c.entry.js → p-049aff76.entry.js} +1 -1
  147. package/dist/ketchup/{p-90a8574b.entry.js → p-06739c3a.entry.js} +1 -1
  148. package/dist/ketchup/{p-11114668.entry.js → p-0f83f4f6.entry.js} +1 -1
  149. package/dist/ketchup/{p-64f563c4.entry.js → p-15864e10.entry.js} +1 -1
  150. package/dist/ketchup/{p-94aebcdc.entry.js → p-1be234ef.entry.js} +1 -1
  151. package/dist/ketchup/{p-3decca93.entry.js → p-2600c938.entry.js} +1 -1
  152. package/dist/ketchup/{p-a1367796.entry.js → p-2b6f3146.entry.js} +1 -1
  153. package/dist/ketchup/{p-83ed7130.entry.js → p-2d62ac52.entry.js} +1 -1
  154. package/dist/ketchup/p-3467107c.js +1 -0
  155. package/dist/ketchup/{p-2aca4771.entry.js → p-495ede7f.entry.js} +1 -1
  156. package/dist/ketchup/{p-e90d5b73.entry.js → p-529e9c17.entry.js} +1 -1
  157. package/dist/ketchup/{p-732119cb.js → p-5e7fc8f7.js} +1 -1
  158. package/dist/ketchup/{p-7cdbb8d0.entry.js → p-637fc494.entry.js} +1 -1
  159. package/dist/ketchup/{p-5d21057a.entry.js → p-6c754e92.entry.js} +1 -1
  160. package/dist/ketchup/{p-b54d9c57.entry.js → p-7b66c06e.entry.js} +1 -1
  161. package/dist/ketchup/{p-c192deb4.entry.js → p-81a117d4.entry.js} +1 -1
  162. package/dist/ketchup/{p-099000bb.entry.js → p-82263bad.entry.js} +1 -1
  163. package/dist/ketchup/{p-e9980c8e.entry.js → p-83d4e35f.entry.js} +2 -2
  164. package/dist/ketchup/{p-c3286a10.entry.js → p-8561e6f3.entry.js} +1 -1
  165. package/dist/ketchup/{p-641aadcb.entry.js → p-8b21f5f7.entry.js} +1 -1
  166. package/dist/ketchup/{p-8a5c9935.entry.js → p-8ee507c7.entry.js} +1 -1
  167. package/dist/ketchup/{p-1b87487a.entry.js → p-92f87810.entry.js} +1 -1
  168. package/dist/ketchup/{p-84eec970.js → p-9853ddff.js} +1 -1
  169. package/dist/ketchup/{p-b99f51b9.entry.js → p-a7bac9d3.entry.js} +1 -1
  170. package/dist/ketchup/{p-3c8b47bf.js → p-ab9bc56f.js} +1 -1
  171. package/dist/ketchup/{p-dfecdbdd.entry.js → p-b51a458b.entry.js} +1 -1
  172. package/dist/ketchup/{p-c1424375.entry.js → p-b5be4b13.entry.js} +1 -1
  173. package/dist/ketchup/{p-9d3a7a49.entry.js → p-ba58b9bf.entry.js} +1 -1
  174. package/dist/ketchup/{p-e5a7ed1b.entry.js → p-be3f8463.entry.js} +1 -1
  175. package/dist/ketchup/{p-e4a51171.entry.js → p-d77205b8.entry.js} +1 -1
  176. package/dist/ketchup/p-e64eaf9b.js +1 -0
  177. package/dist/ketchup/{p-bfde2976.js → p-e7893d62.js} +1 -1
  178. package/dist/ketchup/{p-68627e54.entry.js → p-e84b87f3.entry.js} +1 -1
  179. package/dist/ketchup/{p-a9cd3cab.entry.js → p-ee8c88a4.entry.js} +1 -1
  180. package/dist/ketchup/{p-8e324594.entry.js → p-f798edd5.entry.js} +1 -1
  181. package/dist/ketchup/{p-1312de59.js → p-f86e6523.js} +1 -1
  182. package/package.json +1 -1
  183. package/dist/ketchup/p-5dfc69ee.js +0 -1
  184. package/dist/ketchup/p-cdb856cd.js +0 -1
@@ -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-c4224227.js";import{a as n}from"./p-e3062c19.js";import{F as s}from"./p-3cab6420.js";import{k as f,g as _,s as p,b as m,V as h}from"./p-732119cb.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-c4224227.js";import{a as n}from"./p-e3062c19.js";import{F as s}from"./p-3cab6420.js";import{k as f,g as _,s as p,b as m,V as h}from"./p-5e7fc8f7.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,4 +1,4 @@
1
- import{r as t,c as n,f as i,h as r,H as e,d as o,g as a}from"./p-710d0a7d.js";import{k as s,g as u,s as l,f as h,h as f,x as c,p as v}from"./p-732119cb.js";import{c as d}from"./p-635bb4b3.js";import"./p-cabebabc.js";
1
+ import{r as t,c as n,f as i,h as r,H as e,d as o,g as a}from"./p-710d0a7d.js";import{k as s,g as u,s as l,f as h,h as f,x as c,p as v}from"./p-5e7fc8f7.js";import{c as d}from"./p-635bb4b3.js";import"./p-cabebabc.js";
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -1 +1 @@
1
- import{h as e,g as l}from"./p-710d0a7d.js";import{d as t}from"./p-732119cb.js";import{F as i}from"./p-3cab6420.js";const n=document.documentElement,d=(l,t)=>{var i,n;const d={"f-text-field":!0,"kup-danger":l.danger,"kup-full-height":l.fullHeight,"kup-full-width":l.fullWidth,"kup-info":l.info,"kup-light-mode":l.lightMode,"kup-secondary":l.secondary,"kup-shaped":l.shaped,"kup-success":l.success,"kup-warning":l.warning,[`f-text-field--${l.sizing||"small"}`]:!0,[l.wrapperClass]:!!l.wrapperClass},a=function(l){if(!1!==l.helperEnabled&&(l.error||l.alert)&&!l.legacyLook)return e("div",{class:"mdc-text-field-helper-line"},l.helper?e("div",{class:{"mdc-text-field-helper-text":!0,"mdc-text-field-helper-text--persistent":!l.helperWhenFocused}},l.helper):l.error?e("span",{class:"mdc-error-message"},l.error):l.alert?e("span",{class:"mdc-alert-message"},l.alert):void 0)}(l),s=null===(n=null===(i=l.attachHelperSection)||void 0===i?void 0:i.call(l,a))||void 0===n||n;return e("div",Object.assign({class:d},l.dataSet,{id:l.id,title:l.title}),l.leadingLabel||l.trailingLabel?e("div",{class:"mdc-form-field "+(l.leadingLabel?"mdc-form-field--align-end":"")},[o(l),s?a:null,e("label",null,l.label)]):[o(l),s?a:null],t)};function o(d){var o,s,c,r,u,m,f;const p=d.textArea||d.outlined;let v,x,g,k;if(d.maxLength>=256&&(d.textArea=!0),!d.label||d.leadingLabel||d.trailingLabel||d.legacyLook||(v=e("div",{class:"mdc-text-field__label-container"},e("label",{class:"mdc-label",htmlFor:"kup-input"},d.label),d.maxLength&&d.showCounter?e("div",{class:"mdc-text-field__label-character-counter"},d.value.length," / ",d.maxLength):void 0)),d.icon){let i,n="";if(Object.values(t).indexOf(d.icon)>-1)n=d.icon.replace("--","");else{let e=`url('${l(`./assets/svg/${d.icon}.svg`)}') no-repeat center`;i={mask:e,webkitMask:e}}x=e("span",{style:i,onClick:d.onIconClick,class:`mdc-text-field__icon kup-icon action ${n}`})}if(d.quantityButtons){const t=`url('${l("./assets/svg/minus.svg")}') no-repeat center`,i=`url('${l("./assets/svg/plus.svg")}') no-repeat center`,n={mask:i,webkitMask:i};g=e("span",{style:{mask:t,webkitMask:t},class:"mdc-text-field__icon kup-icon action"}),k=e("span",{style:n,class:"mdc-text-field__icon kup-icon action"})}const b={color:d.error?"var(--kup-danger-color-60)":"var(--kup-warning-color-50)",resource:d.error?"error":"warning",sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"kup-icon"},h={"mdc-text-field-container":!0,"mdc-text-field-container--disabled":d.disabled},w={"is-clearable":d.isClearable,"mdc-text-field":!0,"mdc-text-field--disabled":d.disabled,"mdc-text-field--read-only":d.readOnly,"mdc-text-field--read-only-is-select":d.isSelect,"mdc-text-field--filled":!d.fullWidth&&!p,"mdc-text-field--no-label":!d.label,"mdc-text-field--fullwidth":d.fullWidth,"mdc-text-field--lightmode":d.lightMode,"mdc-text-field--outlined":p,"mdc-text-field--textarea":d.textArea,"mdc-text-field--with-leading-icon":d.icon&&!d.trailingIcon,"mdc-text-field--with-trailing-icon":d.icon&&d.trailingIcon,"mdc-text-field--with-quantity-buttons":d.quantityButtons,"mdc-text-field--error":Boolean(d.error),"mdc-text-field--alert":Boolean(d.alert),"mdc-text-field--legacy-look mdc-text-field--extra-small":d.legacyLook,[`mdc-text-field--${d.sizing||"small"}`]:!d.textArea&&!d.legacyLook,[`mdc-text-field--textarea--${d.sizing||"small"}`]:d.textArea,"top-right-indicator":d.showMarker};let _=d.value,y=d.quantityButtons?"number":null!==(o=d.inputType)&&void 0!==o?o:"text",C=!1;if("number"===d.inputType&&(y="text",d.inputMode="numeric",C=!0),"number"===d.inputType){const e={allowNegative:null===(s=d.allowNegative)||void 0===s||s,decimal:d.decimals,group:null===(c=d.group)||void 0===c||c,integer:(null!==(r=d.integers)&&void 0!==r?r:0)-(null!==(u=d.decimals)&&void 0!==u?u:0)};_=a(_,e,!1)}return e("div",{class:h},d.fullWidth?void 0:v,e("div",{class:w},d.trailingIcon?void 0:x,d.textArea?e("span",{class:"mdc-text-field__resizer"},e("textarea",{class:"mdc-text-field__input",disabled:d.disabled,maxlength:d.maxLength,value:_,autoComplete:null!==(m=d.autocomplete)&&void 0!==m?m:"off",onBlur:d.onBlur,onClick:d.onClick,onChange:d.onChange,onFocus:d.onFocus,onInput:d.onInput,onKeyDown:d.onKeyDown})):e("input",{type:y,inputmode:d.inputMode?d.inputMode:void 0,step:d.step,min:d.min,max:d.max,name:d.name,class:"mdc-text-field__input",disabled:d.disabled,placeholder:d.placeholder,maxlength:d.maxLength,size:d.size,value:_,readOnly:d.isSelect,autoComplete:null!==(f=d.autocomplete)&&void 0!==f?f:"off",onBlur:e=>{var l,t,i,n;if(C){const o={allowNegative:null===(l=d.allowNegative)||void 0===l||l,decimal:d.decimals,group:null===(t=d.group)||void 0===t||t,integer:(null!==(i=d.integers)&&void 0!==i?i:0)-(null!==(n=d.decimals)&&void 0!==n?n:0)};e.target.value=a(e.target.value,o,!0)}d.onBlur&&d.onBlur(e)},onChange:e=>{var l,t,i,n;if(C){const o={allowNegative:null===(l=d.allowNegative)||void 0===l||l,decimal:d.decimals,group:null===(t=d.group)||void 0===t||t,integer:(null!==(i=d.integers)&&void 0!==i?i:0)-(null!==(n=d.decimals)&&void 0!==n?n:0)};e.target.value=null!=d.min&&d.min>parseFloat(e.target.value)?a(d.min.toString(),o,!0):null!=d.max&&d.max<parseFloat(e.target.value)?a(d.max.toString(),o,!0):a(e.target.value,o,!0)}else null!=d.min&&d.min>parseFloat(e.target.value)?e.target.value=d.min.toString():null!=d.max&&d.max<parseFloat(e.target.value)&&(e.target.value=d.max.toString());d.onChange&&d.onChange(e)},onClick:d.onClick,onFocus:d.onFocus,onInput:d.onInput,onKeyDown:d.onKeyDown,onKeyPress:e=>{var l,t,i,o,a;if(!C)return;if(e.ctrlKey)return;if(e.key.length>1)return;if(("."===e.key||","===e.key)&&"NumpadDecimal"===e.code){const t=e.target,i=null!==(l=t.selectionStart)&&void 0!==l?l:0,d=n.ketchup.math.decimalSeparator();return t.value.includes(d)||(t.value=t.value.slice(0,i)+d+t.value.slice(i),t.setSelectionRange(i+1,i+1)),void e.preventDefault()}const s={allowNegative:null===(t=d.allowNegative)||void 0===t||t,decimal:d.decimals,group:null===(i=d.group)||void 0===i||i,integer:(null!==(o=d.integers)&&void 0!==o?o:0)-(null!==(a=d.decimals)&&void 0!==a?a:0)};let c=e.target,r=c.value,u=r.substring(0,c.selectionStart),m=r.substring(c.selectionEnd,c.selectionEnd+r.length-1);n.ketchup.math.matchNumericValueWithOptions(u+e.key+m,s)||e.preventDefault()}}),d.trailingIcon?x:void 0,d.helperIcon&&d.error?e("div",{class:"mdc-error-icon"},e(i,Object.assign({},b))):d.helperIcon&&d.alert?e("div",{class:"mdc-alert-icon"},e(i,Object.assign({},b))):void 0,d.quantityButtons&&e("div",{class:"mdc-quantity-buttons"},e("button",{onClick:d.onMinusClick},g),e("button",{onClick:d.onPlusClick},k)),d.isClearable&&d.value?e("span",{class:`mdc-text-field__icon kup-icon ${t.CLEAR.replace("--","")}`,onClick:d.onClearIconClick}):void 0))}const a=function(e,l,t){let i=e;return i?"-"==i?"":n.ketchup.math.format(i,n.ketchup.math.createFormatPattern(l.group,l.decimal),t):i};export{d as F}
1
+ import{h as e,g as l}from"./p-710d0a7d.js";import{d as t}from"./p-5e7fc8f7.js";import{F as i}from"./p-3cab6420.js";const n=document.documentElement,d=(l,t)=>{var i,n;const d={"f-text-field":!0,"kup-danger":l.danger,"kup-full-height":l.fullHeight,"kup-full-width":l.fullWidth,"kup-info":l.info,"kup-light-mode":l.lightMode,"kup-secondary":l.secondary,"kup-shaped":l.shaped,"kup-success":l.success,"kup-warning":l.warning,[`f-text-field--${l.sizing||"small"}`]:!0,[l.wrapperClass]:!!l.wrapperClass},a=function(l){if(!1!==l.helperEnabled&&(l.error||l.alert)&&!l.legacyLook)return e("div",{class:"mdc-text-field-helper-line"},l.helper?e("div",{class:{"mdc-text-field-helper-text":!0,"mdc-text-field-helper-text--persistent":!l.helperWhenFocused}},l.helper):l.error?e("span",{class:"mdc-error-message"},l.error):l.alert?e("span",{class:"mdc-alert-message"},l.alert):void 0)}(l),s=null===(n=null===(i=l.attachHelperSection)||void 0===i?void 0:i.call(l,a))||void 0===n||n;return e("div",Object.assign({class:d},l.dataSet,{id:l.id,title:l.title}),l.leadingLabel||l.trailingLabel?e("div",{class:"mdc-form-field "+(l.leadingLabel?"mdc-form-field--align-end":"")},[o(l),s?a:null,e("label",null,l.label)]):[o(l),s?a:null],t)};function o(d){var o,s,c,r,u,m,f;const p=d.textArea||d.outlined;let v,x,g,k;if(d.maxLength>=256&&(d.textArea=!0),!d.label||d.leadingLabel||d.trailingLabel||d.legacyLook||(v=e("div",{class:"mdc-text-field__label-container"},e("label",{class:"mdc-label",htmlFor:"kup-input"},d.label),d.maxLength&&d.showCounter?e("div",{class:"mdc-text-field__label-character-counter"},d.value.length," / ",d.maxLength):void 0)),d.icon){let i,n="";if(Object.values(t).indexOf(d.icon)>-1)n=d.icon.replace("--","");else{let e=`url('${l(`./assets/svg/${d.icon}.svg`)}') no-repeat center`;i={mask:e,webkitMask:e}}x=e("span",{style:i,onClick:d.onIconClick,class:`mdc-text-field__icon kup-icon action ${n}`})}if(d.quantityButtons){const t=`url('${l("./assets/svg/minus.svg")}') no-repeat center`,i=`url('${l("./assets/svg/plus.svg")}') no-repeat center`,n={mask:i,webkitMask:i};g=e("span",{style:{mask:t,webkitMask:t},class:"mdc-text-field__icon kup-icon action"}),k=e("span",{style:n,class:"mdc-text-field__icon kup-icon action"})}const b={color:d.error?"var(--kup-danger-color-60)":"var(--kup-warning-color-50)",resource:d.error?"error":"warning",sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"kup-icon"},h={"mdc-text-field-container":!0,"mdc-text-field-container--disabled":d.disabled},w={"is-clearable":d.isClearable,"mdc-text-field":!0,"mdc-text-field--disabled":d.disabled,"mdc-text-field--read-only":d.readOnly,"mdc-text-field--read-only-is-select":d.isSelect,"mdc-text-field--filled":!d.fullWidth&&!p,"mdc-text-field--no-label":!d.label,"mdc-text-field--fullwidth":d.fullWidth,"mdc-text-field--lightmode":d.lightMode,"mdc-text-field--outlined":p,"mdc-text-field--textarea":d.textArea,"mdc-text-field--with-leading-icon":d.icon&&!d.trailingIcon,"mdc-text-field--with-trailing-icon":d.icon&&d.trailingIcon,"mdc-text-field--with-quantity-buttons":d.quantityButtons,"mdc-text-field--error":Boolean(d.error),"mdc-text-field--alert":Boolean(d.alert),"mdc-text-field--legacy-look mdc-text-field--extra-small":d.legacyLook,[`mdc-text-field--${d.sizing||"small"}`]:!d.textArea&&!d.legacyLook,[`mdc-text-field--textarea--${d.sizing||"small"}`]:d.textArea,"top-right-indicator":d.showMarker};let _=d.value,y=d.quantityButtons?"number":null!==(o=d.inputType)&&void 0!==o?o:"text",C=!1;if("number"===d.inputType&&(y="text",d.inputMode="numeric",C=!0),"number"===d.inputType){const e={allowNegative:null===(s=d.allowNegative)||void 0===s||s,decimal:d.decimals,group:null===(c=d.group)||void 0===c||c,integer:(null!==(r=d.integers)&&void 0!==r?r:0)-(null!==(u=d.decimals)&&void 0!==u?u:0)};_=a(_,e,!1)}return e("div",{class:h},d.fullWidth?void 0:v,e("div",{class:w},d.trailingIcon?void 0:x,d.textArea?e("span",{class:"mdc-text-field__resizer"},e("textarea",{class:"mdc-text-field__input",disabled:d.disabled,maxlength:d.maxLength,value:_,autoComplete:null!==(m=d.autocomplete)&&void 0!==m?m:"off",onBlur:d.onBlur,onClick:d.onClick,onChange:d.onChange,onFocus:d.onFocus,onInput:d.onInput,onKeyDown:d.onKeyDown})):e("input",{type:y,inputmode:d.inputMode?d.inputMode:void 0,step:d.step,min:d.min,max:d.max,name:d.name,class:"mdc-text-field__input",disabled:d.disabled,placeholder:d.placeholder,maxlength:d.maxLength,size:d.size,value:_,readOnly:d.isSelect,autoComplete:null!==(f=d.autocomplete)&&void 0!==f?f:"off",onBlur:e=>{var l,t,i,n;if(C){const o={allowNegative:null===(l=d.allowNegative)||void 0===l||l,decimal:d.decimals,group:null===(t=d.group)||void 0===t||t,integer:(null!==(i=d.integers)&&void 0!==i?i:0)-(null!==(n=d.decimals)&&void 0!==n?n:0)};e.target.value=a(e.target.value,o,!0)}d.onBlur&&d.onBlur(e)},onChange:e=>{var l,t,i,n;if(C){const o={allowNegative:null===(l=d.allowNegative)||void 0===l||l,decimal:d.decimals,group:null===(t=d.group)||void 0===t||t,integer:(null!==(i=d.integers)&&void 0!==i?i:0)-(null!==(n=d.decimals)&&void 0!==n?n:0)};e.target.value=null!=d.min&&d.min>parseFloat(e.target.value)?a(d.min.toString(),o,!0):null!=d.max&&d.max<parseFloat(e.target.value)?a(d.max.toString(),o,!0):a(e.target.value,o,!0)}else null!=d.min&&d.min>parseFloat(e.target.value)?e.target.value=d.min.toString():null!=d.max&&d.max<parseFloat(e.target.value)&&(e.target.value=d.max.toString());d.onChange&&d.onChange(e)},onClick:d.onClick,onFocus:d.onFocus,onInput:d.onInput,onKeyDown:d.onKeyDown,onKeyPress:e=>{var l,t,i,o,a;if(!C)return;if(e.ctrlKey)return;if(e.key.length>1)return;if(("."===e.key||","===e.key)&&"NumpadDecimal"===e.code){const t=e.target,i=null!==(l=t.selectionStart)&&void 0!==l?l:0,d=n.ketchup.math.decimalSeparator();return t.value.includes(d)||(t.value=t.value.slice(0,i)+d+t.value.slice(i),t.setSelectionRange(i+1,i+1)),void e.preventDefault()}const s={allowNegative:null===(t=d.allowNegative)||void 0===t||t,decimal:d.decimals,group:null===(i=d.group)||void 0===i||i,integer:(null!==(o=d.integers)&&void 0!==o?o:0)-(null!==(a=d.decimals)&&void 0!==a?a:0)};let c=e.target,r=c.value,u=r.substring(0,c.selectionStart),m=r.substring(c.selectionEnd,c.selectionEnd+r.length-1);n.ketchup.math.matchNumericValueWithOptions(u+e.key+m,s)||e.preventDefault()}}),d.trailingIcon?x:void 0,d.helperIcon&&d.error?e("div",{class:"mdc-error-icon"},e(i,Object.assign({},b))):d.helperIcon&&d.alert?e("div",{class:"mdc-alert-icon"},e(i,Object.assign({},b))):void 0,d.quantityButtons&&e("div",{class:"mdc-quantity-buttons"},e("button",{onClick:d.onMinusClick},g),e("button",{onClick:d.onPlusClick},k)),d.isClearable&&d.value?e("span",{class:`mdc-text-field__icon kup-icon ${t.CLEAR.replace("--","")}`,onClick:d.onClearIconClick}):void 0))}const a=function(e,l,t){let i=e;return i?"-"==i?"":n.ketchup.math.format(i,n.ketchup.math.createFormatPattern(l.group,l.decimal),t):i};export{d as F}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sme.up/ketchup",
3
- "version": "11.0.0-SNAPSHOT-20250626150642",
3
+ "version": "11.0.0-SNAPSHOT-20250630112121",
4
4
  "keywords": [
5
5
  "smeup",
6
6
  "KetchUP",
@@ -1 +0,0 @@
1
- import{h as l}from"./p-710d0a7d.js";import{F as n}from"./p-3cab6420.js";import{I as e,d as i,b as c}from"./p-732119cb.js";function r(l,n,i){const{id:c,value:r}=l;if(null==c&&r)return r;if(c&&null==r)return c;switch(n){case e.CODE:return c;case e.DESCRIPTION:return r;case e.CODE_AND_DESC:case e.CODE_AND_DESC_ALIAS:return c&&r?c+i+r:c||r;case e.DESC_AND_CODE:return r&&c?r+i+c:r||c;default:return c}}function s(l,n,i,c,s,t){const a=!!(i&&n&&n.data);let o="",u="",p=null;null!=t&&(p=t.detail.selected),null==p&&null!=l&&a&&(p=function(l,n,i){if(l&&l.data){let c=!1,s=null;for(let t=0;t<l.data.length;t++){let a=r(l.data[t],""==n?e.DESCRIPTION:i," - ");l.data[t].selected=!1,c||a.toString().toLowerCase()!=n.toString().toLowerCase()||(s=l.data[t],s.selected=!0,c=!0)}if(1==c)return s}return function(l,n){if(l&&l.data){let e=!1,i=null;for(let c=0;c<l.data.length;c++)l.data[c].selected=!1,e||l.data[c].id.toString().toLowerCase()!=n.toString().toLowerCase()||(i=l.data[c],i.selected=!0,e=!0);if(1==e)return i;for(let c=0;c<l.data.length;c++)if(l.data[c].value.toString().toLowerCase()==n.toString().toLowerCase()){i=l.data[c],i.selected=!0,e=!0;break}if(1==e)return i}return null}(l,n)}(n,l,s),i.data=[...n.data]),null==p&&null==l&&n&&(p=function(l){if(l.data)for(let n=0;n<l.data.length;n++)if(l.data[n].selected)return l.data[n];return null}(n));let d=null;null==p?(p={id:null==l?"":l,value:null==l?"":l},o=p.id,u=p.id,d=p.id):(o=r(p,c," - "),u=r(p,""==o?e.DESCRIPTION:s," - "),d=r(p,e.CODE," - "));const h=a?n.data.find((l=>l.id===d)):null;return{value:o,displayedValue:u,node:h,exists:!!h}}var t,a,o;!function(l){l.CHOICE="choice",l.FILTER="filter",l.INPUT="input",l.STANDARD="standard"}(t||(t={})),function(l){l.OUTLINED="outlined",l.RAISED="raised"}(a||(a={})),function(l){l.SMALL="small",l.MEDIUM="medium"}(o||(o={}));const u=document.documentElement,p=s=>{s.styling||(s.styling=a.RAISED),s.type||(s.type=t.STANDARD),s.displayMode||(s.displayMode=e.DESCRIPTION);const o=s.type.toLowerCase()===t.CHOICE,p=s.type.toLowerCase()===t.FILTER,d=s.type.toLowerCase()===t.INPUT,h=s.styling.toLowerCase()===a.OUTLINED,f={"chip-set":!0,"chip-set--choice":!!o,"chip-set--filter":!!p,"chip-set--input":!!d,"chip--outlined":!!h,"chip--raised":!h,[`chip--${s.sizing||"extra-small"}`]:!0};return l("div",Object.assign({class:`f-chip ${s.danger?"kup-danger":""} ${s.info?"kup-info":""} ${s.secondary?"kup-secondary":""} ${s.success?"kup-success":""} ${s.warning?"kup-warning":""} ${s.wrapperClass?s.wrapperClass:""} ${s.primary?"kup-primary":""}`},s.dataSet,{id:s.id,title:s.title}),l("div",{class:f,role:"grid"},function(s,t,a,o){const p=[];for(let d=0;s.data&&d<s.data.length;d++){const h=[];function f(e,r){const t=!!(e.children&&e.children.length>0),a=!(!t||!e.isExpanded),o={"--kup_chip_indent_offset":r.toString()},p=s.disabled;if(h.push(l("div",{class:"chip-set__wrapper "+(t&&!a?"chip-set__wrapper--hidden-children":"")},l("div",{class:"chip-set__indent",style:o}),t?l(n,{onClick:s.onExpansionClick&&s.onExpansionClick[d]?s.onExpansionClick[d].bind(s.onExpansionClick[d],e):null,resource:`${i.DROPDOWN}`,sizeX:"16px",sizeY:"16px",title:u.ketchup.language.translate(c.EXPAND)+"/"+u.ketchup.language.translate(c.COLLAPSE)+" (CTRL + Click)",wrapperClass:"dropdown-icon"}):r?l(n,{resource:"blank",sizeX:"16px",sizeY:"16px",wrapperClass:"dropdown-icon"}):null,_(e,p))),a)for(let l=0;l<e.children.length;l++)e.children[l]&&f(e.children[l],r+1)}function _(c,u){var p;let h=`chip ${c.icon&&!c.value?"chip--only-icon":""} ${u?"chip--disabled":""}`,f=[],_="chip__icon chip__icon--leading";(a||t)&&c.checked&&(h+=" chip--selected",a&&(_+=" chip__icon--leading-hidden")),c.icon&&f.push(l(n,Object.assign({},{color:t&&c.checked?"var(--kup_chip_primary_color)":"var(--kup_chip_text_color)",resource:c.icon,placeholderResource:c.placeholderIcon,sizeX:"16px",sizeY:"16px",wrapperClass:_}))),a&&f.push(l("span",{class:"chip__checkmark"},l("svg",{class:"chip__checkmark-svg",viewBox:"-2 -3 30 30"},l("path",{class:"chip__checkmark-path",fill:"none",stroke:"black",d:"M1.73,12.91 8.1,19.28 22.79,4.59"}))));let k=r(c,""==c.value?e.CODE:s.displayMode," - ");return l("div",{class:h,"data-value":c.id,onClick:s.onClick&&s.onClick[d]?s.onClick[d].bind(s.onClick[d],c):null,onContextMenu:s.onContextMenu&&s.onContextMenu[d]?s.onContextMenu[d].bind(s.onContextMenu[d],c):null,role:"row",title:c.title?c.title:""},l("span",{class:"chip-set__indent"}),f,l("span",{role:"gridcell"},l("span",{role:"button",tabindex:d,class:"chip__primary-action",value:c.id,checked:c.checked,onBlur:s.onBlur&&s.onBlur[d]?s.onBlur[d].bind(s.onBlur[d],c):null,onFocus:s.onFocus&&s.onFocus[d]?s.onFocus[d].bind(s.onFocus[d],c):null},l("span",{class:"chip__text"},k))),(null===(p=s.hasFilter)||void 0===p?void 0:p[d])&&l("span",{role:"gridcell"},l("span",{tabindex:"-1",class:`kup-icon chip__icon ${i.FILTER_REMOVE.replace("--","")}`,onClick:s.onClearFilterClick&&s.onClearFilterClick[d]?s.onClearFilterClick[d].bind(s.onClearFilterClick[d],c):null})),o?l("span",{role:"gridcell"},l("span",{tabindex:"-1",class:`kup-icon chip__icon ${i.CLEAR.replace("--","")}`,onClick:s.onIconClick&&s.onIconClick[d]?s.onIconClick[d].bind(s.onIconClick[d],c):null})):null)}f(s.data[d],0),p.push(l("div",{class:"chip-set__item"},...h))}return p}(s,o,p,d)))};export{t as F,o as a,a as b,s as c,p as d,r as g}
@@ -1 +0,0 @@
1
- import{h as e}from"./p-710d0a7d.js";import{I as l,az as t,t as a,a as n,b as o}from"./p-732119cb.js";import{F as i}from"./p-c4224227.js";import{a as s}from"./p-e3062c19.js";var r;!function(e){e.SIMPLE="simple",e.FULL="full"}(r||(r={}));const u=document.documentElement,p=p=>{p.perPage||(p.perPage=1e3),p.perPage>p.max&&(p.perPage=p.max);const m=Math.ceil(p.max/p.perPage),f=function(e,l){const t=[];for(let a=1;a<=l;a++){const l=a==e.currentPage;t.push({id:a.toString(),selected:l,value:a.toString()})}return t}(p,m),b=function(e){const l=[],t=Math.min(e.max,e.maxRowsPerPage);let a=e.perPage;if(0===a)return l;for(;a<t;){const t=a==e.perPage;l.push({id:a.toString(),selected:t,value:a.toString()}),a*=2}const n=t==e.perPage;return l.push({id:t.toString(),selected:n,value:t.toString()}),l}(p),g={"kup-list":{data:f,displayMode:l.CODE},"kup-text-field":{label:u.ketchup.language.translate(t.PAGE),helper:u.ketchup.language.translate(t.TOTAL)+`: ${m}`,helperWhenFocused:!0,inputType:"number",max:m,min:1,size:5}},h={"kup-list":{data:b,displayMode:l.CODE},"kup-text-field":{label:u.ketchup.language.translate(a.ROWS)+" / "+u.ketchup.language.translate(t.PAGE),helper:u.ketchup.language.translate(a.TOTAL)+`: ${p.max}`,helperWhenFocused:!0,inputType:"number",max:p.max,min:1,size:5}};return e("div",Object.assign({class:`f-paginator ${p.mode?p.mode:""} ${p.wrapperClass?p.wrapperClass:""}`},p.dataSet,{id:p.id,title:p.title}),p.onLoadMore?e(i,{icon:"plus",onClick:p.onLoadMore,label:u.ketchup.language.translate(o.LOAD_MORE),sizing:n.SMALL,styling:s.FLAT,wrapperClass:"load-more-button kup-neutral"}):null,e("kup-combobox",{class:"rows-selector",data:h,displayMode:l.CODE,initialValue:p.perPage.toString(),initialValueDecode:p.perPage.toString(),"onkup-combobox-change":p.onRowsChange}),e("kup-combobox",{class:"page-selector",data:g,displayMode:l.CODE,initialValue:p.currentPage.toString(),initialValueDecode:p.currentPage.toString(),"onkup-combobox-change":p.onPageChange}),p.showMaxPages?e("div",{class:"max-page-wrapper"},e("label",{htmlFor:"page-selector"},"/ "+m)):null,e("div",{class:"arrow-wrapper"},p.mode!==r.SIMPLE?e(i,{icon:"chevron_left",disabled:d(p),onClick:p.onPrevPage,sizing:n.SMALL,styling:s.FLAT,wrapperClass:"kup-neutral prev-page"}):null,p.mode!==r.SIMPLE?e(i,{icon:"chevron_right",disabled:c(p),onClick:p.onNextPage,sizing:n.SMALL,styling:s.FLAT,wrapperClass:"kup-neutral next-page"}):null))};function c(e){return e.currentPage*e.perPage>=e.max}function d(e){return 1==e.currentPage}const m=document.documentElement;function f(e,l,t){if(m.ketchup.math.isNumber(e)){const a=Math.ceil(l/t);let n=e;return n>a&&(n=a),n<1&&(n=1),n}return null}function b(e,l){if(m.ketchup.math.isNumber(e)){let t=e;return t>l&&(t=l),t<1&&(t=1),t}return null}export{p as F,f as p,b as r}