@sme.up/ketchup 10.1.1 → 10.1.5

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 (66) hide show
  1. package/dist/cjs/ketchup.cjs.js +1 -1
  2. package/dist/cjs/kup-calendar.cjs.entry.js +1 -1
  3. package/dist/cjs/kup-custom-task-list-header_4.cjs.entry.js +195 -22
  4. package/dist/cjs/kup-gantt_10.cjs.entry.js +19 -17
  5. package/dist/cjs/{kup-planner-declarations-7291d01c.js → kup-planner-declarations-959110da.js} +1 -1
  6. package/dist/cjs/kup-planner-renderer.cjs.entry.js +3 -3
  7. package/dist/cjs/kup-planner.cjs.entry.js +112 -4
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/collection/assets/index.js +4 -0
  10. package/dist/collection/assets/planner-example-7.js +370 -0
  11. package/dist/collection/components/kup-calendar/kup-calendar.css +18 -1
  12. package/dist/collection/components/kup-planner/kup-planner-declarations.js +1 -1
  13. package/dist/collection/components/kup-planner/kup-planner.js +153 -3
  14. package/dist/collection/components/kup-planner/utils/custom-task-list-table.js +30 -12
  15. package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.js +31 -7
  16. package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.js +181 -4
  17. package/dist/collection/components/kup-planner/utils/kup-planner-renderer.js +2 -2
  18. package/dist/collection/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.js +4 -4
  19. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list.css +1 -0
  20. package/dist/components/kup-calendar.js +1 -1
  21. package/dist/components/kup-custom-task-list-table.js +1 -1
  22. package/dist/components/kup-gantt.js +1 -1
  23. package/dist/components/kup-grid-renderer.js +1 -1
  24. package/dist/components/kup-planner-renderer.js +1 -1
  25. package/dist/components/kup-planner.js +122 -12
  26. package/dist/components/kup-task-gantt.js +1 -1
  27. package/dist/components/kup-task-list-header.js +1 -1
  28. package/dist/components/kup-task-list-table.js +1 -1
  29. package/dist/components/kup-task-list.js +1 -1
  30. package/dist/components/{p-76c4c708.js → p-26d3e5b2.js} +1 -1
  31. package/dist/components/{p-2fff7268.js → p-45cdd2a4.js} +10 -10
  32. package/dist/components/{p-a0eeacbd.js → p-4edc1bd0.js} +1 -1
  33. package/dist/components/{p-9da8cd93.js → p-5cbf86c3.js} +13 -10
  34. package/dist/components/{p-53e38c4a.js → p-90c212d2.js} +1 -1
  35. package/dist/components/{p-0e6c0355.js → p-9c8c4e2e.js} +30 -12
  36. package/dist/components/{p-5517e8e8.js → p-c2b9b4ba.js} +4 -4
  37. package/dist/components/{p-4efa19a7.js → p-c8302548.js} +3 -3
  38. package/dist/components/{p-c43d08ab.js → p-d72814f5.js} +161 -5
  39. package/dist/esm/ketchup.js +1 -1
  40. package/dist/esm/kup-calendar.entry.js +1 -1
  41. package/dist/esm/kup-custom-task-list-header_4.entry.js +191 -18
  42. package/dist/esm/kup-gantt_10.entry.js +14 -12
  43. package/dist/esm/{kup-planner-declarations-0704bc6c.js → kup-planner-declarations-5981474b.js} +1 -1
  44. package/dist/esm/kup-planner-renderer.entry.js +3 -3
  45. package/dist/esm/kup-planner.entry.js +112 -4
  46. package/dist/esm/loader.js +1 -1
  47. package/dist/ketchup/ketchup.esm.js +1 -1
  48. package/dist/ketchup/p-088e2f23.entry.js +1 -0
  49. package/dist/ketchup/p-58bc7c00.entry.js +1 -0
  50. package/dist/ketchup/{p-a19d0102.entry.js → p-5f20e6ce.entry.js} +1 -1
  51. package/dist/ketchup/{p-54ebe3bd.entry.js → p-6aec24be.entry.js} +1 -1
  52. package/dist/ketchup/p-78c0ff1b.js +1 -0
  53. package/dist/ketchup/p-ca9ec047.entry.js +16 -0
  54. package/dist/types/components/kup-planner/kup-planner-declarations.d.ts +19 -0
  55. package/dist/types/components/kup-planner/kup-planner.d.ts +12 -1
  56. package/dist/types/components/kup-planner/utils/kup-gantt/kup-gantt.d.ts +2 -1
  57. package/dist/types/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.d.ts +7 -0
  58. package/dist/types/components.d.ts +24 -2
  59. package/package.json +1 -1
  60. package/dist/ketchup/p-008bdcdc.js +0 -1
  61. package/dist/ketchup/p-792e9244.entry.js +0 -1
  62. package/dist/ketchup/p-e8823224.entry.js +0 -1
  63. package/dist/ketchup/p-f38c2d0e.entry.js +0 -16
  64. package/dist/cjs/{bar.helpers-c481a535.js → other.helpers-8782a839.js} +46 -46
  65. package/dist/esm/{bar.helpers-23a51579.js → other.helpers-83e3225b.js} +46 -46
  66. /package/dist/ketchup/{p-cd3a7d53.js → p-17c9ef50.js} +0 -0
@@ -1 +1 @@
1
- import{h as t,r as i,d as s}from"./p-b0368f88.js";import{c as e,a as h,g as a,m as l,b as n,d as o,e as d}from"./p-0f9b546a.js";import{e as r,f as c}from"./p-cd3a7d53.js";import{a as u}from"./p-1ee561ba.js";import{g as v}from"./p-53af4c87.js";const D=()=>()=>t("div",null),p=class{constructor(t){i(this,t),this.locale="it-IT",this.props=void 0,this.timeUnit=void 0,this.currentTasks=[],this.currentDetails=[],this.scrollX=-1,this.mainGanttDoubleView=!1,this.displayedDates={displayedStartDate:new Date,displayedEndDate:new Date},this.viewDate=void 0,this.projection=void 0,this.tasks=[],this.details=[]}mainGanttChangeHandler(){var t;this.currentTasks=this.props.mainGantt.items,this.currentDetails=null===(t=this.props.secondaryGantt)||void 0===t?void 0:t.items,this.projection=void 0,this.updateTasks()}updateDisplayedDates(){const t=e(this.currentTasks,this.timeUnit,this.mainGanttDoubleView,this.currentDetails,this.props.preStepsCount);if(!this.viewDate){const i=new Date;this.viewDate=t.displayedStartDate<=i&&t.displayedEndDate>=i?i:t.displayedStartDate}}updateTasks(){var t,i;const s=new u;this.tasks=[];for(let i=0;i<(null===(t=this.currentTasks)||void 0===t?void 0:t.length);i++)this.tasks.push(...h(this.currentTasks[i],s.formatToIsoDate(this.displayedDates.displayedStartDate),s.formatToIsoDate(this.displayedDates.displayedEndDate)));this.details=[];for(let t=0;t<(null===(i=this.currentDetails)||void 0===i?void 0:i.length);t++)this.details.push(...h(this.currentDetails[t],s.formatToIsoDate(this.displayedDates.displayedStartDate),s.formatToIsoDate(this.displayedDates.displayedEndDate)))}componentWillLoad(){var t,i,s,h,a,l,n,o,d,r,c;this.timeUnit=null===(t=this.props)||void 0===t?void 0:t.viewMode,this.currentTasks=(null===(i=this.props)||void 0===i?void 0:i.mainGantt.items)||[],this.currentDetails=null===(h=null===(s=this.props)||void 0===s?void 0:s.secondaryGantt)||void 0===h?void 0:h.items,this.scrollX=null!==(n=null===(l=null===(a=this.props)||void 0===a?void 0:a.mainGantt)||void 0===l?void 0:l.initialScrollX)&&void 0!==n?n:-1,this.mainGanttDoubleView=null!==(r=null===(d=null===(o=this.props)||void 0===o?void 0:o.mainGantt)||void 0===d?void 0:d.showSecondaryDates)&&void 0!==r&&r,this.displayedDates=e(this.currentTasks,this.timeUnit,this.mainGanttDoubleView,this.currentDetails,null===(c=this.props)||void 0===c?void 0:c.preStepsCount),this.viewDate=void 0,this.projection=void 0,this.updateTasks()}async refresh(){var t;this.displayedDates=e(this.currentTasks,this.timeUnit,this.mainGanttDoubleView,this.currentDetails,null===(t=this.props)||void 0===t?void 0:t.preStepsCount)}handleClick(t,i){if(t){if("task"===t.type&&this.props.secondaryGantt){const i=t;this.projection={start:new Date(i.startDate),end:new Date(i.endDate),color:i.color||"#ED7D31"}}else this.projection=void 0;null==i||i(t)}}handleDblClick(t,i){t&&(null==i||i(t))}handleContextMenu(t,i,s){if(i){if("task"===i.type&&this.props.secondaryGantt){const t=i;this.projection={start:new Date(t.startDate),end:new Date(t.endDate),color:t.color||"#ED7D31"}}else this.projection=void 0;null==s||s(t,i)}}handleSetDoubleView(t){var i,s;this.mainGanttDoubleView=t,null===(s=null===(i=this.props)||void 0===i?void 0:i.onSetDoubleView)||void 0===s||s.call(i,t)}handleDateChange(t,i,s){var e;const h=null==t?void 0:t.id;if(!h)return;let d=n(h,i);if(d||(d=a(h,i)),d)if("timeline"!==d.type){if("project"===d.type){const s=l(i,t);d=n(d.id,s),this.viewDate=t.start,this.currentTasks=s}else if("task"===d.type){const s=i.find((t=>{var i;return null===(i=t.phases)||void 0===i?void 0:i.some((t=>(null==t?void 0:t.id)===h))}));if(s){const h=o(s.phases,t),l=i.map((t=>t.id===s.id?Object.assign(Object.assign({},t),{phases:h}):t));d=a(d.id,l),this.props.secondaryGantt&&d&&(this.projection={start:new Date(d.startDate),end:new Date(d.endDate),color:null!==(e=d.color)&&void 0!==e?e:"#ED7D31"}),this.viewDate=t.start,this.currentTasks=l}}null==s||s(d),setTimeout(this.getScrollX,500)}else console.log("onDateChange for timeline not managed yet",h,d.type)}handlePhaseDrop(t,i,s,e){let h;const l=this.currentTasks,n=l.find((t=>{var s;return null===(s=t.phases)||void 0===s?void 0:s.some((t=>(null==t?void 0:t.id)===i.id))}));if(n){const t=o(n.phases,i),s=l.map((i=>i.id===n.id?Object.assign(Object.assign({},i),{phases:t}):i));h=a(i.id,s)}null==h||delete h.taskRow,null==e||e({originalPhaseData:t,finalPhaseData:h,destinationData:s}),this.currentTasks=JSON.parse(JSON.stringify(this.currentTasks)),setTimeout(this.getScrollX,500)}getScrollX(){var t,i,s;if(this.rootElement){const e=null===(t=this.rootElement.querySelector('[data-scrollx="true"]'))||void 0===t?void 0:t.scrollLeft;void 0!==e&&(null===(s=(i=this.props).onScrollX)||void 0===s||s.call(i,e))}}render(){var i,s,e;return t("div",{key:"23145b3c2d83d53eadd4cbe0a00006089a5e277e",class:"planner-render"},t("kup-switcher",{key:"745c70a1e903ae5f3af565e7843c3d84ca36d013",timeUnitChange:t=>{var i,s;null===(s=(i=this.props).onSetViewMode)||void 0===s||s.call(i,t),this.timeUnit=t,this.viewDate=void 0,this.scrollX=-1}}),this.props&&t("div",{key:"a07185cd6be444510aef8c07eef0a9afe72d9fd6",style:{display:"flex",flexDirection:"column"}},t("kup-gantt",Object.assign({ref:t=>this.mainGantt=t,ganttId:r,key:r,filter:this.props.mainGantt.filter,hideLabel:this.props.mainGantt.hideLabel,showSecondaryDates:this.mainGanttDoubleView,hideDependencies:this.props.mainGantt.hideDependencies,ganttHeight:this.props.mainGantt.ganttHeight,displayedStartDate:this.displayedDates.displayedStartDate,displayedEndDate:this.displayedDates.displayedEndDate,viewDate:this.viewDate,tasks:this.tasks,columnWidth:d(this.timeUnit),viewMode:this.timeUnit},this.props.mainGantt.stylingOptions,{TaskListHeader:this.props.mainGantt.taskListHeaderProject,TaskListTable:this.props.mainGantt.taskListTableProject,TooltipContent:null!==(i=this.props.mainGantt.tooltipContent)&&void 0!==i?i:D(),barClick:t=>{let i=n(t.id,this.currentTasks);i||(i=a(t.id,this.currentTasks)),i&&this.handleClick(i,this.props.mainGantt.onClick)},barDblClick:t=>{let i=n(t.id,this.currentTasks);i||(i=a(t.id,this.currentTasks)),i&&this.handleDblClick(i,this.props.mainGantt.onDblClick)},barContextMenu:(t,i)=>{let s=n(i.id,this.currentTasks);s||(s=a(i.id,this.currentTasks)),s&&this.handleContextMenu(t,s,this.props.mainGantt.onContextMenu)},dateChange:t=>this.handleDateChange(t,this.currentTasks,this.props.mainGantt.onDateChange),locale:this.locale,dateTimeFormatters:v,initialScrollX:this.scrollX,initialScrollY:this.props.mainGantt.initialScrollY,readOnly:this.props.mainGantt.readOnly,scrollXChange:this.props.onScrollX,scrollYChange:this.props.mainGantt.onScrollY,currentTasks:this.currentTasks,handleClick:this.handleClick.bind(this),handleDblClick:this.handleDblClick.bind(this),handleContextMenu:this.handleContextMenu.bind(this),ganttOnClick:this.props.mainGantt.onClick,ganttOnDblClick:this.props.mainGantt.onDblClick,ganttonOnContextMenu:this.props.mainGantt.onContextMenu,label:this.props.mainGantt.title,doubleView:null!==(s=this.mainGanttDoubleView)&&void 0!==s&&s,setDoubleView:this.handleSetDoubleView.bind(this),scrollableTaskList:this.props.scrollableTaskList,phaseDrop:(t,i,s,e)=>{const h=a(t.id,this.currentTasks);n(i.id,this.currentTasks),a(s.id,this.currentTasks);const l=n(e.id,this.currentTasks);this.handlePhaseDrop(h,s,l,this.props.mainGantt.onPhaseDrop)}})),this.props.secondaryGantt&&t("kup-gantt",Object.assign({ref:t=>this.secondaryGantt=t,ganttId:c,key:c,filter:this.props.secondaryGantt.filter,hideLabel:this.props.secondaryGantt.hideLabel,showSecondaryDates:this.mainGanttDoubleView,hideDependencies:this.props.secondaryGantt.hideDependencies,ganttHeight:this.props.secondaryGantt.ganttHeight,displayedStartDate:this.displayedDates.displayedStartDate,displayedEndDate:this.displayedDates.displayedEndDate,viewDate:this.viewDate,tasks:this.details,columnWidth:d(this.timeUnit),viewMode:this.timeUnit},this.props.secondaryGantt.stylingOptions,{TaskListHeader:this.props.secondaryGantt.taskListHeaderProject,TaskListTable:this.props.secondaryGantt.taskListTableProject,TooltipContent:null!==(e=this.props.secondaryGantt.tooltipContent)&&void 0!==e?e:D(),projection:this.projection,barClick:t=>{if(this.props.secondaryGantt){let i=n(t.id,this.currentDetails);i&&this.handleClick(i,this.props.secondaryGantt.onClick)}},barDblClick:t=>{if(this.props.secondaryGantt){let i=n(t.id,this.currentDetails);i&&this.handleDblClick(i,this.props.secondaryGantt.onDblClick)}},barContextMenu:(t,i)=>{if(this.props.secondaryGantt){let s=n(i.id,this.currentDetails);s&&this.handleContextMenu(t,s,this.props.secondaryGantt.onContextMenu)}},dateChange:t=>this.handleDateChange(t,this.currentTasks,this.props.secondaryGantt.onDateChange),locale:this.locale,dateTimeFormatters:v,initialScrollX:this.scrollX,initialScrollY:this.props.secondaryGantt.initialScrollY,readOnly:this.props.secondaryGantt.readOnly,scrollXChange:this.props.onScrollX,scrollYChange:this.props.secondaryGantt.onScrollY,currentTasks:this.currentTasks,handleClick:this.handleClick.bind(this),handleDblClick:this.handleDblClick.bind(this),handleContextMenu:this.handleContextMenu.bind(this),ganttOnClick:this.props.secondaryGantt.onClick,ganttOnDblClick:this.props.secondaryGantt.onDblClick,ganttonOnContextMenu:this.props.secondaryGantt.onContextMenu,label:this.props.secondaryGantt.title,scrollableTaskList:this.props.scrollableTaskList}))))}get rootElement(){return s(this)}static get watchers(){return{props:["mainGanttChangeHandler"],timeUnit:["updateDisplayedDates"],mainGanttDoubleView:["updateDisplayedDates"],"props.preStepsCount":["updateDisplayedDates"],viewDate:["updateDisplayedDates"],currentTasks:["updateTasks"],currentDetails:["updateTasks"]}}};export{p as kup_planner_renderer}
1
+ import{h as t,r as i,d as s}from"./p-b0368f88.js";import{c as e,a as h,g as a,m as l,b as n,d as o,e as d}from"./p-0f9b546a.js";import{e as r,f as c}from"./p-17c9ef50.js";import{a as u}from"./p-1ee561ba.js";import{g as v}from"./p-53af4c87.js";const p=()=>()=>t("div",null),D=class{constructor(t){i(this,t),this.locale="it-IT",this.props=void 0,this.timeUnit=void 0,this.currentTasks=[],this.currentDetails=[],this.scrollX=-1,this.mainGanttDoubleView=!1,this.displayedDates={displayedStartDate:new Date,displayedEndDate:new Date},this.viewDate=void 0,this.projection=void 0,this.tasks=[],this.details=[]}mainGanttChangeHandler(){var t;this.currentTasks=this.props.mainGantt.items,this.currentDetails=null===(t=this.props.secondaryGantt)||void 0===t?void 0:t.items,this.projection=void 0,this.updateTasks()}updateDisplayedDates(){const t=e(this.currentTasks,this.timeUnit,this.mainGanttDoubleView,this.currentDetails,this.props.preStepsCount);if(!this.viewDate){const i=new Date;this.viewDate=t.displayedStartDate<=i&&t.displayedEndDate>=i?i:t.displayedStartDate}}updateTasks(){var t,i;const s=new u;this.tasks=[];for(let i=0;i<(null===(t=this.currentTasks)||void 0===t?void 0:t.length);i++)this.tasks.push(...h(this.currentTasks[i],s.formatToIsoDate(this.displayedDates.displayedStartDate),s.formatToIsoDate(this.displayedDates.displayedEndDate)));this.details=[];for(let t=0;t<(null===(i=this.currentDetails)||void 0===i?void 0:i.length);t++)this.details.push(...h(this.currentDetails[t],s.formatToIsoDate(this.displayedDates.displayedStartDate),s.formatToIsoDate(this.displayedDates.displayedEndDate)))}componentWillLoad(){var t,i,s,h,a,l,n,o,d,r,c;this.timeUnit=null===(t=this.props)||void 0===t?void 0:t.viewMode,this.currentTasks=(null===(i=this.props)||void 0===i?void 0:i.mainGantt.items)||[],this.currentDetails=null===(h=null===(s=this.props)||void 0===s?void 0:s.secondaryGantt)||void 0===h?void 0:h.items,this.scrollX=null!==(n=null===(l=null===(a=this.props)||void 0===a?void 0:a.mainGantt)||void 0===l?void 0:l.initialScrollX)&&void 0!==n?n:-1,this.mainGanttDoubleView=null!==(r=null===(d=null===(o=this.props)||void 0===o?void 0:o.mainGantt)||void 0===d?void 0:d.showSecondaryDates)&&void 0!==r&&r,this.displayedDates=e(this.currentTasks,this.timeUnit,this.mainGanttDoubleView,this.currentDetails,null===(c=this.props)||void 0===c?void 0:c.preStepsCount),this.viewDate=void 0,this.projection=void 0,this.updateTasks()}async refresh(){var t;this.displayedDates=e(this.currentTasks,this.timeUnit,this.mainGanttDoubleView,this.currentDetails,null===(t=this.props)||void 0===t?void 0:t.preStepsCount)}handleClick(t,i){if(t){if("task"===t.type&&this.props.secondaryGantt){const i=t;this.projection={start:new Date(i.startDate),end:new Date(i.endDate),color:i.color||"#ED7D31"}}else this.projection=void 0;null==i||i(t)}}handleDblClick(t,i){t&&(null==i||i(t))}handleContextMenu(t,i,s){if(i){if("task"===i.type&&this.props.secondaryGantt){const t=i;this.projection={start:new Date(t.startDate),end:new Date(t.endDate),color:t.color||"#ED7D31"}}else this.projection=void 0;null==s||s(t,i)}}handleSetDoubleView(t){var i,s;this.mainGanttDoubleView=t,null===(s=null===(i=this.props)||void 0===i?void 0:i.onSetDoubleView)||void 0===s||s.call(i,t)}handleDateChange(t,i,s){var e;const h=null==t?void 0:t.id;if(!h)return;let d=n(h,i);if(d||(d=a(h,i)),d)if("timeline"!==d.type){if("project"===d.type){const s=l(i,t);d=n(d.id,s),this.viewDate=t.start,this.currentTasks=s}else if("task"===d.type){const s=i.find((t=>{var i;return null===(i=t.phases)||void 0===i?void 0:i.some((t=>(null==t?void 0:t.id)===h))}));if(s){const h=o(s.phases,t),l=i.map((t=>t.id===s.id?Object.assign(Object.assign({},t),{phases:h}):t));d=a(d.id,l),this.props.secondaryGantt&&d&&(this.projection={start:new Date(d.startDate),end:new Date(d.endDate),color:null!==(e=d.color)&&void 0!==e?e:"#ED7D31"}),this.viewDate=t.start,this.currentTasks=l}}null==s||s(d),setTimeout(this.getScrollX,500)}else console.log("onDateChange for timeline not managed yet",h,d.type)}handlePhaseDrop(t,i,s,e){let h;const l=this.currentTasks,n=l.find((t=>{var s;return null===(s=t.phases)||void 0===s?void 0:s.some((t=>(null==t?void 0:t.id)===i.id))}));if(n){const t=o(n.phases,i),s=l.map((i=>i.id===n.id?Object.assign(Object.assign({},i),{phases:t}):i));h=a(i.id,s)}null==h||delete h.taskRow,null==e||e({originalPhaseData:t,finalPhaseData:h,destinationData:s}),this.currentTasks=JSON.parse(JSON.stringify(this.currentTasks)),setTimeout(this.getScrollX,500)}getScrollX(){var t,i,s;if(this.rootElement){const e=null===(t=this.rootElement.querySelector('[data-scrollx="true"]'))||void 0===t?void 0:t.scrollLeft;void 0!==e&&(null===(s=(i=this.props).onScrollX)||void 0===s||s.call(i,e))}}render(){var i,s,e;return t("div",{key:"23145b3c2d83d53eadd4cbe0a00006089a5e277e",class:"planner-render"},t("kup-switcher",{key:"745c70a1e903ae5f3af565e7843c3d84ca36d013",timeUnitChange:t=>{var i,s;null===(s=(i=this.props).onSetViewMode)||void 0===s||s.call(i,t),this.timeUnit=t,this.viewDate=void 0,this.scrollX=-1}}),this.props&&t("div",{key:"a07185cd6be444510aef8c07eef0a9afe72d9fd6",style:{display:"flex",flexDirection:"column"}},t("kup-gantt",Object.assign({ref:t=>this.mainGantt=t,ganttId:r,key:r,filter:this.props.mainGantt.filter,hideLabel:this.props.mainGantt.hideLabel,showSecondaryDates:this.mainGanttDoubleView,hideDependencies:this.props.mainGantt.hideDependencies,ganttHeight:this.props.mainGantt.ganttHeight,displayedStartDate:this.displayedDates.displayedStartDate,displayedEndDate:this.displayedDates.displayedEndDate,viewDate:this.viewDate,tasks:this.tasks,columnWidth:d(this.timeUnit),viewMode:this.timeUnit,dependencies:this.props.mainGantt.dependencies},this.props.mainGantt.stylingOptions,{TaskListHeader:this.props.mainGantt.taskListHeaderProject,TaskListTable:this.props.mainGantt.taskListTableProject,TooltipContent:null!==(i=this.props.mainGantt.tooltipContent)&&void 0!==i?i:p(),barClick:t=>{let i=n(t.id,this.currentTasks);i||(i=a(t.id,this.currentTasks)),i&&this.handleClick(i,this.props.mainGantt.onClick)},barDblClick:t=>{let i=n(t.id,this.currentTasks);i||(i=a(t.id,this.currentTasks)),i&&this.handleDblClick(i,this.props.mainGantt.onDblClick)},barContextMenu:(t,i)=>{let s=n(i.id,this.currentTasks);s||(s=a(i.id,this.currentTasks)),s&&this.handleContextMenu(t,s,this.props.mainGantt.onContextMenu)},dateChange:t=>this.handleDateChange(t,this.currentTasks,this.props.mainGantt.onDateChange),locale:this.locale,dateTimeFormatters:v,initialScrollX:this.scrollX,initialScrollY:this.props.mainGantt.initialScrollY,readOnly:this.props.mainGantt.readOnly,scrollXChange:this.props.onScrollX,scrollYChange:this.props.mainGantt.onScrollY,currentTasks:this.currentTasks,handleClick:this.handleClick.bind(this),handleDblClick:this.handleDblClick.bind(this),handleContextMenu:this.handleContextMenu.bind(this),ganttOnClick:this.props.mainGantt.onClick,ganttOnDblClick:this.props.mainGantt.onDblClick,ganttonOnContextMenu:this.props.mainGantt.onContextMenu,label:this.props.mainGantt.title,doubleView:null!==(s=this.mainGanttDoubleView)&&void 0!==s&&s,setDoubleView:this.handleSetDoubleView.bind(this),scrollableTaskList:this.props.scrollableTaskList,phaseDrop:(t,i,s,e)=>{const h=a(t.id,this.currentTasks);n(i.id,this.currentTasks),a(s.id,this.currentTasks);const l=n(e.id,this.currentTasks);this.handlePhaseDrop(h,s,l,this.props.mainGantt.onPhaseDrop)}})),this.props.secondaryGantt&&t("kup-gantt",Object.assign({ref:t=>this.secondaryGantt=t,ganttId:c,key:c,filter:this.props.secondaryGantt.filter,hideLabel:this.props.secondaryGantt.hideLabel,showSecondaryDates:this.mainGanttDoubleView,hideDependencies:this.props.secondaryGantt.hideDependencies,ganttHeight:this.props.secondaryGantt.ganttHeight,displayedStartDate:this.displayedDates.displayedStartDate,displayedEndDate:this.displayedDates.displayedEndDate,viewDate:this.viewDate,tasks:this.details,columnWidth:d(this.timeUnit),viewMode:this.timeUnit,dependencies:this.props.secondaryGantt.dependencies},this.props.secondaryGantt.stylingOptions,{TaskListHeader:this.props.secondaryGantt.taskListHeaderProject,TaskListTable:this.props.secondaryGantt.taskListTableProject,TooltipContent:null!==(e=this.props.secondaryGantt.tooltipContent)&&void 0!==e?e:p(),projection:this.projection,barClick:t=>{if(this.props.secondaryGantt){let i=n(t.id,this.currentDetails);i&&this.handleClick(i,this.props.secondaryGantt.onClick)}},barDblClick:t=>{if(this.props.secondaryGantt){let i=n(t.id,this.currentDetails);i&&this.handleDblClick(i,this.props.secondaryGantt.onDblClick)}},barContextMenu:(t,i)=>{if(this.props.secondaryGantt){let s=n(i.id,this.currentDetails);s&&this.handleContextMenu(t,s,this.props.secondaryGantt.onContextMenu)}},dateChange:t=>this.handleDateChange(t,this.currentTasks,this.props.secondaryGantt.onDateChange),locale:this.locale,dateTimeFormatters:v,initialScrollX:this.scrollX,initialScrollY:this.props.secondaryGantt.initialScrollY,readOnly:this.props.secondaryGantt.readOnly,scrollXChange:this.props.onScrollX,scrollYChange:this.props.secondaryGantt.onScrollY,currentTasks:this.currentTasks,handleClick:this.handleClick.bind(this),handleDblClick:this.handleDblClick.bind(this),handleContextMenu:this.handleContextMenu.bind(this),ganttOnClick:this.props.secondaryGantt.onClick,ganttOnDblClick:this.props.secondaryGantt.onDblClick,ganttonOnContextMenu:this.props.secondaryGantt.onContextMenu,label:this.props.secondaryGantt.title,scrollableTaskList:this.props.scrollableTaskList}))))}get rootElement(){return s(this)}static get watchers(){return{props:["mainGanttChangeHandler"],timeUnit:["updateDisplayedDates"],mainGanttDoubleView:["updateDisplayedDates"],"props.preStepsCount":["updateDisplayedDates"],viewDate:["updateDisplayedDates"],currentTasks:["updateTasks"],currentDetails:["updateTasks"]}}};export{D as kup_planner_renderer}
@@ -0,0 +1 @@
1
+ const e=(e,t,n,o,s,a,l,c,d,i,u,b,h,g,p,x,v,f,C)=>{let k=e.map(((e,k)=>r(e,k,t,n,o,s,a,l,c,d,i,u,b,h,g,p,x,v,f,C)));return k=k.map((e=>{const r=e.dependencies||[];for(let t=0;t<r.length;t++){const n=k.findIndex((e=>e.id===r[t]));-1!==n&&k[n].barChildren.push(e)}return e})),k},r=(e,r,t,o,a,l,c,d,i,u,b,h,g,p,x,v,f,C,k,y)=>{let j;switch(e.type){case"timeline":j=s(e,r,t,o,a,d,i,u);break;case"project":j=n(e,r,t,o,a,c,i,u,b,v,f,C,k,y);break;default:j=n(e,r,t,o,a,l,i,u,b,h,g,p,x,y)}return j};function t(e,r,t,n,o,s,c,d,i){let u,b;c?(b=l(e,n,o,d),u=l(r,n,o,i)):(u=a(e,n,o,d),b=a(r,n,o,i));let h=t;return"task"===h&&b-u<2*s&&(h="smalltask",b=u+2*s),{x1:u,x2:b,typeInternal:h}}const n=(e,r,n,o,s,a,l,i,u,b,h,g,p,x)=>{const{x1:v,x2:f,typeInternal:C}=t(e.start,e.end,e.type,n,o,i,u,e.startHour,e.endHour),{x1:k,x2:y}=x&&e.secondaryStart&&e.secondaryEnd?t(e.secondaryStart,e.secondaryEnd,e.type,n,o,i,u,e.secondaryStartHour,e.secondaryEndHour):{x1:void 0,x2:void 0},[j,m]=d(v,f,e.progress,u),S=c(r,s,a),$="project"===e.type?e.hideChildren:void 0,w=Object.assign({backgroundColor:g,backgroundSelectedColor:p,progressColor:b,progressSelectedColor:h},e.styles);return Object.assign(Object.assign({},e),{typeInternal:C,x1:v,x2:f,x1secondary:k,x2secondary:y,y:S,index:r,progressX:m,progressWidth:j,barCornerRadius:l,handleWidth:i,hideChildren:$,height:a,barChildren:[],styles:w,ySecondary:S})},o=e=>{var r,t,n,o;return{backgroundColor:null!==(r=null==e?void 0:e.backgroundColor)&&void 0!==r?r:"#deadbeef",backgroundSelectedColor:null!==(t=null==e?void 0:e.backgroundSelectedColor)&&void 0!==t?t:"#cafebabe",progressColor:null!==(n=null==e?void 0:e.progressColor)&&void 0!==n?n:"#deadbeef",progressSelectedColor:null!==(o=null==e?void 0:e.progressSelectedColor)&&void 0!==o?o:"#cafebabe"}},s=(e,r,n,s,a,l,d,i)=>{var u;const b=c(r,a,l),{x1:h,x2:g}=t(e.start,e.end,e.type,n,s,i,!1),p=null===(u=e.timeline)||void 0===u?void 0:u.map((function(r,o){var a,c;const{x1:d,x2:u}=t(r.start,r.end,"task",n,s,i,!1),h=r.backgroundColor,g=null!==(a=r.backgroundSelectedColor)&&void 0!==a?a:h;return{barChildren:[],barCornerRadius:0,start:r.start,end:r.end,handleWidth:0,height:l,id:`Frame-${e.id}-${o}`,index:+r.start,name:"",valuesToShow:e.valuesToShow,progress:0,progressWidth:0,progressX:0,styles:{backgroundColor:h,backgroundSelectedColor:g,progressColor:h,progressSelectedColor:g},timeline:[],type:"task",typeInternal:"timeline",x1:d,x2:u,y:b,icon:null!==(c=r.icon)&&void 0!==c?c:void 0}}));return Object.assign(Object.assign({},e),{x1:h,x2:g,y:b,index:r,progressX:0,progressWidth:0,barCornerRadius:d,handleWidth:i,typeInternal:e.type,progress:0,height:l,hideChildren:void 0,barChildren:null!=p?p:[],styles:o(e.styles)})},a=(e,r,t,n)=>{if(n){const[r,t,o]=n.split(":").map(Number);e.setHours(null!=r?r:0),e.setMinutes(null!=t?t:0),e.setSeconds(null!=o?o:0)}const o=r.findIndex((r=>r.getTime()>=e.getTime()))-1;return o<0?0:o*t+(e.getTime()-r[o].getTime())/(r[o+1].getTime()-r[o].getTime())*t},l=(e,r,t,n)=>{let o=a(e,r,t,n);return o+=t,o},c=(e,r,t)=>e*r+(r-t)/2,d=(e,r,t,n)=>{const o=(r-e)*t*.01;let s;return s=n?r-o:e,[o,s]},i=(e,r,t)=>[e-5,r+t,e+5,r+t,e,r+t-8.66].join(","),u=(e,r,t,n,o)=>{let s=new Date((e-r)/n*o+t.getTime());return s=new Date(s.getTime()+6e4*(s.getTimezoneOffset()-t.getTimezoneOffset())),s},b=(e,r)=>{const t=e.getHours(),n=e.getMinutes(),o=e.getSeconds(),s=t<10?"0"+t:t,a=n<10?"0"+n:n;return r?`${s}:${a}:${o<10?"0"+o:o}`:`${s}:${a}`},h=e=>3===e.split(":").length,g=(e,r,t,n,o,s,a,l)=>p(e,r,t,n,o,s,a,l),p=(e,r,t,n,o,s,a,l)=>{const c=Object.assign({},t);let i=!1;switch(r){case"progress":if(c.progress=a?(g=e)>=(p=t).x2?0:g<=p.x1?100:Math.round(100*(p.x2-g)/(p.x2-p.x1)):((e,r)=>e>=r.x2?100:e<=r.x1?0:Math.round(100*(e-r.x1)/(r.x2-r.x1)))(e,t),i=c.progress!==t.progress,i){const[e,r]=d(c.x1,c.x2,c.progress,a);c.progressWidth=e,c.progressX=r}break;case"start":{const r=((e,r,t)=>{e>=t.x2-2*t.handleWidth&&(e=t.x2-2*t.handleWidth);const n=Math.round((e-t.x1)/r);return t.x1+n*r})(e,n,t);if(c.x1=r,i=c.x1!==t.x1,i){a?(c.end=u(r,t.x1,t.end,n,o),c.endHour&&(c.endHour=b(c.end,h(c.endHour)))):(c.start=u(r,t.x1,t.start,n,o),c.startHour&&(c.startHour=b(c.start,h(c.startHour))));const[e,s]=d(c.x1,c.x2,c.progress,a);c.progressWidth=e,c.progressX=s}break}case"end":{const r=((e,r,t)=>{e<=t.x1+2*t.handleWidth&&(e=t.x1+2*t.handleWidth);const n=Math.round((e-t.x2)/r);return t.x2+n*r})(e,n,t);if(c.x2=r,i=c.x2!==t.x2,i){a?(c.start=u(r,t.x2,t.start,n,o),c.startHour&&(c.startHour=b(c.start,h(c.startHour)))):(c.end=u(r,t.x2,t.end,n,o),c.endHour&&(c.endHour=b(c.end,h(c.endHour))));const[e,s]=d(c.x1,c.x2,c.progress,a);c.progressWidth=e,c.progressX=s}break}case"move":{const[r,g]=((e,r,t)=>{const n=Math.round((e-t.x1)/r),o=t.x1+n*r;return[o,o+t.x2-t.x1]})(e-s,n,t);if(i=r!==t.x1,i){c.start=u(r,t.x1,t.start,n,o),c.end=u(g,t.x2,t.end,n,o),c.startHour&&(c.startHour=b(c.start,h(c.startHour))),c.endHour&&(c.endHour=b(c.end,h(c.endHour))),c.x1=r,c.x2=g;const[e,s]=d(c.x1,c.x2,c.progress,a);c.progressWidth=e,c.progressX=s,"task"===c.type&&(c.y=l)}break}}var g,p;return{isChanged:i,changedTask:c}};function x(e,r){return a(new Date,e,r)}function v(e,r,t,n){return{x0:a(e,t,n),xf:a(r,t,n)}}function f(e){return void 0!==e.key}function C(e){const r=e.filter((e=>e.hideChildren&&"project"===e.type));if(r.length>0)for(let t=0;r.length>t;t++){const n=k(e,r[t]);e=e.filter((e=>-1===n.indexOf(e)))}return e}function k(e,r){let t=[];t=e.filter("project"!==r.type?e=>e.dependencies&&-1!==e.dependencies.indexOf(r.id):e=>e.project&&e.project===r.id);var n=[];return t.forEach((r=>{n.push(...k(e,r))})),t=t.concat(t,n),t}const y=(e,r)=>{const t=e.displayOrder||Number.MAX_VALUE,n=r.displayOrder||Number.MAX_VALUE;return t>n?1:t<n?-1:0},j=e=>Array.from({length:e},((e,r)=>r));export{x as a,v as b,e as c,j as d,i as g,g as h,f as i,C as r,y as s}
@@ -0,0 +1,16 @@
1
+ import{r as t,h as i,F as e}from"./p-b0368f88.js";import{a as s,c as o}from"./p-1ee561ba.js";import{d as n,i as a,g as r,h}from"./p-78c0ff1b.js";import{d as l,a as p,b as f,c,e as d}from"./p-53af4c87.js";import{d as u}from"./p-17c9ef50.js";const g=class{constructor(i){t(this,i),this.label="",this.doubleView=!1,this.setDoubleView=void 0,this.fontFamily=void 0,this.fontSize=void 0}render(){return i("div",{key:"f9305faff69be3e2b6a0f2afcd82494eca01ba2a",class:"custom-task-list-wrapper",style:{height:"25px",fontFamily:this.fontFamily,fontSize:this.fontSize}},i("div",{key:"8c383b0b32bb128b2b1b628773d7f4db0439be21",class:"title"},i("span",{key:"a4afad10a4d5258c2b37dbad48932a626f270f1e"},this.label)),void 0!==this.setDoubleView&&i("div",{key:"fcb8fa287da91c970ae0d5cf118299a03677089a",class:"toggler"},i("label",{key:"9f092e5796ab21dcbe995e5522c6a6df4ea57293",htmlFor:"ch2",class:"switch"},i("input",{key:"df0e7bfc59e82ee7bced1e7f0c88e3a393ac2850",class:"input",id:"ch2",type:"checkbox",checked:this.doubleView,onClick:()=>this.setDoubleView(!this.doubleView)}),i("span",{key:"5fba3f7d3f908c1bee8bd71bf036d124d183a94f",class:"slider"})),i("span",{key:"ee0f41729c539934d837b9bc81c58ec84c88ef8f",class:"label"},"Previsioni")))}};g.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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}.custom-task-list-wrapper{display:flex;justify-content:space-around;max-width:330px;place-items:"center";text-align:center;align-items:center}.title{font-weight:bold;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toggler{max-width:max-content;padding:0 4px;text-align:right}.switch{position:relative;display:inline-block;width:30px;height:17px}.input{opacity:0;width:0;height:0}.input:checked+.slider{background-color:#003b77}.input:checked+.slider:before{-webkit-transform:translateX(13px);-ms-transform:translateX(13px);transform:translateX(13px)}.input:focus+.slider{box-shadow:0 0 1px #003b77}.slider{-webkit-transition:0.4s;cursor:pointer;background-color:#ccc;bottom:0;border-radius:17px;left:0;position:absolute;right:0;top:0;transition:0.4s}.slider:before{-webkit-transition:0.1s;background-color:white;border-radius:50%;bottom:2px;content:"";height:13px;left:2px;position:absolute;transition:0.1s;width:13px}.label{font-size:12px;padding:6px}.filter{font-size:12px}';const v=class{constructor(i){t(this,i),this.ganttId=void 0,this.tasks=[],this.rowHeight=0,this.rowWidth="",this.fontFamily="",this.fontSize="",this.scrollableTaskList=void 0,this.taskListScrollX=void 0,this.setSelectedTask=void 0,this.onclickTaskList=void 0,this.ondblclickTaskList=void 0,this.oncontextmenuTaskList=void 0,this.ontaskListScrollWidth=void 0}componentDidLoad(){var t;this.ontaskListScrollWidth(null===(t=this.projectWrapperRef)||void 0===t?void 0:t.clientWidth)}componentDidUpdate(){var t;this.ontaskListScrollWidth(null===(t=this.projectWrapperRef)||void 0===t?void 0:t.clientWidth)}updateTaskListScroll(){this.projectWrapperRef&&(this.projectWrapperRef.parentElement.scrollLeft=this.taskListScrollX)}render(){var t;const o=new s,a={};this.scrollableTaskList&&(a.width=this.rowWidth);const r=this.tasks&&this.tasks.length>0&&(null===(t=this.tasks.reduce(((t,i)=>{var e,s;return(null===(e=t.valuesToShow)||void 0===e?void 0:e.length)>(null===(s=i.valuesToShow)||void 0===s?void 0:s.length)?t:i})).valuesToShow)||void 0===t?void 0:t.length)+1||1;return i("div",{class:"container "+(this.scrollableTaskList?"scrollable":""),style:a},i("div",{class:"project-wrapper",ref:t=>this.projectWrapperRef=t},this.tasks.map((t=>{var s,a,h,l;return i(e,null,"project"===t.type?i("div",{class:"project",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,gridTemplateColumns:`repeat(${t.valuesToShow.length}, 1fr)`},onClick:()=>{this.setSelectedTask(t.id),this.onclickTaskList(t.id)},onDblClick:()=>{this.setSelectedTask(t.id),this.ondblclickTaskList(t.id)},onContextMenu:i=>{i.preventDefault(),this.setSelectedTask(t.id),this.oncontextmenuTaskList(i,t.id)}},null===(s=t.valuesToShow)||void 0===s?void 0:s.map(((e,s)=>i("span",{class:0===s?"main":void 0,title:e.length>10?e:void 0,key:`task_${t.id}_valuesToShow_${s}`},"#START#"===e?o.formatToLocaleSimple(t.start):"#END#"===e?o.formatToLocaleSimple(t.end):e))),this.scrollableTaskList&&r>t.valuesToShow.length&&n(r-t.valuesToShow.length).map((t=>i("span",{key:t})))):"task"===t.type?i("div",{class:"subrow",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,gridTemplateColumns:`repeat(${t.valuesToShow.length+1}, 1fr)`},onClick:()=>{this.setSelectedTask(t.id),this.onclickTaskList(t.id)},onDblClick:()=>{this.setSelectedTask(t.id),this.ondblclickTaskList(t.id)},onContextMenu:i=>{i.preventDefault(),this.setSelectedTask(t.id),this.oncontextmenuTaskList(i,t.id)}},this.scrollableTaskList?i("div",{style:{textAlign:"end"}},i("span",{key:`phase_${t.id}_valuesToShow_color`,style:{height:"16px",width:"16px",display:"inline-block",backgroundColor:null===(a=t.styles)||void 0===a?void 0:a.backgroundColor}})):i("span",{key:`phase_${t.id}_valuesToShow_color`,style:{height:"16px",width:"16px",backgroundColor:null===(h=t.styles)||void 0===h?void 0:h.backgroundColor}}),null===(l=t.valuesToShow)||void 0===l?void 0:l.map(((e,s)=>i("span",{class:0===s?"main":void 0,title:e.length>10?e:void 0,key:`phase_${t.id}_valuesToShow_${s}`},"#START#"===e?o.formatToLocaleSimple(t.start):"#END#"===e?o.formatToLocaleSimple(t.end):e))),this.scrollableTaskList&&r>t.valuesToShow.length&&n(r-t.valuesToShow.length-1).map((t=>i("span",{key:t})))):(()=>{var e;let s="";for(let i=0;i<t.valuesToShow.length;i++)s+="1fr ";return i("div",{class:"timeline",style:{height:`${this.rowHeight}px`,width:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,"--grid-fasi-columns":s},onContextMenu:i=>{i.preventDefault(),this.setSelectedTask(t.id),this.oncontextmenuTaskList(i,t.id)}},null===(e=t.valuesToShow)||void 0===e?void 0:e.map(((e,s)=>i("span",{class:0===s?"main":void 0,title:e.length>10?e:void 0,key:`detail_${t.id}_valuesToShow_${s}`},e))))})())}))))}static get watchers(){return{taskListScrollX:["updateTaskListScroll"]}}};v.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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}.container{margin-top:var(--kup-space-04)}.scrollable{overflow-x:auto;scrollbar-width:0}.scrollable .project-wrapper{display:table}.scrollable .project{width:100% !important;display:table-row}.scrollable .project>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid var(--kup-border-subtle, #acacac);border-top:1px solid var(--kup-border-subtle, #acacac);padding-left:12px}.scrollable .project>*:first-child{border-left:1px solid var(--kup-border-subtle, #acacac);border-bottom-left-radius:4px;border-top-left-radius:4px}.scrollable .project>*:last-child{border-right:1px solid var(--kup-border-subtle, #acacac);border-bottom-right-radius:4px;border-top-right-radius:4px}.scrollable .subrow{width:100% !important;display:table-row}.scrollable .subrow>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid #acacac;border-top:1px solid #acacac;padding-left:12px}.scrollable .subrow>*:first-child{border-left:1px solid #acacac}.scrollable .subrow>*:last-child{border-right:1px solid #acacac}.scrollable .timeline{width:100% !important;display:table-row}.scrollable .timeline>*{overflow:unset;padding-right:10px;display:table-cell;vertical-align:middle;border-bottom:1px solid #acacac;border-top:1px solid #acacac;padding-left:12px}.scrollable .timeline>*:first-child{border-left:1px solid #acacac}.scrollable .timeline>*:last-child{border-right:1px solid #acacac}.scrollable .project:has(+.subrow)>*{border-bottom-left-radius:0;border-bottom-right-radius:0}.scrollable::-webkit-scrollbar{width:0;height:0}.project{background:var(--kup-layer-1);border-bottom:1px solid var(--kup-border-subtle);border-radius:var(--kup-radius-00);box-sizing:border-box;color:var(--kup-text-secondary);cursor:pointer;display:grid;font-weight:400;grid-template-columns:var(--grid-project-columns, 1fr 1fr 1fr);place-items:center;padding:var(--kup-space-03)}.project>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;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}.project .main{font-weight:700;width:100%;padding-left:4px;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.subrow{cursor:pointer;display:grid;border-bottom:1px solid var(--kup-border-subtle);box-sizing:border-box;grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background-color:var(--kup-layer-1);color:var(--kup-text-primary);font-weight:400}.subrow>*{font-size:12px;line-height:14px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.subrow:last-of-type{border-bottom:1px solid var(--kup-border-subtle)}.subrow:has(+.subrow),.project:has(+.subrow){border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important}.timeline{padding:var(--kup-space-03);cursor:pointer;display:grid;border-bottom:1px solid var(--kup-border-subtle);border-radius:var(--kup-radius-00);grid-template-columns:var(--grid-fasi-columns, 1fr 1fr 1fr);place-items:center;background-color:var(--kup-layer-1);color:var(--kup-text-primary);font-weight:400;box-sizing:border-box}.timeline>*{font-size:14px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;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}.timeline .main{font-weight:700;width:100%;padding-left:4px;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}";const x=class{constructor(i){t(this,i),this.dateSetup=void 0,this.locale=void 0,this.rtl=void 0,this.headerHeight=void 0,this.columnWidth=void 0,this.fontFamily=void 0,this.fontSize=void 0,this.dateTimeFormatters=void 0,this.singleLineHeader=!1,this.currentDateIndicator=void 0,this.svgWidth=void 0,this.simplifiedHeader=void 0}componentWillLoad(){this.simplifiedHeader=this.singleLineHeader&&"year"!==this.dateSetup.viewMode}formatYear(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.year)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.year(t,this.locale):l.year(t,this.locale)}formatMonth(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.month)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.month(t,this.locale):l.month(t,this.locale)}formatMonthAndYear(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.monthAndYear)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.monthAndYear(t,this.locale):l.monthAndYear(t,this.locale)}formatWeek(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.week)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.week(t,this.locale):l.week(t,this.locale)}formatDay(t){var i,e;return(null===(i=this.dateTimeFormatters)||void 0===i?void 0:i.day)?null===(e=this.dateTimeFormatters)||void 0===e?void 0:e.day(t,this.locale):l.day(t,this.locale)}getCalendarValuesForYear(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatYear(a);if(e.push(i("text",{key:r,y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),0===n||a.getFullYear()!==o[n-1].getFullYear()){const i=a.getFullYear().toString();let e;e=this.rtl?(6+n+a.getFullYear()+1)*this.columnWidth:(6+n-a.getFullYear())*this.columnWidth,t.push({key:i,value:i,x1Line:this.columnWidth*n,y1Line:0,y2Line:this.headerHeight,xText:e,yText:.9*s})}}return[t,e]}getCalendarValuesForMonth(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatMonth(a);if(e.push(i("text",{key:r+a.getFullYear(),y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),0===n||a.getFullYear()!==o[n-1].getFullYear()){const i=this.formatYear(a);let e;e=this.rtl?(6+n+a.getMonth()+1)*this.columnWidth:(6+n-a.getMonth())*this.columnWidth,t.push({key:i,value:i,x1Line:this.columnWidth*n,y1Line:0,y2Line:s,xText:e,yText:.9*s})}}return[t,e]}getCalendarValuesForWeek(){const t=[],e=[];let s=1;const o=.5*this.headerHeight,n=this.dateSetup.dates;for(let a=n.length-1;a>=0;a--){const r=n[a];let h="";0!==a&&r.getMonth()===n[a-1].getMonth()||(h=this.formatMonthAndYear(r));const l=this.formatWeek(r);e.push(i("text",{key:r.getTime(),y:.8*this.headerHeight,x:this.columnWidth*(a+ +this.rtl),class:"calendarBottomText"},l)),h&&(a!==n.length-1&&t.push({key:h,value:h,x1Line:this.columnWidth*a+s*this.columnWidth,y1Line:0,y2Line:o,xText:this.columnWidth*a+this.columnWidth*s*.5,yText:.9*o}),s=0),s++}return[t,e]}getCalendarValuesForDay(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=this.formatDay(a);if(e.push(i("text",{key:a.getTime(),y:.8*this.headerHeight,x:this.columnWidth*n+.5*this.columnWidth,class:"calendarBottomText"},r)),n+1!==o.length&&a.getMonth()!==o[n+1].getMonth()){const i=this.formatMonth(a);t.push({key:i+a.getFullYear(),value:i,x1Line:this.columnWidth*(n+1),y1Line:0,y2Line:s,xText:this.columnWidth*(n+1)-p(a.getMonth(),a.getFullYear())*this.columnWidth*.5,yText:.9*s})}}return[t,e]}getCalendarValuesForHour(){const t=[],e=[],s=.5*this.headerHeight,o=this.dateSetup.dates;for(let n=0;n<o.length;n++){const a=o[n],r=f(this.locale,{hour:"numeric"}).format(a);if(e.push(i("text",{key:a.getTime(),y:.8*this.headerHeight,x:this.columnWidth*(n+ +this.rtl),class:"calendarBottomText"},r)),0!==n&&a.getDate()!==o[n-1].getDate()){const i=o[n-1],e=`${c(i,this.locale,"long")}, ${i.getDate()} ${d(i,this.locale)}`,r=(a.getHours()-24)/2;t.push({key:e+a.getFullYear(),value:e,x1Line:this.columnWidth*n,y1Line:0,y2Line:s,xText:this.columnWidth*(n+r),yText:.9*s})}}return[t,e]}getTopAndBottomValues(){switch(this.dateSetup.viewMode){case"hour":return this.getCalendarValuesForHour();case"day":return this.getCalendarValuesForDay();case"week":return this.getCalendarValuesForWeek();case"month":return this.getCalendarValuesForMonth();case"year":return this.getCalendarValuesForYear()}}render(){this.simplifiedHeader=this.singleLineHeader&&"year"!==this.dateSetup.viewMode;const[t,e]=this.getTopAndBottomValues();return i("svg",{key:"3c4ad0dc0aa5184b89d22b1340af5751d63e2bbf",xmlns:"http://www.w3.org/2000/svg",width:this.svgWidth,height:this.headerHeight},i("g",{key:"0db95816bba2cb796b75f9515244430e39b806f7",class:"calendar","font-size":this.fontSize,"font-family":this.fontFamily},i("rect",{key:"94f45f66476ca31bc063590b9edaace7049ec8ef",x:0,y:0,width:this.columnWidth*this.dateSetup.dates.length,height:this.headerHeight,class:"calendarHeader"}),this.simplifiedHeader?null:e,t.map(this.simplifiedHeader?t=>i("g",{class:"calendarTop"},i("line",{x1:t.x1Line,y1:2*t.y2Line,x2:t.x1Line,y2:t.y2Line,class:"calendarTopTick",key:t.value+"line"}),i("text",{key:t.value+"text",y:t.yText,x:t.xText,class:"calendarTopText"},t.value)):t=>i("g",{class:"calendarTop"},i("line",{x1:t.x1Line,y1:t.y1Line,x2:t.x1Line,y2:t.y2Line,class:"calendarTopTick",key:t.value+"line"}),i("text",{key:t.value+"text",y:t.yText,x:t.xText,class:"calendarTopText"},t.value))),this.currentDateIndicator&&i("circle",{key:"2cd33e167d0e2cf70e6d37bf075dca727f39bb26",fill:this.currentDateIndicator.color,cx:this.currentDateIndicator.x+2.5,cy:this.headerHeight-8,r:"8"})))}};x.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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}.calendarBottomText{text-anchor:middle;fill:var(--kup-text-secondary);-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;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}.calendarTopTick{stroke:var(--kup-border-subtle)}.calendarTopText{text-anchor:middle;fill:var(--kup-text-secondary);-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;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}.calendarHeader{fill:var(--kup-layer-1);stroke:var(--kup-border-subtle);stroke-width:1.4;font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}";var y,m,k,b,w,z={exports:{}};y=z.exports,m=function(){function t(t,i,e){this.r=0,this.g=0,this.b=0,this.set(t,i,e)}return t.prototype.set=function(t,i,e){this.r=this.clamp(t),this.g=this.clamp(i),this.b=this.clamp(e)},t.prototype.hueRotate=function(t){void 0===t&&(t=0),t=t/180*Math.PI;var i=Math.sin(t),e=Math.cos(t);this.multiply([.213+.787*e-.213*i,.715-.715*e-.715*i,.072-.072*e+.928*i,.213-.213*e+.143*i,.715+.285*e+.14*i,.072-.072*e-.283*i,.213-.213*e-.787*i,.715-.715*e+.715*i,.072+.928*e+.072*i])},t.prototype.grayscale=function(t){void 0===t&&(t=1),this.multiply([.2126+.7874*(1-t),.7152-.7152*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152+.2848*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152-.7152*(1-t),.0722+.9278*(1-t)])},t.prototype.sepia=function(t){void 0===t&&(t=1),this.multiply([.393+.607*(1-t),.769-.769*(1-t),.189-.189*(1-t),.349-.349*(1-t),.686+.314*(1-t),.168-.168*(1-t),.272-.272*(1-t),.534-.534*(1-t),.131+.869*(1-t)])},t.prototype.saturate=function(t){void 0===t&&(t=1),this.multiply([.213+.787*t,.715-.715*t,.072-.072*t,.213-.213*t,.715+.285*t,.072-.072*t,.213-.213*t,.715-.715*t,.072+.928*t])},t.prototype.multiply=function(t){var i=this.clamp(this.r*t[0]+this.g*t[1]+this.b*t[2]),e=this.clamp(this.r*t[3]+this.g*t[4]+this.b*t[5]),s=this.clamp(this.r*t[6]+this.g*t[7]+this.b*t[8]);this.r=i,this.g=e,this.b=s},t.prototype.brightness=function(t){void 0===t&&(t=1),this.linear(t)},t.prototype.contrast=function(t){void 0===t&&(t=1),this.linear(t,-.5*t+.5)},t.prototype.linear=function(t,i){void 0===t&&(t=1),void 0===i&&(i=0),this.r=this.clamp(this.r*t+255*i),this.g=this.clamp(this.g*t+255*i),this.b=this.clamp(this.b*t+255*i)},t.prototype.invert=function(t){void 0===t&&(t=1),this.r=this.clamp(255*(t+this.r/255*(1-2*t))),this.g=this.clamp(255*(t+this.g/255*(1-2*t))),this.b=this.clamp(255*(t+this.b/255*(1-2*t)))},t.prototype.hsl=function(){var t=this.r/255,i=this.g/255,e=this.b/255,s=Math.max(t,i,e),o=Math.min(t,i,e),n=0,a=(s+o)/2;if(s===o)return{h:0,s:0,l:100*a};var r=s-o;return s===t?n=(i-e)/r+(i<e?6:0):s===i?n=(e-t)/r+2:s===e&&(n=(t-i)/r+4),{h:100*(n/=6),s:100*(a>.5?r/(2-s-o):r/(s+o)),l:100*a}},t.prototype.clamp=function(t){return Math.min(Math.max(t,0),255)},t}(),k=function(){function t(t,i){this.target=t,this.targetHSL=t.hsl(),this.options=Object.assign({},{acceptanceLossPercentage:5,maxChecks:15},i),this.reusedColor=new m(0,0,0)}return t.prototype.solve=function(){var t=this.solveNarrow(this.solveWide());return{values:t.values,called:t.called,loss:t.loss,filter:this.css(t.values)}},t.prototype.solveWide=function(){for(var t=[60,180,18e3,600,1.2,1.2],i={loss:1/0},e=0;i.loss>this.options.acceptanceLossPercentage;){var s=this.spsa({A:5,a:t,c:15,values:[50,20,3750,50,100,100],maxTriesInLoop:1e3});if(s.loss<i.loss&&(i=s),(e+=1)>=this.options.maxChecks)break}return Object.assign({},i,{called:e})},t.prototype.solveNarrow=function(t){var i=t.loss,e=i+1;return this.spsa({A:i,a:[.25*e,.25*e,e,.25*e,.2*e,.2*e],c:2,values:t.values,maxTriesInLoop:500,called:t.called})},t.prototype.fixValueByFilterIDX=function(t,i){var e=100;return 2===i?e=7500:4!==i&&5!==i||(e=200),3===i?t>e?t%=e:t<0&&(t=e+t%e):t<0?t=0:t>e&&(t=e),t},t.prototype.spsa=function(t){for(var i=t.A,e=t.a,s=t.c,o=t.values,n=t.maxTriesInLoop,a=void 0===n?500:n,r=t.called,h=void 0===r?0:r,l=null,p=1/0,f=new Array(6),c=new Array(6),d=new Array(6),u=0;u<a;u++){for(var g=s/Math.pow(u+1,.16666666666666666),v=0;v<6;v++)f[v]=Math.random()>.5?1:-1,c[v]=o[v]+g*f[v],d[v]=o[v]-g*f[v];var x=this.loss(c)-this.loss(d);for(v=0;v<6;v++){var y=x/(2*g)*f[v],m=e[v]/Math.pow(i+u+1,1);o[v]=this.fixValueByFilterIDX(o[v]-m*y,v)}var k=this.loss(o);k<p&&(l=o.slice(0),p=k)}return{values:l,loss:p,called:h}},t.prototype.loss=function(t){var i=this.reusedColor;i.set(0,0,0),i.invert(t[0]/100),i.sepia(t[1]/100),i.saturate(t[2]/100),i.hueRotate(3.6*t[3]),i.brightness(t[4]/100),i.contrast(t[5]/100);var e=i.hsl();return Math.abs(i.r-this.target.r)+Math.abs(i.g-this.target.g)+Math.abs(i.b-this.target.b)+Math.abs(e.h-this.targetHSL.h)+Math.abs(e.s-this.targetHSL.s)+Math.abs(e.l-this.targetHSL.l)},t.prototype.css=function(t){var i=function(i,e){return void 0===e&&(e=1),Math.round(t[i]*e)};return["invert("+i(0)+"%)","sepia("+i(1)+"%)","saturate("+i(2)+"%)","hue-rotate("+i(3,3.6)+"deg)","brightness("+i(4)+"%)","contrast("+i(5)+"%);"].join(" ")},t}(),b=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},w={},y.clearCache=function(t){t?w[t]&&delete w[t]:w={}},y.hexToCSSFilter=function(t,i){var e,s,o,n,a,r;if(void 0===i&&(i={}),w[t]&&!i.forceFilterRecalculation)return Object.assign({},w[t],{cache:!0});try{if(o=(e=
2
+ /*! *****************************************************************************
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
15
+ ***************************************************************************** */
16
+ function(t,i){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var s,o,n=e.call(t),a=[];try{for(;(void 0===i||i-- >0)&&!(s=n.next()).done;)a.push(s.value)}catch(t){o={error:t}}finally{try{s&&!s.done&&(e=n.return)&&e.call(n)}finally{if(o)throw o.error}}return a}((r=t,4===r.length?[parseInt("0x"+r[1]+r[1]),parseInt("0x"+r[2]+r[2]),parseInt("0x"+r[3]+r[3])]:7===r.length?[parseInt("0x"+r[1]+r[2]),parseInt("0x"+r[3]+r[4]),parseInt("0x"+r[5]+r[6])]:[]),3))[1],n=e[2],!b(s=e[0])||!b(o)||!b(n))throw new Error("hextToRgb returned an invalid value for '"+t+"'");a=new m(Number(s),Number(o),Number(n))}catch(t){throw new Error("Color value should be in HEX format. "+t)}var h=new k(a,Object.assign({},{acceptanceLossPercentage:5,maxChecks:30,forceFilterRecalculation:!1},i));return w[t]=Object.assign({},h.solve(),{hex:t,rgb:[s,o,n],cache:!1})},Object.defineProperty(y,"__esModule",{value:!0});const T=class{constructor(i){t(this,i),this.tasks=void 0,this.dates=void 0,this.ganttEvent=void 0,this.selectedTask=void 0,this.rowHeight=0,this.columnWidth=0,this.timeStep=0,this.taskHeight=0,this.arrowColor="",this.arrowIndent=0,this.fontFamily="",this.fontSize="",this.rtl=!1,this.hideLabel=!1,this.showSecondaryDates=!1,this.currentDateIndicator=void 0,this.projection=void 0,this.readOnly=!1,this.dependencies=[],this.gridProps=void 0,this.dateChange=void 0,this.progressChange=void 0,this.doubleClick=void 0,this.barClick=void 0,this.barDblClick=void 0,this.barContextMenu=void 0,this.delete=void 0,this.setFailedTask=void 0,this.setSelectedTask=void 0,this.eventStart=void 0,this.eMouseDown=void 0,this.phaseDrop=void 0,this.setGanttEvent=void 0,this.phaseDragScroll=void 0,this.xStep=0,this.initEventX1Delta=0,this.initEventXClick=0,this.isMoving=!1,this.point=void 0,this.svg=void 0,this.currentTarget=void 0,this.dragScrollInterval=void 0,this.dropZoneTask=void 0}componentDidLoad(){this.point=this.createSVGPoint(),this.updateXStep()}createSVGPoint(){if(this.svg)return this.svg.createSVGPoint()}updateXStep(){const t=this.dates[1].getTime()-this.dates[0].getTime()-60*this.dates[1].getTimezoneOffset()*1e3+60*this.dates[0].getTimezoneOffset()*1e3;this.xStep=this.timeStep*this.columnWidth/t}updateSvgMove(){const t=async t=>{var i,e;if(!this.ganttEvent.changedTask||!this.point||!this.svg)return;t.preventDefault(),this.point.x=t.clientX,this.point.y=t.clientY;const s=this.point.matrixTransform(null===(e=null===(i=this.svg)||void 0===i?void 0:i.getScreenCTM())||void 0===e?void 0:e.inverse()),{isChanged:o,changedTask:n}=h(s.x,this.ganttEvent.action,this.ganttEvent.changedTask,this.xStep,this.timeStep,this.initEventX1Delta,this.rtl,s.y);this.currentTarget&&(this.addGhostPreview(t),this.handleAutoScrollForPhaseDrag(t),this.addDropzoneVisualization()),o&&this.setGanttEvent(Object.assign(Object.assign({},this.ganttEvent),{action:this.ganttEvent.action,changedTask:n}))},i=async e=>{var s,o,n;clearInterval(this.dragScrollInterval),this.resetDropzoneVisualization();const{action:a,originalSelectedTask:r,changedTask:l}=this.ganttEvent;if(!(l&&this.point&&this.svg&&r))return;e.preventDefault(),this.point.x=e.clientX;const p=this.point.matrixTransform(null===(o=null===(s=this.svg)||void 0===s?void 0:s.getScreenCTM())||void 0===o?void 0:o.inverse());this.currentTarget=null;const{changedTask:f}=h(p.x,a,l,this.xStep,this.timeStep,this.initEventX1Delta,this.rtl,p.y),c=r.start!==f.start||r.end!==f.end||r.progress!==f.progress||r.y!==f.y;this.svg.removeEventListener("mousemove",t),this.svg.removeEventListener("mouseup",i),null===(n=this.svg.querySelector(".ghost-preview"))||void 0===n||n.remove(),this.setGanttEvent({action:""}),this.isMoving=!1;let d,u,g=!0;if("move"===a&&c&&"task"===f.type&&(d=this.tasks.find((t=>this.isPhaseWithinTaskArea(l,t)&&"project"===t.type)),u=this.tasks.find((t=>t.id==r.id.split("_").shift()))),(null==d?void 0:d.id)&&(null==u?void 0:u.id)!==(null==d?void 0:d.id))this.phaseDrop(r,u,f,d);else if(("move"===a||"end"===a||"start"===a)&&this.dateChange&&c)try{const t=await this.dateChange(f,f.barChildren);void 0!==t&&(g=t)}catch(t){g=!1}else if(this.progressChange&&c)try{const t=this.progressChange(f,f.barChildren);void 0!==t&&(g=t)}catch(t){g=!1}g||this.setFailedTask(r)};this.isMoving||"move"!==this.ganttEvent.action&&"end"!==this.ganttEvent.action&&"start"!==this.ganttEvent.action&&"progress"!==this.ganttEvent.action||!this.svg||(this.svg.addEventListener("mousemove",t),this.svg.addEventListener("mouseup",i),this.isMoving=!0)}hasMovedHorizontally(t){return!this.readOnly&&this.initEventXClick!==t.clientX}addGhostPreview(t){var i;null===(i=this.svg.querySelector(".ghost-preview"))||void 0===i||i.remove();const e=Object.assign(Object.assign({},t),{dataTransfer:new DataTransfer}),s=this.currentTarget;s.classList.add("ghost-preview"),this.svg.appendChild(s.cloneNode(!0));const o=s.getBoundingClientRect();e.dataTransfer.setDragImage(s,e.clientX-o.left,e.clientY-o.top)}handleAutoScrollForPhaseDrag(t){var i,e;const s=null===(e=null===(i=this.svg)||void 0===i?void 0:i.parentElement)||void 0===e?void 0:e.parentElement;if(s)if(clearInterval(this.dragScrollInterval),s.clientHeight<s.scrollHeight){const i=s.getBoundingClientRect(),e=t.clientY-i.top,o=5;e-20<o?this.dragScrollInterval=setInterval((()=>{this.phaseDragScroll(s.scrollTop-=o)}),1):e+20>i.height-o&&(this.dragScrollInterval=setInterval((()=>{this.phaseDragScroll(s.scrollTop+=o)}),1))}else{const i=20,e=window.innerHeight,s=t.clientY;s<i?window.scrollBy(0,-i):s>e-i&&window.scrollBy(0,i)}}isPhaseWithinTaskArea(t,i){return t.y+t.height>=i.ySecondary&&t.y<=i.ySecondary+i.height&&t.x2>=i.x1&&t.x1<=i.x2}addDropzoneVisualization(){var t;this.resetDropzoneVisualization();const i=this.tasks.filter((t=>{var i,e,s;return"project"==t.type&&(null===(s=null===(e=null===(i=this.ganttEvent.originalSelectedTask)||void 0===i?void 0:i.id)||void 0===e?void 0:e.split("_"))||void 0===s?void 0:s.shift())!=t.id})),e=this.ganttEvent.changedTask;this.dropZoneTask=i.find((t=>this.isPhaseWithinTaskArea(e,t))),(null===(t=this.dropZoneTask)||void 0===t?void 0:t.ySecondary)&&this.getBarRectsForDropzoneVisualization().forEach((t=>{t.setAttribute("fill",u.barDropZoneColor)}))}resetDropzoneVisualization(){if(!this.dropZoneTask)return;const t=this.getBarRectsForDropzoneVisualization(),i=!!this.selectedTask&&this.dropZoneTask.id===this.selectedTask.id;t.forEach((t=>{t.setAttribute("fill",this.getBarColor(i,this.dropZoneTask.styles))}))}getBarRectsForDropzoneVisualization(){let t;if(this.showSecondaryDates){const i=this.svg.querySelector(`.barWrapper[data-type="${this.dropZoneTask.type}"] rect[y='${this.dropZoneTask.ySecondary}']`),e=[i];let s=i.nextElementSibling;for(;null!==s;)e.push(s),s=s.nextElementSibling;let o=i.previousElementSibling;for(;null!==o;)e.unshift(o),o=o.previousElementSibling;t=e}else t=this.svg.querySelectorAll(`.barWrapper[data-type="${this.dropZoneTask.type}"] rect[y='${this.dropZoneTask.ySecondary}']`);return t}handleBarEventStart(t,i,e){var s;if(e)if(a(e)){if("delete"===t&&this.delete)try{const e=this.delete(i);void 0!==e&&e&&this.setGanttEvent({action:t,changedTask:i})}catch(t){console.error("Error on Delete. "+t)}}else if("mouseenter"===t)this.ganttEvent.action||this.setGanttEvent({action:t,changedTask:i,originalSelectedTask:i});else if("mouseleave"===t)"mouseenter"===this.ganttEvent.action&&this.setGanttEvent({action:""});else if("dblclick"===t)this.doubleClick&&this.doubleClick(i);else if("click"===t)!this.hasMovedHorizontally(e)&&this.barClick&&this.barClick(i);else if("contextmenu"===t)e.preventDefault(),this.barContextMenu&&this.barContextMenu(e,i);else if("move"===t){if(!this.svg||!this.point)return;this.point.x=e.clientX;const o=this.point.matrixTransform(null===(s=this.svg.getScreenCTM())||void 0===s?void 0:s.inverse());this.currentTarget="task"===i.type?e.currentTarget.cloneNode(!0):null,this.initEventX1Delta=o.x-i.x1,this.point.y=e.clientY,this.initEventXClick=e.clientX,this.setGanttEvent({action:t,changedTask:i,originalSelectedTask:i})}else this.setGanttEvent({action:t,changedTask:i,originalSelectedTask:i});else"select"===t&&this.setSelectedTask(i.id)}getTaskIcon(t){const e=z.exports.hexToCSSFilter(t.color);return i("image",{href:t.url,filter:e.filter.replace(";",""),x:t.x,y:t.y,width:t.width,height:t.height})}renderKupBar(t,e,s,o){var n,a,r;return i("g",{class:"barWrapper","tab-index":0,"data-type":t.type},this.renderKupBarDisplay(t.x1,t.y,t.x2-t.x1,t.height,t.progressX,t.progressWidth,t.barCornerRadius,t.styles,e,!this.readOnly&&!!this.dateChange&&!t.isDisabled,t,t.x1secondary,(null!==(n=t.x2secondary)&&void 0!==n?n:0)-(null!==(a=t.x1secondary)&&void 0!==a?a:0),t.ySecondary),i("g",{class:"handleGroup"},s&&i("g",null,this.renderKupBarDateHandle(t.x1+1,t.y+1,t.handleWidth,t.height-2,t.barCornerRadius,t,"start"),this.renderKupBarDateHandle(t.x2-t.handleWidth-1,t.y+1,t.handleWidth,t.height-2,t.barCornerRadius,t,"end")),o&&i("polygon",{class:"barHandle",points:this.calculateProgressPoint(t),onMouseDown:i=>{this.handleBarEventStart("progress",t,i)}})),t.icon&&t.icon.url&&this.getTaskIcon({color:null!==(r=t.icon.color)&&void 0!==r?r:"#000000",url:t.icon.url,width:t.height/2+"px",height:t.height/2+"px",x:t.x1+(t.x2-t.x1)-t.height/2/2,y:t.y-t.height/2/2/2+(this.showSecondaryDates?t.height/2:0)}))}renderKupBarDisplay(t,e,s,o,n,a,r,h,l,p,f,c,d,u){if(this.showSecondaryDates&&void 0!==c){const g=o/2;return i("g",{onMouseDown:t=>p&&this.handleBarEventStart("move",f,t)},i("rect",{key:"top semi-transparent bar",x:c,width:d,y:null!=u?u:e,height:g,ry:r,rx:r,fill:this.getBarColor(l,h),opacity:.5,class:"barBackground"}),i("rect",{key:"main bar",x:t,width:s,y:e+g,height:g,ry:r,rx:r,fill:this.getBarColor(l,h),class:"barBackground"}),i("rect",{key:"progress bar",x:n,width:a,y:e+g,height:g,ry:r,rx:r,fill:this.getProcessColor(l,h)}))}return i("g",{onMouseDown:t=>{p&&this.handleBarEventStart("move",f,t)}},i("rect",{x:t,width:s,y:e,height:o,ry:r,rx:r,fill:this.getBarColor(l,h),class:"barBackground"}),i("rect",{x:n,width:a,y:e,height:o,ry:r,rx:r,fill:this.getProcessColor(l,h)}))}renderKupBarDateHandle(t,e,s,o,n,a,r){return i("rect",{x:t,y:e,width:s,height:o,class:"barHandle",ry:n,rx:n,onMouseDown:t=>this.handleBarEventStart(r,a,t)})}renderKupBarSmall(t,e,s,o){return i("g",{class:"barWrapper","tab-index":0},this.renderKupBarDisplay(t.x1,t.y,t.x2-t.x1,t.height,t.progressX,t.progressWidth,t.barCornerRadius,t.styles,e,s,t),i("g",{class:"handleGroup"},o&&i("polygon",{class:"barHandle",points:this.calculateProgressPoint(t,"small"),onMouseDown:i=>{this.handleBarEventStart("progress",t,i)}})))}renderKupBarTimeLine(t,s){return i("g",{"tab-index":0},i("rect",{fill:s,x:"0",width:"100%",y:t.y,height:t.height,rx:0,ry:0}),t.barChildren.map((t=>{var s;return i(e,null,i("rect",{style:{cursor:"pointer"},key:t.id,fill:t.styles.backgroundColor,x:t.x1,width:t.x2-t.x1,y:t.y,height:t.height,rx:t.barCornerRadius,ry:t.barCornerRadius}),t.icon&&t.icon.url&&this.getTaskIcon({color:null!==(s=t.icon.color)&&void 0!==s?s:"#000000",url:t.icon.url,width:t.height+"px",height:t.height+"px",x:t.x1+(t.x2-t.x1)-t.height/2,y:t.y-t.height/2/2}))})))}renderKupArrow(t,e){const[s,o]=this.rtl?this.drownPathAndTriangleRTL(t,this.tasks[e.index],this.rowHeight,this.taskHeight,this.arrowIndent):this.drownPathAndTriangle(t,this.tasks[e.index],this.rowHeight,this.taskHeight,this.arrowIndent);return i("g",{class:"arrow"},i("path",{"stroke-width":"1.5",d:s,fill:"none"}),i("polygon",{points:o}))}renderDependencies(){var t,e,s;if(!this.dependencies||0===this.dependencies.length)return null;const o=new Map;for(const t of this.tasks)o.set(t.id,t);const n=new Map;for(const i of this.dependencies){const e=`${i.sourceId}__${i.targetId}`,s=null!==(t=n.get(e))&&void 0!==t?t:[];s.push(i),n.set(e,s)}const a=new Map;for(const t of n.keys()){const[,i]=t.split("__"),s=null!==(e=a.get(i))&&void 0!==e?e:[];s.push(t),a.set(i,s)}const r=[],h=new Map;for(const[t,i]of a.entries()){if(1===i.length)continue;const t=i.length;for(let e=0;e<i.length;e++)h.set(i[e],24*(e-(t-1)/2))}for(const[t,e]of n.entries()){const[n,a]=t.split("__");let l=o.get(n)||this.tasks.find((t=>t.id&&t.id.trim()===(n+"").trim())),p=o.get(a)||this.tasks.find((t=>t.id&&t.id.trim()===(a+"").trim()));if(!p&&l){const t=`${l.id}_${a}`,i=`${l.id}_${(a+"").trim()}`;p=o.get(t)||o.get(i)||this.tasks.find((e=>e.id&&(e.id===t||e.id===i||e.id.trim()===i.trim())))}if(!l||!p){const t=(n+"").trim(),i=(a+"").trim();l||(l=this.tasks.find((i=>i.id&&i.id.trim()===t))),p||(p=this.tasks.find((t=>t.id&&t.id.trim()===i)));try{if(l||(l=this.tasks.find((t=>{var i;return t.taskRowId==n||(null===(i=t.taskRow)||void 0===i?void 0:i.id)==n||t.phaseRowId==n}))),!p){const t=i.split("_");if(t.length>1){const i=t[0],e=t.slice(1).join("_");p=this.tasks.find((t=>{var s;return t.taskRowId==i&&t.id&&t.id.endsWith("_"+e)||(null===(s=t.taskRow)||void 0===s?void 0:s.id)==i&&t.id&&t.id.endsWith("_"+e)}))}p||(p=this.tasks.find((t=>{var i;return t.taskRowId==a||(null===(i=t.taskRow)||void 0===i?void 0:i.id)==a||t.phaseRowId==a})))}}catch(t){}}if(!l||!p)continue;const f=e.length,c=null!==(s=h.get(t))&&void 0!==s?s:0;e.forEach(((t,e)=>{const s=c+8*(e-(f-1)/2),o=Object.assign({},l),n=Object.assign({},p);o.y=l.y+s,n.y=p.y+s;const[a,h]=this.rtl?this.drownPathAndTriangleRTL(o,n,this.rowHeight,this.taskHeight,this.arrowIndent):this.drownPathAndTriangle(o,n,this.rowHeight,this.taskHeight,this.arrowIndent),d=l&&l.styles&&l.styles.backgroundColor||this.arrowColor||"#9e9e9e";r.push(i("g",{class:"arrow dependency","data-dep-id":t.id},i("path",{stroke:d,"stroke-width":"2",d:a,fill:"none"}),i("polygon",{points:h,fill:d,stroke:d})))}))}return r}drownPathAndTriangle(t,i,e,s,o){const n=i.y+s/2,a=t.x2+2*o;return[`M ${t.x2} ${t.y+s/2}\n h ${o}\n v ${(t.index>i.index?-1:1)*e/2}\n ${a<i.x1?"":"H "+(i.x1-o)}\n V ${n}\n h ${a>i.x1?o:i.x1-t.x2-o}`,`${i.x1},${n}\n ${i.x1-5},${n-5}\n ${i.x1-5},${n+5}`]}drownPathAndTriangleRTL(t,i,e,s,o){const n=i.y+s/2,a=t.x1-2*o;return[`M ${t.x1} ${t.y+s/2}\n h ${-o}\n v ${(t.index>i.index?-1:1)*e/2}\n ${a>i.x2?"":`H ${i.x2+o}`}\n V ${n}\n h ${a<i.x2?-o:i.x2-t.x1+o}`,`${i.x2},${n}\n ${i.x2+5},${n+5}\n ${i.x2+5},${n-5}`]}getBarColor(t,i){return t?i.backgroundSelectedColor:i.backgroundColor}getProcessColor(t,i){return t?i.progressSelectedColor:i.progressColor}calculateProgressPoint(t,i="bar"){return r("bar"==i?+!this.rtl*t.progressWidth+t.progressX:t.progressWidth+t.x1,t.y,t.height)}render(){let t=0;const e=[],s=[i("line",{key:"RowLineFirst",x1:0,y1:0,x2:this.gridProps.svgWidth,y2:0,class:"gridRowLine"})];for(const o of this.tasks)e.push(i("rect",{key:"Row"+o.id,x:0,y:t,width:this.gridProps.svgWidth,height:this.rowHeight,class:"gridRow"})),s.push(i("line",{key:"RowLine"+o.id,x1:0,y1:t+this.rowHeight,x2:this.gridProps.svgWidth,y2:t+this.rowHeight,class:"gridRowLine"})),t+=this.rowHeight;let o=0;const n=[];for(let e=0;e<this.dates.length;e++)n.push(i("line",{key:this.dates[e].getTime(),x1:o,y1:0,x2:o,y2:t,class:"gridTick"})),o+=this.columnWidth;return i("svg",{key:"22b83f3b4155e51f56ff19c43e1e935e5b17bf46",xmlns:"http://www.w3.org/2000/svg",width:this.gridProps.svgWidth,height:this.rowHeight*this.tasks.length+"px","font-family":this.fontFamily,ref:t=>this.svg=t},i("g",{key:"0dc7cb819de38e2defa4e676a3bdf0d9272d681e",class:"grid"},i("g",{key:"ec2bcc141732416498c70f20ab7f0ddba112ceeb",class:"rows"},e),i("g",{key:"b73233f161cb1fe8289a37e5ab3354d7c8b4e1b3",class:"rowLines"},s),i("g",{key:"03770a3bebf0d3ba72e4a03b78765a2270cb6b00",class:"ticks"},n)),i("g",{key:"49cc1fec67c34cef6c35ffb78b0485d7a28b021d",class:"content"},this.currentDateIndicator&&i("rect",{key:"7fc33e726bf3e02336148501d70909093f596946",fill:this.currentDateIndicator.color,x:this.currentDateIndicator.x+1.5,y:"0",width:"2",height:"100%"}),this.projection&&i("rect",{key:"c4cb014710c018b196829c84963d10f4e1456dde",fill:this.projection.color,x:this.projection.x0,y:"0",width:this.projection.xf-this.projection.x0,height:"100%","fill-opacity":"0.35"}),i("g",{key:"5afa927eb4fb8442c95651d0945ae10249ad962e",class:"arrows",fill:this.arrowColor,stroke:this.arrowColor},this.renderDependencies(),this.tasks.map((t=>t.barChildren.map((i=>"timeline"!==t.type?this.renderKupArrow(t,i):null))))),i("g",{key:"44f3505a327201ebd848dad424b36f9f2efabcde",class:"bar","font-family":this.fontFamily,"font-size":this.fontSize},this.tasks.map((t=>{const e="project"===t.type;return i("g",{onKeyDown:i=>{"Delete"===i.key&&(t.isDisabled||this.handleBarEventStart("delete",t,i)),i.stopPropagation()},onMouseEnter:i=>{this.handleBarEventStart("mouseenter",t,i)},onMouseLeave:i=>{this.handleBarEventStart("mouseleave",t,i)},onDblClick:()=>{this.barDblClick(t)},onClick:i=>{this.handleBarEventStart("click",t,i)},onContextMenu:i=>{this.handleBarEventStart("contextmenu",t,i)},onFocus:()=>{this.handleBarEventStart("select",t)},class:"task-wrapper"},(()=>{const i={task:t,arrowIndent:this.arrowIndent,isDelete:!t.isDisabled,taskHeight:this.taskHeight,isSelected:!!this.selectedTask&&t.id===this.selectedTask.id,rtl:this.rtl,hideLabel:this.hideLabel},s=t.styles,o=i.isSelected?s.backgroundSelectedColor:s.backgroundColor,n=!(this.readOnly||!this.dateChange||t.isDisabled||e),a=!this.readOnly&&!!this.progressChange&&!t.isDisabled,r=!this.readOnly&&!!this.dateChange&&!t.isDisabled;switch(t.typeInternal){case"project":default:return this.renderKupBar(t,i.isSelected,n,a);case"smalltask":return this.renderKupBarSmall(t,i.isSelected,r,a);case"timeline":return this.renderKupBarTimeLine(t,o)}})())})),this.currentTarget&&this.ganttEvent.changedTask&&i("g",{key:"91675894e3ba24a00fa9ef59e8c3af0dc03b3e4c",class:"task-wrapper"},this.renderKupBar(this.ganttEvent.changedTask,!1,!1,!1)))))}static get watchers(){return{columnWidth:["updateXStep"],dates:["updateXStep"],timeStep:["updateXStep","updateSvgMove"],ganttEvent:["updateSvgMove"],xStep:["updateSvgMove"],svg:["updateSvgMove"],initEventX1Delta:["updateSvgMove"],point:["updateSvgMove"],rtl:["updateSvgMove"],onProgressChange:["updateSvgMove"],onDateChange:["updateSvgMove"]}}};T.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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}.gridRow{fill:var(--kup-layer-1)}.gridRowLine{stroke:transparent}.gridTick{stroke:var(--kup-border-subtle)}.barHandle{fill:#ddd;cursor:ew-resize;opacity:0;visibility:hidden}.barBackground{user-select:none;stroke-width:0}.barWrapper{cursor:pointer;outline:none}.task-wrapper{outline:none !important}.barWrapper:hover .barHandle{visibility:visible;opacity:1}.barLabel{fill:var(--kup-layer-0);text-anchor:middle;font-weight:lighter;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.barLabelOutside{fill:var(--kup-text-secondary);text-anchor:start;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none}.ghost-preview{opacity:0.5}";export{g as kup_custom_task_list_header,v as kup_custom_task_list_table,x as kup_gantt_calendar,T as kup_grid_renderer}
@@ -182,6 +182,18 @@ export interface KupPlannerScheduleItem {
182
182
  startHour?: string;
183
183
  endHour?: string;
184
184
  }
185
+ /** Dependency between tasks */
186
+ export type KupPlannerDependencyType = 'FS' | 'SS' | 'FF' | 'SF';
187
+ export interface KupPlannerDependency {
188
+ /** optional unique id for the dependency */
189
+ id?: string;
190
+ /** source task id */
191
+ sourceId: string;
192
+ /** target task id */
193
+ targetId: string;
194
+ /** dependency type: Finish-Start, Start-Start, Finish-Finish, Start-Finish */
195
+ type?: KupPlannerDependencyType;
196
+ }
185
197
  export interface KupPlannerTask {
186
198
  id: string;
187
199
  type: KupPlannerTaskType;
@@ -281,6 +293,8 @@ export interface KupPlannerGanttPhaseProjection {
281
293
  export interface KupPlannerGanttProps extends KupPlannerEventOption, KupPlannerDisplayOption, KupPlannerStylingOption, KupPlannerCustomOptions {
282
294
  id: string;
283
295
  tasks: KupPlannerTask[];
296
+ /** Structured dependencies to render as arrows */
297
+ dependencies?: KupPlannerDependency[];
284
298
  projection?: KupPlannerGanttPhaseProjection;
285
299
  filter: HTMLElement;
286
300
  initialScrollX?: number;
@@ -432,6 +446,7 @@ export interface KupPlannerBarTask extends KupPlannerTask {
432
446
  }
433
447
  export type KupPlannerTaskTypeInternal = KupPlannerTaskType | 'smalltask';
434
448
  export type KupPlannerTaskGanttContentProps = {
449
+ dependencies: KupPlannerDependency[];
435
450
  tasks: KupPlannerBarTask[];
436
451
  dates: Date[];
437
452
  ganttEvent: KupPlannerGanttEvent;
@@ -600,6 +615,8 @@ export interface KupGanttPlannerProps {
600
615
  showSecondaryDates?: boolean;
601
616
  ganttHeight?: number;
602
617
  hideDependencies?: boolean;
618
+ /** Structured dependencies to render as arrows */
619
+ dependencies?: KupPlannerDependency[];
603
620
  title: string;
604
621
  filter: HTMLElement;
605
622
  initialScrollX?: number;
@@ -622,6 +639,8 @@ export interface KupGanttPlannerDetailsProps {
622
639
  hideLabel?: boolean;
623
640
  ganttHeight?: number;
624
641
  hideDependencies?: boolean;
642
+ /** Structured dependencies to render as arrows */
643
+ dependencies?: KupPlannerDependency[];
625
644
  title: string;
626
645
  filter: HTMLElement;
627
646
  initialScrollX?: number;
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import { GenericObject } from '../../types/GenericTypes';
3
- import { KupPlannerEventPayload, KupPlannerGanttTask, KupPlannerPhase, KupPlannerTaskAction, KupPlannerDetail, KupPlannerClickEventPayload, KupPlannerViewMode, KupPlannerUnloadEventPayload, KupPlannerGanttRow, PlannerProps } from './kup-planner-declarations';
3
+ import { KupPlannerEventPayload, KupPlannerGanttTask, KupPlannerPhase, KupPlannerTaskAction, KupPlannerDetail, KupPlannerClickEventPayload, KupPlannerViewMode, KupPlannerUnloadEventPayload, KupPlannerGanttRow, KupPlannerDependency, PlannerProps } from './kup-planner-declarations';
4
4
  import { KupDataDataset } from '../../managers/kup-data/kup-data-declarations';
5
5
  import { KupPlannerState } from './kup-planner-state';
6
6
  import { KupStore } from '../kup-state/kup-store';
@@ -112,6 +112,15 @@ export declare class KupPlanner {
112
112
  * @default null
113
113
  */
114
114
  phaseColorCol: string;
115
+ /**
116
+ * Optional column name inside the phases dataset containing a reference
117
+ * to a dependent phase (for example: 'OPEDIP'). When set, `addPhases`
118
+ * will read that column and create structured dependencies (FS) from the
119
+ * referenced phase to the current phase (source -> target).
120
+ * Multiple references can be separated by commas in the cell.
121
+ * @default undefined
122
+ */
123
+ dependencyCol: string;
115
124
  /**
116
125
  * Columns containing informations displayed in the left box ,near the gantt of phases
117
126
  * @default null
@@ -157,6 +166,8 @@ export declare class KupPlanner {
157
166
  * @default null
158
167
  */
159
168
  phasePrevDates: string[];
169
+ /** Structured dependencies to render as arrows */
170
+ dependencies: KupPlannerDependency[];
160
171
  /**
161
172
  * When true, the two gantts are not interactable.
162
173
  * @default false
@@ -1,4 +1,4 @@
1
- import { KupPlannerCurrentDateIndicator, KupPlannerGanttProps, KupPlannerTask, KupPlannerBarTask, KupPlannerDateSetup, KupPlannerGanttEvent, KupPlannerGanttTaskN, KupPlannerItemDetail, KupPlannerGanttRow, KupGanttPlannerProps } from '../../kup-planner-declarations';
1
+ import { KupGanttPlannerProps, KupPlannerBarTask, KupPlannerCurrentDateIndicator, KupPlannerDateSetup, KupPlannerDependency, KupPlannerGanttEvent, KupPlannerGanttProps, KupPlannerGanttRow, KupPlannerGanttTaskN, KupPlannerItemDetail, KupPlannerTask } from '../../kup-planner-declarations';
2
2
  export declare class KupGantt {
3
3
  ganttId: KupPlannerGanttProps['id'];
4
4
  tasks: KupPlannerGanttProps['tasks'];
@@ -40,6 +40,7 @@ export declare class KupGantt {
40
40
  hideLabel: KupPlannerGanttProps['hideLabel'];
41
41
  showSecondaryDates: KupPlannerGanttProps['showSecondaryDates'];
42
42
  hideDependencies: KupPlannerGanttProps['hideDependencies'];
43
+ dependencies: KupPlannerDependency[];
43
44
  projection: KupPlannerGanttProps['projection'];
44
45
  displayedStartDate: KupPlannerGanttProps['displayedStartDate'];
45
46
  displayedEndDate: KupPlannerGanttProps['displayedEndDate'];
@@ -1,4 +1,5 @@
1
1
  import { KupPlannerGanttContentMoveAction, KupPlannerGanttEvent, KupPlannerBarDateHandleProps, KupPlannerBarDisplayProps, KupPlannerBarTask, KupPlannerEventOption, KupPlannerTaskGanttContentProps, KupPlannerTaskGanttProps, KupPlannerTaskItemProps, KupPlannerTaskIconProps } from '../../kup-planner-declarations';
2
+ import { KupPlannerDependency } from '../../kup-planner-declarations';
2
3
  export declare class KupGridRenderer {
3
4
  tasks: KupPlannerTaskGanttContentProps['tasks'];
4
5
  dates: KupPlannerTaskGanttContentProps['dates'];
@@ -18,6 +19,7 @@ export declare class KupGridRenderer {
18
19
  currentDateIndicator?: KupPlannerTaskGanttContentProps['currentDateIndicator'];
19
20
  projection?: KupPlannerTaskGanttContentProps['projection'];
20
21
  readOnly: KupPlannerTaskGanttContentProps['readOnly'];
22
+ dependencies: KupPlannerDependency[];
21
23
  gridProps: KupPlannerTaskGanttProps['gridProps'];
22
24
  dateChange: KupPlannerEventOption['dateChange'];
23
25
  progressChange: KupPlannerEventOption['progressChange'];
@@ -61,6 +63,11 @@ export declare class KupGridRenderer {
61
63
  renderKupBarSmall(task: KupPlannerBarTask, isSelected: boolean, isDateMovable: boolean, isProgressChangeable: boolean): any;
62
64
  renderKupBarTimeLine(task: KupPlannerBarTask, col: string): any;
63
65
  renderKupArrow(task: KupPlannerBarTask, child: KupPlannerBarTask): any;
66
+ /**
67
+ * Render dependencies passed as structured data. Supports multiple dependencies
68
+ * between the same pair by offsetting paths.
69
+ */
70
+ renderDependencies(): any[];
64
71
  drownPathAndTriangle(taskFrom: KupPlannerBarTask, taskTo: KupPlannerBarTask, rowHeight: number, taskHeight: number, arrowIndent: number): string[];
65
72
  drownPathAndTriangleRTL(taskFrom: KupPlannerBarTask, taskTo: KupPlannerBarTask, rowHeight: number, taskHeight: number, arrowIndent: number): string[];
66
73
  getBarColor(isSelected: boolean, styles: KupPlannerBarTask['styles']): string;
@@ -29,7 +29,7 @@ import { KupChipChangeEventPayload, KupChipEventPayload, KupChipNode } from "./c
29
29
  import { FChipSize, FChipStyling, FChipType } from "./f-components/f-chip/f-chip-declarations";
30
30
  import { KupColorPickerEventPayload } from "./components/kup-color-picker/kup-color-picker-declarations";
31
31
  import { KupComboboxEventPayload, KupComboboxIconClickEventPayload } from "./components/kup-combobox/kup-combobox-declarations";
32
- import { KupGanttPlannerProps, KupPlannerBarDisplayProps, KupPlannerBarTask, KupPlannerCalendarProps, KupPlannerClickEventPayload, KupPlannerEventOption, KupPlannerEventPayload, KupPlannerGanttEvent, KupPlannerGanttProps, KupPlannerGanttRow, KupPlannerGanttTask, KupPlannerGanttTaskN, KupPlannerItemDetail, KupPlannerPhase, KupPlannerSwitcherProps, KupPlannerTask, KupPlannerTaskGanttContentProps, KupPlannerTaskGanttProps, KupPlannerTaskItemProps, KupPlannerTaskListProps, KupPlannerTaskType, KupPlannerUnloadEventPayload, KupPlannerViewMode, PlannerProps } from "./components/kup-planner/kup-planner-declarations";
32
+ import { KupGanttPlannerProps, KupPlannerBarDisplayProps, KupPlannerBarTask, KupPlannerCalendarProps, KupPlannerClickEventPayload, KupPlannerDependency, KupPlannerEventOption, KupPlannerEventPayload, KupPlannerGanttEvent, KupPlannerGanttProps, KupPlannerGanttRow, KupPlannerGanttTask, KupPlannerGanttTaskN, KupPlannerItemDetail, KupPlannerPhase, KupPlannerSwitcherProps, KupPlannerTask, KupPlannerTaskGanttContentProps, KupPlannerTaskGanttProps, KupPlannerTaskItemProps, KupPlannerTaskListProps, KupPlannerTaskType, KupPlannerUnloadEventPayload, KupPlannerViewMode, PlannerProps } from "./components/kup-planner/kup-planner-declarations";
33
33
  import { KupDashboardEventPayload, KupDataDashboard } from "./components/kup-dashboard/kup-dashboard-declarations";
34
34
  import { GenericFilter, KupGlobalFilterMode } from "./utils/filters/filters-declarations";
35
35
  import { KupDropEventPayload } from "./managers/kup-interact/kup-interact-declarations";
@@ -90,7 +90,7 @@ export { KupChipChangeEventPayload, KupChipEventPayload, KupChipNode } from "./c
90
90
  export { FChipSize, FChipStyling, FChipType } from "./f-components/f-chip/f-chip-declarations";
91
91
  export { KupColorPickerEventPayload } from "./components/kup-color-picker/kup-color-picker-declarations";
92
92
  export { KupComboboxEventPayload, KupComboboxIconClickEventPayload } from "./components/kup-combobox/kup-combobox-declarations";
93
- export { KupGanttPlannerProps, KupPlannerBarDisplayProps, KupPlannerBarTask, KupPlannerCalendarProps, KupPlannerClickEventPayload, KupPlannerEventOption, KupPlannerEventPayload, KupPlannerGanttEvent, KupPlannerGanttProps, KupPlannerGanttRow, KupPlannerGanttTask, KupPlannerGanttTaskN, KupPlannerItemDetail, KupPlannerPhase, KupPlannerSwitcherProps, KupPlannerTask, KupPlannerTaskGanttContentProps, KupPlannerTaskGanttProps, KupPlannerTaskItemProps, KupPlannerTaskListProps, KupPlannerTaskType, KupPlannerUnloadEventPayload, KupPlannerViewMode, PlannerProps } from "./components/kup-planner/kup-planner-declarations";
93
+ export { KupGanttPlannerProps, KupPlannerBarDisplayProps, KupPlannerBarTask, KupPlannerCalendarProps, KupPlannerClickEventPayload, KupPlannerDependency, KupPlannerEventOption, KupPlannerEventPayload, KupPlannerGanttEvent, KupPlannerGanttProps, KupPlannerGanttRow, KupPlannerGanttTask, KupPlannerGanttTaskN, KupPlannerItemDetail, KupPlannerPhase, KupPlannerSwitcherProps, KupPlannerTask, KupPlannerTaskGanttContentProps, KupPlannerTaskGanttProps, KupPlannerTaskItemProps, KupPlannerTaskListProps, KupPlannerTaskType, KupPlannerUnloadEventPayload, KupPlannerViewMode, PlannerProps } from "./components/kup-planner/kup-planner-declarations";
94
94
  export { KupDashboardEventPayload, KupDataDashboard } from "./components/kup-dashboard/kup-dashboard-declarations";
95
95
  export { GenericFilter, KupGlobalFilterMode } from "./utils/filters/filters-declarations";
96
96
  export { KupDropEventPayload } from "./managers/kup-interact/kup-interact-declarations";
@@ -2455,6 +2455,7 @@ export namespace Components {
2455
2455
  "dateChange": KupPlannerGanttProps['dateChange'];
2456
2456
  "dateTimeFormatters": KupPlannerGanttProps['dateTimeFormatters'];
2457
2457
  "delete": KupPlannerGanttProps['delete'];
2458
+ "dependencies": KupPlannerDependency[];
2458
2459
  "displayedEndDate": KupPlannerGanttProps['displayedEndDate'];
2459
2460
  "displayedStartDate": KupPlannerGanttProps['displayedStartDate'];
2460
2461
  "doubleClick": KupPlannerGanttProps['doubleClick'];
@@ -2670,6 +2671,7 @@ export namespace Components {
2670
2671
  "dateChange": KupPlannerEventOption['dateChange'];
2671
2672
  "dates": KupPlannerTaskGanttContentProps['dates'];
2672
2673
  "delete": KupPlannerEventOption['delete'];
2674
+ "dependencies": KupPlannerDependency[];
2673
2675
  "doubleClick": KupPlannerEventOption['doubleClick'];
2674
2676
  "eMouseDown": KupPlannerBarDisplayProps['onMouseDown'];
2675
2677
  "eventStart": KupPlannerTaskItemProps['onEventStart'];
@@ -3334,6 +3336,15 @@ export namespace Components {
3334
3336
  * @default null
3335
3337
  */
3336
3338
  "data": KupDataDataset;
3339
+ /**
3340
+ * Structured dependencies to render as arrows
3341
+ */
3342
+ "dependencies": KupPlannerDependency[];
3343
+ /**
3344
+ * Optional column name inside the phases dataset containing a reference to a dependent phase (for example: 'OPEDIP'). When set, `addPhases` will read that column and create structured dependencies (FS) from the referenced phase to the current phase (source -> target). Multiple references can be separated by commas in the cell.
3345
+ * @default undefined
3346
+ */
3347
+ "dependencyCol": string;
3337
3348
  /**
3338
3349
  * Column containing the detail color, in hex format
3339
3350
  * @default null
@@ -8108,6 +8119,7 @@ declare namespace LocalJSX {
8108
8119
  "dateChange"?: KupPlannerGanttProps['dateChange'];
8109
8120
  "dateTimeFormatters"?: KupPlannerGanttProps['dateTimeFormatters'];
8110
8121
  "delete"?: KupPlannerGanttProps['delete'];
8122
+ "dependencies"?: KupPlannerDependency[];
8111
8123
  "displayedEndDate"?: KupPlannerGanttProps['displayedEndDate'];
8112
8124
  "displayedStartDate"?: KupPlannerGanttProps['displayedStartDate'];
8113
8125
  "doubleClick"?: KupPlannerGanttProps['doubleClick'];
@@ -8289,6 +8301,7 @@ declare namespace LocalJSX {
8289
8301
  "dateChange"?: KupPlannerEventOption['dateChange'];
8290
8302
  "dates"?: KupPlannerTaskGanttContentProps['dates'];
8291
8303
  "delete"?: KupPlannerEventOption['delete'];
8304
+ "dependencies"?: KupPlannerDependency[];
8292
8305
  "doubleClick"?: KupPlannerEventOption['doubleClick'];
8293
8306
  "eMouseDown"?: KupPlannerBarDisplayProps['onMouseDown'];
8294
8307
  "eventStart"?: KupPlannerTaskItemProps['onEventStart'];
@@ -8770,6 +8783,15 @@ declare namespace LocalJSX {
8770
8783
  * @default null
8771
8784
  */
8772
8785
  "data"?: KupDataDataset;
8786
+ /**
8787
+ * Structured dependencies to render as arrows
8788
+ */
8789
+ "dependencies"?: KupPlannerDependency[];
8790
+ /**
8791
+ * Optional column name inside the phases dataset containing a reference to a dependent phase (for example: 'OPEDIP'). When set, `addPhases` will read that column and create structured dependencies (FS) from the referenced phase to the current phase (source -> target). Multiple references can be separated by commas in the cell.
8792
+ * @default undefined
8793
+ */
8794
+ "dependencyCol"?: string;
8773
8795
  /**
8774
8796
  * Column containing the detail color, in hex format
8775
8797
  * @default null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sme.up/ketchup",
3
- "version": "10.1.1",
3
+ "version": "10.1.5",
4
4
  "keywords": [
5
5
  "smeup",
6
6
  "KetchUP",
@@ -1 +0,0 @@
1
- function e(e){return void 0!==e.key}function r(e){const r=e.filter((e=>e.hideChildren&&"project"===e.type));if(r.length>0)for(let n=0;r.length>n;n++){const o=t(e,r[n]);e=e.filter((e=>-1===o.indexOf(e)))}return e}function t(e,r){let n=[];n=e.filter("project"!==r.type?e=>e.dependencies&&-1!==e.dependencies.indexOf(r.id):e=>e.project&&e.project===r.id);var o=[];return n.forEach((r=>{o.push(...t(e,r))})),n=n.concat(n,o),n}const n=(e,r)=>{const t=e.displayOrder||Number.MAX_VALUE,n=r.displayOrder||Number.MAX_VALUE;return t>n?1:t<n?-1:0},o=e=>Array.from({length:e},((e,r)=>r)),s=(e,r,t,n,o,s,l,c,d,i,u,b,h,g,p,x,v,f,C)=>{let k=e.map(((e,k)=>a(e,k,r,t,n,o,s,l,c,d,i,u,b,h,g,p,x,v,f,C)));return k=k.map((e=>{const r=e.dependencies||[];for(let t=0;t<r.length;t++){const n=k.findIndex((e=>e.id===r[t]));-1!==n&&k[n].barChildren.push(e)}return e})),k},a=(e,r,t,n,o,s,a,l,d,u,b,h,g,p,x,v,f,C,k,y)=>{let j;switch(e.type){case"timeline":j=i(e,r,t,n,o,l,d,u);break;case"project":j=c(e,r,t,n,o,a,d,u,b,v,f,C,k,y);break;default:j=c(e,r,t,n,o,s,d,u,b,h,g,p,x,y)}return j};function l(e,r,t,n,o,s,a,l,c){let d,i;a?(i=b(e,n,o,l),d=b(r,n,o,c)):(d=u(e,n,o,l),i=u(r,n,o,c));let h=t;return"task"===h&&i-d<2*s&&(h="smalltask",i=d+2*s),{x1:d,x2:i,typeInternal:h}}const c=(e,r,t,n,o,s,a,c,d,i,u,b,p,x)=>{const{x1:v,x2:f,typeInternal:C}=l(e.start,e.end,e.type,t,n,c,d,e.startHour,e.endHour),{x1:k,x2:y}=x&&e.secondaryStart&&e.secondaryEnd?l(e.secondaryStart,e.secondaryEnd,e.type,t,n,c,d,e.secondaryStartHour,e.secondaryEndHour):{x1:void 0,x2:void 0},[j,m]=g(v,f,e.progress,d),S=h(r,o,s),$="project"===e.type?e.hideChildren:void 0,w=Object.assign({backgroundColor:b,backgroundSelectedColor:p,progressColor:i,progressSelectedColor:u},e.styles);return Object.assign(Object.assign({},e),{typeInternal:C,x1:v,x2:f,x1secondary:k,x2secondary:y,y:S,index:r,progressX:m,progressWidth:j,barCornerRadius:a,handleWidth:c,hideChildren:$,height:s,barChildren:[],styles:w,ySecondary:S})},d=e=>{var r,t,n,o;return{backgroundColor:null!==(r=null==e?void 0:e.backgroundColor)&&void 0!==r?r:"#deadbeef",backgroundSelectedColor:null!==(t=null==e?void 0:e.backgroundSelectedColor)&&void 0!==t?t:"#cafebabe",progressColor:null!==(n=null==e?void 0:e.progressColor)&&void 0!==n?n:"#deadbeef",progressSelectedColor:null!==(o=null==e?void 0:e.progressSelectedColor)&&void 0!==o?o:"#cafebabe"}},i=(e,r,t,n,o,s,a,c)=>{var i;const u=h(r,o,s),{x1:b,x2:g}=l(e.start,e.end,e.type,t,n,c,!1),p=null===(i=e.timeline)||void 0===i?void 0:i.map((function(r,o){var a,d;const{x1:i,x2:b}=l(r.start,r.end,"task",t,n,c,!1),h=r.backgroundColor,g=null!==(a=r.backgroundSelectedColor)&&void 0!==a?a:h;return{barChildren:[],barCornerRadius:0,start:r.start,end:r.end,handleWidth:0,height:s,id:`Frame-${e.id}-${o}`,index:+r.start,name:"",valuesToShow:e.valuesToShow,progress:0,progressWidth:0,progressX:0,styles:{backgroundColor:h,backgroundSelectedColor:g,progressColor:h,progressSelectedColor:g},timeline:[],type:"task",typeInternal:"timeline",x1:i,x2:b,y:u,icon:null!==(d=r.icon)&&void 0!==d?d:void 0}}));return Object.assign(Object.assign({},e),{x1:b,x2:g,y:u,index:r,progressX:0,progressWidth:0,barCornerRadius:a,handleWidth:c,typeInternal:e.type,progress:0,height:s,hideChildren:void 0,barChildren:null!=p?p:[],styles:d(e.styles)})},u=(e,r,t,n)=>{if(n){const[r,t,o]=n.split(":").map(Number);e.setHours(null!=r?r:0),e.setMinutes(null!=t?t:0),e.setSeconds(null!=o?o:0)}const o=r.findIndex((r=>r.getTime()>=e.getTime()))-1;return o<0?0:o*t+(e.getTime()-r[o].getTime())/(r[o+1].getTime()-r[o].getTime())*t},b=(e,r,t,n)=>{let o=u(e,r,t,n);return o+=t,o},h=(e,r,t)=>e*r+(r-t)/2,g=(e,r,t,n)=>{const o=(r-e)*t*.01;let s;return s=n?r-o:e,[o,s]},p=(e,r,t)=>[e-5,r+t,e+5,r+t,e,r+t-8.66].join(","),x=(e,r,t,n,o)=>{let s=new Date((e-r)/n*o+t.getTime());return s=new Date(s.getTime()+6e4*(s.getTimezoneOffset()-t.getTimezoneOffset())),s},v=(e,r)=>{const t=e.getHours(),n=e.getMinutes(),o=e.getSeconds(),s=t<10?"0"+t:t,a=n<10?"0"+n:n;return r?`${s}:${a}:${o<10?"0"+o:o}`:`${s}:${a}`},f=e=>3===e.split(":").length,C=(e,r,t,n,o,s,a,l)=>k(e,r,t,n,o,s,a,l),k=(e,r,t,n,o,s,a,l)=>{const c=Object.assign({},t);let d=!1;switch(r){case"progress":if(c.progress=a?(i=e)>=(u=t).x2?0:i<=u.x1?100:Math.round(100*(u.x2-i)/(u.x2-u.x1)):((e,r)=>e>=r.x2?100:e<=r.x1?0:Math.round(100*(e-r.x1)/(r.x2-r.x1)))(e,t),d=c.progress!==t.progress,d){const[e,r]=g(c.x1,c.x2,c.progress,a);c.progressWidth=e,c.progressX=r}break;case"start":{const r=((e,r,t)=>{e>=t.x2-2*t.handleWidth&&(e=t.x2-2*t.handleWidth);const n=Math.round((e-t.x1)/r);return t.x1+n*r})(e,n,t);if(c.x1=r,d=c.x1!==t.x1,d){a?(c.end=x(r,t.x1,t.end,n,o),c.endHour&&(c.endHour=v(c.end,f(c.endHour)))):(c.start=x(r,t.x1,t.start,n,o),c.startHour&&(c.startHour=v(c.start,f(c.startHour))));const[e,s]=g(c.x1,c.x2,c.progress,a);c.progressWidth=e,c.progressX=s}break}case"end":{const r=((e,r,t)=>{e<=t.x1+2*t.handleWidth&&(e=t.x1+2*t.handleWidth);const n=Math.round((e-t.x2)/r);return t.x2+n*r})(e,n,t);if(c.x2=r,d=c.x2!==t.x2,d){a?(c.start=x(r,t.x2,t.start,n,o),c.startHour&&(c.startHour=v(c.start,f(c.startHour)))):(c.end=x(r,t.x2,t.end,n,o),c.endHour&&(c.endHour=v(c.end,f(c.endHour))));const[e,s]=g(c.x1,c.x2,c.progress,a);c.progressWidth=e,c.progressX=s}break}case"move":{const[r,i]=((e,r,t)=>{const n=Math.round((e-t.x1)/r),o=t.x1+n*r;return[o,o+t.x2-t.x1]})(e-s,n,t);if(d=r!==t.x1,d){c.start=x(r,t.x1,t.start,n,o),c.end=x(i,t.x2,t.end,n,o),c.startHour&&(c.startHour=v(c.start,f(c.startHour))),c.endHour&&(c.endHour=v(c.end,f(c.endHour))),c.x1=r,c.x2=i;const[e,s]=g(c.x1,c.x2,c.progress,a);c.progressWidth=e,c.progressX=s,"task"===c.type&&(c.y=l)}break}}var i,u;return{isChanged:d,changedTask:c}};function y(e,r){return u(new Date,e,r)}function j(e,r,t,n){return{x0:u(e,t,n),xf:u(r,t,n)}}export{y as a,j as b,s as c,o as d,p as g,C as h,e as i,r,n as s}
@@ -1 +0,0 @@
1
- import{r as t,h as i,f as e,d as a,F as s}from"./p-b0368f88.js";import{f as n,s as o,g as l,b as h}from"./p-0f9b546a.js";import{r as p,s as r,c as f,a as d,b as c}from"./p-008bdcdc.js";import{e as g}from"./p-cd3a7d53.js";import"./p-1ee561ba.js";const u=class{constructor(e){t(this,e),this.taskListTrueRef=null,this.ganttId=void 0,this.tasks=void 0,this.headerHeight=114,this.columnWidth=60,this.listCellWidth="300px",this.rowHeight=50,this.filter=void 0,this.ganttHeight=0,this.viewMode="month",this.preStepsCount=1,this.locale="en-GB",this.barFill=60,this.projectFill=80,this.timelineFill=40,this.barCornerRadius=3,this.barProgressColor="#a3a3ff",this.barProgressSelectedColor="#8282f5",this.barBackgroundColor="#b8c2cc",this.barBackgroundSelectedColor="#aeb8c2",this.projectProgressColor="#7db59a",this.projectProgressSelectedColor="#59a985",this.projectBackgroundColor="#fac465",this.projectBackgroundSelectedColor="#f7bb53",this.rtl=!1,this.handleWidth=8,this.timeStep=3e5,this.arrowColor="grey",this.fontFamily="Arial, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue",this.fontSize="14px",this.arrowIndent=20,this.todayColor="#ff0000",this.viewDate=void 0,this.TooltipContent=i("kup-standard-tooltip",null),this.TaskListHeader=i("kup-task-list-header",null),this.TaskListTable=i("kup-task-list-table",null),this.dateTimeFormatters=void 0,this.singleLineHeader=!1,this.hideLabel=!1,this.showSecondaryDates=!1,this.hideDependencies=!1,this.projection=void 0,this.displayedStartDate=void 0,this.displayedEndDate=void 0,this.initialScrollX=-1,this.initialScrollY=0,this.readOnly=void 0,this.currentTasks=[],this.label=void 0,this.doubleView=void 0,this.scrollableTaskList=void 0,this.setDoubleView=void 0,this.barContextMenu=void 0,this.scrollXChange=void 0,this.scrollYChange=void 0,this.barClick=void 0,this.barDblClick=void 0,this.dateChange=void 0,this.select=void 0,this.handleClick=void 0,this.handleDblClick=void 0,this.handleContextMenu=void 0,this.ganttOnClick=void 0,this.ganttOnDblClick=void 0,this.ganttonOnContextMenu=void 0,this.progressChange=void 0,this.doubleClick=void 0,this.delete=void 0,this.expanderClick=void 0,this.phaseDrop=void 0,this.wrapperRef=void 0,this.taskGanttRef=null,this.taskListRef=void 0,this.dateSetup=void 0,this.taskListWidth=0,this.svgContainerWidth=0,this.svgContainerHeight=this.ganttHeight,this.barTasks=[],this.ganttEvent={action:""},this.taskHeight=this.rowHeight*this.barFill/100,this.projectHeight=this.rowHeight*this.projectFill/100,this.timelineHeight=this.rowHeight*this.timelineFill/100,this.selectedTask=void 0,this.failedTask=null,this.svgWidth=void 0,this.ganttFullHeight=void 0,this.scrollX=0,this.scrollY=-1,this.ignoreScrollEvent=!1,this.currentDateIndicatorContent=void 0,this.projectionContent=void 0,this.taskListScrollWidth=void 0,this.taskListScrollX=0}componentWillLoad(){this.updateGanttData(),this.loadStates()}loadStates(){var t,i;this.scrollX=this.initialScrollX,this.scrollY=this.initialScrollY;const[e,a]=n(this.tasks,this.viewMode,this.preStepsCount,this.showSecondaryDates,this.displayedStartDate,this.displayedEndDate);this.dateSetup={viewMode:this.viewMode,dates:o(e,a,this.viewMode)},this.svgWidth=(null===(i=null===(t=this.dateSetup)||void 0===t?void 0:t.dates)||void 0===i?void 0:i.length)*this.columnWidth,this.ganttFullHeight=this.barTasks.length*this.rowHeight}componentDidRender(){this.taskGanttRef=this.rootElement.querySelector("kup-task-gantt").querySelector(".ganttVerticalContainer")}componentDidLoad(){this.updateScrollLeftAndScrollTop(),window.addEventListener("gantt-sync-scroll-event",this.onGanttSyncScrollEvent.bind(this))}async refresh(){e(this)}updateInitialScrollY(){this.scrollYChange&&this.scrollYChange(this.initialScrollY),this.scrollY=this.initialScrollY}updateInitialScrollX(){window.addEventListener("gantt-sync-scroll-event",(function(t){t.detail.id!==this.ganttId&&(this.scrollX=t.detail.scrollX,this.scrollXChange&&this.scrollXChange(t.detail.scrollX))}))}updateGanttData(){let t;t=this.expanderClick?p(this.tasks):this.tasks,t=t.sort(r);const[i,e]=n(t,this.viewMode,this.preStepsCount,this.showSecondaryDates,this.displayedStartDate,this.displayedEndDate);let a=o(i,e,this.viewMode);this.rtl&&(a=a.reverse(),-1===scrollX&&(this.scrollX=a.length*this.columnWidth));let s=!1;if(this.dateSetup&&this.dateSetup.dates){const t=this.dateSetup.dates;if(t.length!==a.length)s=!0;else for(let i=0;i<t.length;i++)if(t[i].valueOf()!==a[i].valueOf()){s=!0;break}}s&&(this.dateSetup={dates:a,viewMode:this.viewMode}),this.barTasks=f(t,a,this.columnWidth,this.rowHeight,this.taskHeight,this.projectHeight,this.timelineHeight,this.barCornerRadius,this.handleWidth,this.rtl,this.barProgressColor,this.barProgressSelectedColor,this.barBackgroundColor,this.barBackgroundSelectedColor,this.projectProgressColor,this.projectProgressSelectedColor,this.projectBackgroundColor,this.projectBackgroundSelectedColor,this.showSecondaryDates)}updateIgnoreScrollEvent(){if(this.viewMode===this.dateSetup.viewMode&&this.viewDate&&this.initialScrollX<1){const t=this.dateSetup.dates,i=t.findIndex(((i,e)=>this.viewDate.valueOf()>=i.valueOf()&&e+1!==t.length&&this.viewDate.valueOf()<t[e+1].valueOf()));if(-1===i)return;this.ignoreScrollEvent=!0,this.scrollX=this.columnWidth*i}}updateGanttEventAndBarTasks(){const{changedTask:t,action:i}=this.ganttEvent;if(t)if("delete"===i)this.ganttEvent={action:""},this.barTasks=this.barTasks.filter((i=>i.id!==t.id));else if("move"===i||"end"===i||"start"===i||"progress"===i){const i=this.barTasks.find((i=>i.id===t.id));if(i&&(i.start.getTime()!==t.start.getTime()||i.end.getTime()!==t.end.getTime()||i.progress!==t.progress)){const i=this.barTasks.map((i=>i.id===t.id?t:i));this.barTasks=i}}}updateFailedTasksAndBarChart(){this.failedTask&&(this.barTasks=this.barTasks.map((t=>t.id!==this.failedTask.id?t:this.failedTask)),this.failedTask=null)}updateTaskListWidth(){this.listCellWidth||(this.taskListWidth=0),this.taskListRef&&(this.taskListWidth=this.taskListRef.offsetWidth)}updateSvgContainerWidth(){this.wrapperRef&&(this.svgContainerWidth=this.wrapperRef.offsetWidth-this.taskListWidth)}updateSvgContainerHeight(){this.svgContainerHeight=this.ganttHeight?this.ganttHeight+this.headerHeight:this.tasks.length*this.rowHeight+this.headerHeight}handleWheel(t){if(this.wrapperRef&&"wheel"===(null==t?void 0:t.type)){if(t.shiftKey||t.deltaX){let i=this.scrollX+(t.deltaX?t.deltaX:t.deltaY);i<0?i=0:i>this.svgWidth&&(i=this.svgWidth),this.scrollX=i,window.dispatchEvent(new CustomEvent("gantt-sync-scroll-event",{detail:{componentId:this.ganttId,scrollX:i}})),t.preventDefault()}else if(this.ganttHeight){let i=this.scrollY+t.deltaY;i<0?i=0:i>Math.abs(this.ganttFullHeight-this.ganttHeight)&&(i=Math.abs(this.ganttFullHeight-this.ganttHeight)),i!==this.scrollY&&(this.scrollYChange&&this.scrollYChange(i),this.scrollY=i,t.preventDefault())}this.ignoreScrollEvent=!0}}updateCurrentDateIndicatorContent(){const t=d(this.dateSetup.dates,this.columnWidth);0!==t&&(this.currentDateIndicatorContent={color:this.todayColor,x:t})}updateProjectionContent(){if(this.projection){const{x0:t,xf:i}=c(this.projection.start,this.projection.end,this.dateSetup.dates,this.columnWidth);this.projectionContent={x0:t,xf:i,color:this.projection.color}}else this.projectionContent=void 0}updateSvgWidth(){var t,i;this.svgWidth=(null===(i=null===(t=this.dateSetup)||void 0===t?void 0:t.dates)||void 0===i?void 0:i.length)*this.columnWidth}updateGanttFullHeight(){this.ganttFullHeight=this.barTasks.length*this.rowHeight}onGanttSyncScrollEvent(t){t.detail.componentId!==this.ganttId&&(this.scrollX=t.detail.scrollX,this.scrollXChange&&this.scrollXChange(t.detail.scrollX))}updateScrollLeftAndScrollTop(){if(this.wrapperRef){const t=this.wrapperRef;t&&(-1!==this.scrollX&&setTimeout((()=>{t.scrollLeft=this.scrollX}),125),0!==this.scrollY&&setTimeout((()=>{t.scrollTop=this.scrollY}),125))}}handleScrollY(t){const i=t.currentTarget;this.scrollY!==i.scrollTop?this.ignoreScrollEvent?this.ignoreScrollEvent=!1:(this.scrollYChange&&this.scrollYChange(i.scrollTop),this.scrollY=i.scrollTop,this.ignoreScrollEvent=!0):this.ignoreScrollEvent=!1}handleScrollX(t){const i=t.currentTarget;this.scrollX===i.scrollLeft||this.ignoreScrollEvent?this.ignoreScrollEvent=!1:(this.scrollX=i.scrollLeft,this.ignoreScrollEvent=!0,window.dispatchEvent(new CustomEvent("gantt-sync-scroll-event",{detail:{componentId:this.ganttId,scrollX:i.scrollLeft}})))}handleKeyDown(t){if("INPUT"===t.target.tagName)return;t.preventDefault();let i=this.scrollY,e=this.scrollX,a=!0;switch(t.key){case"Down":case"ArrowDown":i+=this.rowHeight,a=!1;break;case"Up":case"ArrowUp":i-=this.rowHeight,a=!1;break;case"Left":case"ArrowLeft":e-=this.columnWidth;break;case"Right":case"ArrowRight":e+=this.columnWidth}a?(e<0?e=0:e>this.svgWidth&&(e=this.svgWidth),this.scrollX=e,window.dispatchEvent(new CustomEvent("gantt-sync-scroll-event",{detail:{componentId:this.ganttId,scrollX:e}}))):(i<0?i=0:i>this.ganttFullHeight-this.ganttHeight&&(i=this.ganttFullHeight-this.ganttHeight),this.scrollYChange&&this.scrollYChange(i),this.scrollY=i),this.ignoreScrollEvent=!0}handleSelectedTask(t){const i=this.barTasks.find((i=>i.id===t)),e=this.barTasks.find((t=>!!this.selectedTask&&t.id===this.selectedTask.id));this.select&&(e&&this.select(e,!1),i&&this.select(i,!0)),this.selectedTask=i}handleExpanderClick(t){this.expanderClick&&void 0!==t.hideChildren&&this.expanderClick(Object.assign(Object.assign({},t),{hideChildren:!t.hideChildren}))}handleTaskListScrollX(t){this.taskListScrollX=t.currentTarget.scrollLeft}handlePhaseDragScroll(t){this.scrollY=t}setFailedTask(t){this.failedTask=t}setGanttEvent(t){this.ganttEvent=t}render(){var t,e;const a={columnWidth:this.columnWidth,svgWidth:this.svgWidth,tasks:this.tasks,rowHeight:this.rowHeight,dates:null===(t=this.dateSetup)||void 0===t?void 0:t.dates,todayColor:this.todayColor,rtl:this.rtl},s={dateSetup:this.dateSetup,locale:this.locale,viewMode:this.viewMode,headerHeight:this.headerHeight,columnWidth:this.columnWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,rtl:this.rtl,dateTimeFormatters:this.dateTimeFormatters,singleLineHeader:this.singleLineHeader,currentDateIndicator:this.currentDateIndicatorContent},n={tasks:this.barTasks,dates:null===(e=this.dateSetup)||void 0===e?void 0:e.dates,ganttEvent:this.ganttEvent,selectedTask:this.selectedTask,rowHeight:this.rowHeight,taskHeight:this.taskHeight,columnWidth:this.columnWidth,arrowColor:this.hideDependencies?"transparent":this.arrowColor,timeStep:this.timeStep,fontFamily:this.fontFamily,fontSize:this.fontSize,arrowIndent:this.arrowIndent,svgWidth:this.svgWidth,rtl:this.rtl,hideLabel:this.hideLabel,showSecondaryDates:this.showSecondaryDates,ganttHeight:this.ganttHeight,currentDateIndicator:this.currentDateIndicatorContent,projection:this.projectionContent,readOnly:this.readOnly,setGanttEvent:this.setGanttEvent.bind(this),setFailedTask:this.setFailedTask.bind(this),setSelectedTask:this.handleSelectedTask.bind(this),dateChange:this.dateChange,progressChange:this.progressChange,doubleClick:this.doubleClick,barClick:this.barClick,barDblClick:this.barDblClick,barContextMenu:this.barContextMenu,delete:this.delete,phaseDrop:this.phaseDrop},o={rowHeight:this.rowHeight,rowWidth:this.listCellWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,tasks:this.barTasks,locale:this.locale,headerHeight:this.headerHeight,scrollY:this.scrollY,ganttHeight:this.ganttHeight,filter:this.filter,horizontalContainerClass:"horizontalContainer",selectedTask:this.selectedTask,taskListRef:this.taskListRef,setSelectedTask:this.handleSelectedTask.bind(this),expanderClick:this.handleExpanderClick.bind(this),TaskListHeader:this.TaskListHeader,TaskListTable:this.TaskListTable};return i("div",{key:"95eabbafe96bf8f67cfd5ed7d2b0598684cb23f3",class:"gannt-wrapper-main"},i("div",{key:"55889af9cb5503f797fe68ec210c68af1374acc5",class:"wrapper",onKeyDown:this.handleKeyDown.bind(this),tabIndex:0,ref:t=>this.wrapperRef=t},this.listCellWidth&&i("kup-task-list",Object.assign({key:"a4edfd9f6363f172bb31509ba37394b20cfdbd3d",currentTasks:this.currentTasks,handleClick:this.handleClick,handleDblClick:this.handleDblClick,handleContextMenu:this.handleContextMenu,ganttOnClick:this.ganttOnClick,ganttOnDblClick:this.ganttOnDblClick,ganttonOnContextMenu:this.ganttonOnContextMenu,label:this.label,doubleView:this.doubleView,setDoubleView:this.setDoubleView},o,{class:"tasks",scrollableTaskList:this.scrollableTaskList,updateTaskListScrollX:this.ignoreScrollEvent,ontaskListScrollWidth:t=>{this.taskListScrollWidth=t},taskListScrollX:this.taskListScrollX,ref:t=>this.taskListTrueRef=t})),i("kup-task-gantt",{key:"600b2af4dd6fd1dda0730f49d954282c898726ff",gridProps:a,calendarProps:s,barProps:n,ganttHeight:this.ganttHeight,taskGanttRef:this.taskGanttRef,scrollY:this.scrollY,scrollX:this.scrollX,phaseDragScroll:this.handlePhaseDragScroll.bind(this),class:"ganttContainer"}),this.ganttEvent.changedTask&&i("kup-tooltip",{key:"fa9b8855edcd4e95283cb65ec3429d3ec3756c18",arrowIndent:this.arrowIndent,rowHeight:this.rowHeight,svgContainerHeight:this.svgContainerHeight,svgContainerWidth:this.svgContainerWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,scrollX:this.scrollX,scrollY:this.scrollY,task:this.ganttEvent.changedTask,headerHeight:this.headerHeight,taskListWidth:this.taskListWidth,TooltipContent:this.TooltipContent,rtl:this.rtl,svgWidth:this.svgWidth}),i("kup-vertical-scroll",{key:"a8173cc05e5608dc797f01f314fa2ffdc21407f9",ganttFullHeight:this.ganttFullHeight,ganttHeight:this.ganttHeight,headerHeight:this.headerHeight,scrollNumber:this.scrollY,verticalScroll:this.handleScrollY.bind(this),rtl:this.rtl})),this.taskGanttRef&&i("kup-horizontal-scroll",{key:"0c50510e0abef51e326bc21a84b96520deac88c8",svgWidth:this.svgWidth,taskListTrueRef:this.taskListTrueRef,taskListWidth:this.taskListWidth,scrollNumber:this.scrollX,rtl:this.rtl,horizontalScroll:this.handleScrollX.bind(this),horizontalTaskListScroll:this.handleTaskListScrollX.bind(this),listCellWidth:this.listCellWidth,scrollableTaskList:this.scrollableTaskList,taskListScrollWidth:this.taskListScrollWidth,taskListScrollNumber:this.taskListScrollX}))}get rootElement(){return a(this)}static get watchers(){return{initialScrollY:["updateInitialScrollY"],scrollYChange:["updateInitialScrollY"],initialScrollX:["updateInitialScrollX","updateIgnoreScrollEvent"],scrollXChange:["updateInitialScrollX"],tasks:["updateGanttData","updateSvgContainerHeight"],viewMode:["updateGanttData","updateIgnoreScrollEvent"],preStepsCount:["updateGanttData"],rowHeight:["updateGanttData","updateSvgContainerHeight","updateGanttFullHeight"],barCornerRadius:["updateGanttData"],columnWidth:["updateGanttData","updateIgnoreScrollEvent","updateCurrentDateIndicatorContent","updateProjectionContent","updateSvgWidth"],taskHeight:["updateGanttData"],handleWidth:["updateGanttData"],barProgressColor:["updateGanttData"],barProgressSelectedColor:["updateGanttData"],barBackgroundColor:["updateGanttData"],barBackgroundSelectedColor:["updateGanttData"],projectProgressColor:["updateGanttData"],projectProgressSelectedColor:["updateGanttData"],projectBackgroundColor:["updateGanttData"],projectBackgroundSelectedColor:["updateGanttData"],milestoneBackgroundColor:["updateGanttData"],milestoneBackgroundSelectedColor:["updateGanttData"],rtl:["updateGanttData","handleWheel"],scrollX:["updateGanttData","handleWheel"],onExpanderClick:["updateGanttData"],showSecondaryDates:["updateGanttData"],projectHeight:["updateGanttData"],timelineHeight:["updateGanttData"],displayedStartDate:["updateGanttData"],displayedEndDate:["updateGanttData"],dateSetup:["updateGanttData","updateIgnoreScrollEvent","updateCurrentDateIndicatorContent","updateProjectionContent","updateSvgWidth"],viewDate:["updateIgnoreScrollEvent"],ganttEvent:["updateGanttEventAndBarTasks"],failedTask:["updateFailedTasksAndBarChart"],barTasks:["updateFailedTasksAndBarChart","updateGanttFullHeight"],taskListRef:["updateTaskListWidth"],listCellWidth:["updateTaskListWidth"],wrapperRef:["updateSvgContainerWidth","handleWheel"],ganttHeight:["updateSvgContainerHeight","handleWheel"],headerHeight:["updateSvgContainerHeight"],scrollY:["handleWheel"],svgWidth:["handleWheel"],ganttFullHeight:["handleWheel"],todayColor:["updateCurrentDateIndicatorContent"],projection:["updateProjectionContent"]}}};u.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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}.wrapper{display:flex;padding:0;margin:0;list-style:none;outline:none;position:relative}.ganttContainer{background:var(--kup-layer-2);border-radius:var(--kup-radius-00);overflow:hidden;padding:var(--kup-space-05)}.ganttVerticalContainer{overflow:hidden;font-size:0;margin:0;padding:0}.horizontalContainer{margin:0;padding:0;overflow:hidden}.horizontalContainerScrollable{overflow:auto !important;scrollbar-width:0}.horizontalContainerScrollable::-webkit-scrollbar{width:0;height:0}.task-gantt{overflow:hidden}";const k=class{constructor(i){t(this,i),this.scrollNumber=void 0,this.svgWidth=void 0,this.taskListTrueRef=void 0,this.rtl=void 0,this.taskListWidth=void 0,this.scrollableTaskList=!1,this.listCellWidth="300px",this.taskListScrollWidth=void 0,this.taskListScrollNumber=void 0,this.horizontalScroll=void 0,this.horizontalTaskListScroll=void 0,this.timeoutId=void 0}componentDidLoad(){this.scrollLeft()}scrollLeft(){clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>{this.setScrollLeft()}),50)}listScrollLeft(){clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>{this.setTaskListScrollLeft()}),50)}setScrollLeft(){if(this.rootElement){const t=this.rootElement.shadowRoot.querySelector("div"),i=2==t.children.length?t.children[1]:t.children[0];i&&(i.scrollLeft=this.scrollNumber)}}setTaskListScrollLeft(){if(this.rootElement){const t=this.rootElement.shadowRoot.querySelector("div"),i=2==t.children.length?t.children[0]:null;i&&(i.scrollLeft=this.taskListScrollNumber)}}render(){var t,e;const a=null!==(e=(null===(t=this.taskListTrueRef)||void 0===t?void 0:t.getBoundingClientRect().width)+36)&&void 0!==e?e:0,n=+this.listCellWidth.replace("px","");return i(s,{key:"ca3d1fe732a277b9f3dc43d86a84c5aa93df0e72"},i("div",{key:"c98ca3f706cf107db5f4879bc46bff26d0ce5dc9",class:"scroll-container"},this.scrollableTaskList&&this.taskListScrollWidth>n&&i("div",{key:"0e632172e23dde89eb29591ef8646bd242f15ace",dir:"ltr",style:{margin:"0px 20px 0px 20px",maxWidth:`${n+20}px`,minWidth:`${n+20}px`},class:"scrollWrapper","data-scrollx":"true",onScroll:this.horizontalTaskListScroll},i("div",{key:"a9df5067fa02c4a9ab0d8c5590e1713eb0fc37e5",style:{width:`${this.taskListScrollWidth}px`},class:"scroll"})),i("div",{key:"6cc995b3db68dc093e56adee9cd0ad33fce395e6",dir:"ltr",style:{margin:this.rtl?`0px ${this.scrollableTaskList&&this.taskListScrollWidth>n?40:a}px 0px 12px`:`0px 12px 0px ${this.scrollableTaskList&&this.taskListScrollWidth>n?40:a}px`},class:"scrollWrapper","data-scrollx":"true",onScroll:this.horizontalScroll},i("div",{key:"82b584c4a5067b9baf639da7b00e58141a9291c0",style:{width:`${this.svgWidth}px`},class:"scroll"}))))}get rootElement(){return a(this)}static get watchers(){return{scrollNumber:["scrollLeft"],taskListScrollNumber:["listScrollLeft"]}}};k.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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}.scrollWrapper{overflow:auto;max-width:100%;height:1.2rem}.scrollWrapper::-webkit-scrollbar{width:1.1rem;height:1.1rem}.scrollWrapper::-webkit-scrollbar-corner{background:transparent}.scrollWrapper::-webkit-scrollbar-thumb{border:6px solid transparent;background:rgba(0, 0, 0, 0.2);background:var(--palette-black-alpha-20, rgba(0, 0, 0, 0.2));border-radius:10px;background-clip:padding-box}.scrollWrapper::-webkit-scrollbar-thumb:hover{border:4px solid transparent;background:rgba(0, 0, 0, 0.3);background:var(--palette-black-alpha-30, rgba(0, 0, 0, 0.3));background-clip:padding-box}.scroll{height:1px}.scroll-container{display:flex}";const m=class{constructor(i){t(this,i),this.task=void 0,this.fontSize=void 0,this.fontFamily=void 0}render(){return i("div",{key:"6287db4c48d7fd271020d43d397738dac4f2e4cb",class:"tooltipDefaultContainer",style:{fontSize:this.fontSize,fontFamily:this.fontFamily}},i("b",{key:"2386c5ea9dc9c9f0be8f0ba9c79524f370959e09",style:{fontSize:`${parseInt(this.fontSize)+6}px`}},`${this.task.name}: ${this.task.start.getDate()}-${this.task.start.getMonth()+1}-${this.task.start.getFullYear()} - ${this.task.end.getDate()}-${this.task.end.getMonth()+1}-${this.task.end.getFullYear()}`),this.task.end.getTime()-this.task.start.getTime()!=0&&i("p",{key:"947237a72ccf0774a714ae99dd26be2c46ca3242",class:"tooltipDefaultContainerParagraph"},`Duration: ${~~((this.task.end.getTime()-this.task.start.getTime())/864e5)} day(s)`),i("p",{key:"2a4fcefdda08c5da8a8ce516932de1c0c31bfce1",class:"tooltipDefaultContainerParagraph"},!!this.task.progress&&`Progress: ${this.task.progress} %`))}};m.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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}.tooltipDefaultContainer{background:#fff;padding:12px;box-shadow:0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23)}.tooltipDefaultContainerParagraph{font-size:12px;margin-bottom:6px;color:#666}.tooltipDetailsContainer{position:absolute;display:flex;flex-shrink:0;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tooltipDetailsContainerHidden{visibility:hidden;position:absolute;display:flex;pointer-events:none}";const x=class{constructor(i){t(this,i),this.buttonLabels=["hour","day","week","month","year"],this.timeUnitChange=void 0,this.activeButton="day"}render(){const t=t=>{this.activeButton=t,this.timeUnitChange(t)};return i("div",{key:"5cc85e24e46b86b5b91679b9f67c5f984eff8db8",class:"switcher"},this.buttonLabels.map((e=>i("button",{type:"button",class:{button:!0,buttonActive:this.activeButton===e},onClick:()=>t(e)},i("span",{class:"label"},e.charAt(0).toUpperCase()+e.slice(1))))))}};x.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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}.switcher{display:grid;grid-auto-flow:column;grid-gap:8px;width:max-content;margin-bottom:var(--kup-space-05);margin-left:var(--kup-space-04)}.button{background-color:var(--kup-gray-color-70);border:none;text-align:left;box-sizing:border-box;color:var(--kup-gray-color-0);cursor:pointer;padding:var(--kup-space-03) var(--kup-space-05)}.button:hover{background-color:var(--kup-text-primary)}.button:focus{background-color:var(--kup-primary-color-60)}.label{text-decoration:none;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}.buttonActive{background-color:var(--kup-primary-color-60)}";const y=class{constructor(i){t(this,i),this.gridProps=void 0,this.calendarProps=void 0,this.barProps=void 0,this.taskGanttRef=void 0,this.ganttHeight=void 0,this.scrollY=void 0,this.scrollX=void 0,this.phaseDragScroll=void 0}updateScrollX(){setTimeout((()=>{this.verticalGanttContainerRef&&(this.verticalGanttContainerRef.scrollLeft=this.scrollX)}),30)}updateScrollY(){setTimeout((()=>{this.horizontalContainerRef&&(this.horizontalContainerRef.scrollTop=this.scrollY)}),30)}componentDidLoad(){setTimeout((()=>{this.updateScrollX(),this.updateScrollY()}),75)}render(){const t=Object.assign(Object.assign({},this.barProps),{gridProps:this.gridProps,phaseDragScroll:this.phaseDragScroll});return i("div",{key:"e9b7f7f147fae5077c4b17232661030262170a76",class:"ganttVerticalContainer",ref:t=>this.verticalGanttContainerRef=t,dir:"ltr"},i("kup-gantt-calendar",{key:"6575335f2a55573ad95089af45dc3dbf4292f37c",dateSetup:this.calendarProps.dateSetup,locale:this.calendarProps.locale,rtl:this.calendarProps.rtl,headerHeight:this.calendarProps.headerHeight,columnWidth:this.calendarProps.columnWidth,fontFamily:this.calendarProps.fontFamily,fontSize:this.calendarProps.fontSize,dateTimeFormatters:this.calendarProps.dateTimeFormatters,singleLineHeader:this.calendarProps.singleLineHeader,currentDateIndicator:this.calendarProps.currentDateIndicator,svgWidth:this.gridProps.svgWidth}),i("div",{key:"ec7b2e3f28ada7ac48c92686888b2b17898e2252",ref:t=>this.horizontalContainerRef=t,class:"horizontalContainer",style:this.ganttHeight?{height:`${this.ganttHeight}px`,width:`${this.gridProps.svgWidth}px`}:{width:`${this.gridProps.svgWidth}px`}},i("kup-grid-renderer",Object.assign({key:"98ed84972a106b35ea7ba6a380d83e025a635ebd"},t))))}get rootElement(){return a(this)}static get watchers(){return{scrollX:["updateScrollX"],verticalGanttContainerRef:["updateScrollX"],scrollY:["updateScrollY"],horizontalContainerRef:["updateScrollY"]}}},v=class{constructor(i){t(this,i),this.headerHeight=void 0,this.fontFamily=void 0,this.fontSize=void 0,this.rowWidth=void 0,this.rowHeight=void 0,this.scrollY=void 0,this.locale=void 0,this.tasks=void 0,this.selectedTask=void 0,this.horizontalContainerClass=void 0,this.ganttHeight=void 0,this.filter=void 0,this.TaskListHeader=void 0,this.TaskListTable=void 0,this.currentTasks=void 0,this.label=void 0,this.doubleView=void 0,this.scrollableTaskList=void 0,this.updateTaskListScrollX=!1,this.taskListScrollX=void 0,this.setDoubleView=void 0,this.handleClick=void 0,this.handleDblClick=void 0,this.handleContextMenu=void 0,this.ganttOnClick=void 0,this.ganttOnDblClick=void 0,this.ganttonOnContextMenu=void 0,this.setSelectedTask=void 0,this.expanderClick=void 0,this.ontaskListScrollWidth=void 0,this.selectedTaskId=""}componentDidLoad(){this.taskListRef.prepend(this.filter),setTimeout((()=>{this.horizontalContainerRef&&(this.horizontalContainerRef.scrollTop=this.scrollY)}),75)}componentDidUpdate(){this.taskListRef&&(this.taskListRef.scrollTop=this.scrollY)}updateScrollY(){this.horizontalContainerRef&&(this.horizontalContainerRef.scrollTop=this.scrollY)}render(){var t;const e={headerHeight:this.headerHeight,fontFamily:this.fontFamily,fontSize:this.fontSize,rowWidth:this.rowWidth};this.selectedTask&&(this.selectedTaskId=this.selectedTask.id);const a={rowHeight:this.rowHeight,rowWidth:this.rowWidth,fontFamily:this.fontFamily,fontSize:this.fontSize,tasks:this.tasks,locale:this.locale,selectedTaskId:this.selectedTaskId,scrollableTaskList:this.scrollableTaskList,setSelectedTask:this.setSelectedTask.bind(this),onExpanderClick:this.expanderClick},s=this.TaskListHeader;s&&s.t&&Object.assign(s.t,Object.assign({},e));const n=this.TaskListTable;return n&&n.t&&Object.assign(n.t,Object.assign({},a)),i("div",{key:"e670f41d88f4d30d48c053d42159d310f7b9cb74",ref:t=>this.taskListRef=t},s&&s.t?s:i("kup-custom-task-list-header",Object.assign({label:this.label,doubleView:null!==(t=this.doubleView)&&void 0!==t&&t,setDoubleView:this.setDoubleView},e)),i("div",{key:"9ff43bddb1ba9732aef292d9fff4be9ee31c5632",class:`${this.horizontalContainerClass} ${this.scrollableTaskList?"horizontalContainerScrollable":""}`,style:this.ganttHeight?{height:this.ganttHeight+"px"}:{},ref:t=>this.horizontalContainerRef=t},n&&n.t?n:i("kup-custom-task-list-table",Object.assign({},a,{onclickTaskList:t=>{let i=h(t,this.currentTasks);i||(i=l(t,this.currentTasks)),i&&this.handleClick(i,this.ganttOnClick)},ondblclickTaskList:t=>{let i=h(t,this.currentTasks);i||(i=l(t,this.currentTasks)),i&&this.handleDblClick(i,this.ganttOnDblClick)},oncontextmenuTaskList:(t,i)=>{let e=h(i,this.currentTasks);e||(e=l(i,this.currentTasks)),e&&this.handleContextMenu(t,e,this.ganttonOnContextMenu)},ontaskListScrollWidth:t=>{this.ontaskListScrollWidth(t)},taskListScrollX:this.taskListScrollX,ganttId:g}))))}get element(){return a(this)}static get watchers(){return{scrollY:["updateScrollY"]}}};v.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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}.tasks{background:var(--kup-layer-2);border-radius:var(--kup-radius-00);padding:var(--kup-space-05);margin-right:var(--kup-space-05)}.taskListWrapper{display:table;border-bottom:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}.taskListTableRow{display:table-row;text-overflow:ellipsis}.taskListCell{display:table-cell;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.taskListNameWrapper{display:flex}.taskListExpander{color:rgb(86, 86, 86);font-size:0.6rem;padding:0.15rem 0.2rem 0 0.2rem;user-select:none;cursor:pointer}.taskListEmptyExpander{font-size:0.6rem;padding-left:1rem;user-select:none}.ganttTable{display:table;border-bottom:#e6e4e4 1px solid;border-top:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}.ganttTable_Header{display:table-row;list-style:none}.ganttTable_HeaderSeparator{border-right:1px solid rgb(196, 196, 196);opacity:1;margin-left:-2px}.ganttTable_HeaderItem{display:table-cell;vertical-align:-webkit-baseline-middle;vertical-align:middle}";const b=class{constructor(i){t(this,i),this.headerHeight=void 0,this.fontFamily=void 0,this.fontSize=void 0,this.rowWidth=void 0}render(){return i("div",{key:"fd3487e4d62005b2c359c1991714df236aaaa921",class:"ganttTable",style:{fontFamily:this.fontFamily,fontSize:this.fontSize}},i("div",{key:"ed6688bc9971aaf1773a1e67c2fc6cd79f4081e5",class:"ganttTable_Header",style:{height:this.headerHeight-2+"px"}},i("div",{key:"1b89ba84a69c9f1d212b2ce5c9ef66bf4ea556aa",class:"ganttTable_HeaderItem",style:{minWidth:this.rowWidth}}," Name"),i("div",{key:"f864ee7ba94d82e842e81e1b9b468f77bd0c5b78",class:"ganttTable_HeaderSeparator",style:{height:.5*this.headerHeight+"px",marginTop:.2*this.headerHeight+"px"}}),i("div",{key:"44469e3888855776f90f479cdfc83d86fc491459",class:"ganttTable_HeaderItem",style:{minWidth:this.rowWidth}}," From"),i("div",{key:"736150b3b7f3f4c405499f3231c3ba46b2f9751b",class:"ganttTable_HeaderSeparator",style:{height:.5*this.headerHeight+"px",marginTop:.25*this.headerHeight+"px"}}),i("div",{key:"818e8bded850d9d4d3a05542ca76da760db3818b",class:"ganttTable_HeaderItem",style:{minWidth:this.rowWidth}}," To")))}};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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}.tasks{background:var(--kup-layer-2);border-radius:var(--kup-radius-00);padding:var(--kup-space-05);margin-right:var(--kup-space-05)}.taskListWrapper{display:table;border-bottom:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}.taskListTableRow{display:table-row;text-overflow:ellipsis}.taskListCell{display:table-cell;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.taskListNameWrapper{display:flex}.taskListExpander{color:rgb(86, 86, 86);font-size:0.6rem;padding:0.15rem 0.2rem 0 0.2rem;user-select:none;cursor:pointer}.taskListEmptyExpander{font-size:0.6rem;padding-left:1rem;user-select:none}.ganttTable{display:table;border-bottom:#e6e4e4 1px solid;border-top:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}.ganttTable_Header{display:table-row;list-style:none}.ganttTable_HeaderSeparator{border-right:1px solid rgb(196, 196, 196);opacity:1;margin-left:-2px}.ganttTable_HeaderItem{display:table-cell;vertical-align:-webkit-baseline-middle;vertical-align:middle}";const w=class{constructor(i){t(this,i),this.dateTimeOptions={weekday:"short",year:"numeric",month:"long",day:"numeric"},this.rowHeight=void 0,this.rowWidth=void 0,this.fontFamily=void 0,this.fontSize=void 0,this.locale=void 0,this.tasks=void 0,this.selectedTaskId=void 0,this.expandedTasks=new Set,this.setSelectedTask=void 0,this.expanderClick=void 0}toLocaleDateString(t){return t.toLocaleDateString(this.locale,this.dateTimeOptions)}render(){return i("div",{key:"334b1a46c1235d9cad733231eb00911d055bca21",class:"taskListWrapper",style:{fontFamily:this.fontFamily,fontSize:this.fontSize}},this.tasks.map((t=>i("div",{class:{taskListTableRow:!0,expanded:this.expandedTasks.has(t.id)},style:{height:`${this.rowHeight}px`},key:`${t.id}row`},i("div",{class:"taskListCell",style:{minWidth:this.rowWidth,maxWidth:this.rowWidth},title:t.name},i("div",{class:"taskListNameWrapper"},i("div",{class:{taskListExpander:!0,expanded:this.expandedTasks.has(t.id)},onClick:()=>this.expanderClick(t)},this.expandedTasks.has(t.id)?"▼":"▶"),i("div",null,t.name))),i("div",{class:"taskListCell",style:{minWidth:this.rowWidth,maxWidth:this.rowWidth}}," ",this.toLocaleDateString(t.start)),i("div",{class:"taskListCell",style:{minWidth:this.rowWidth,maxWidth:this.rowWidth}}," ",this.toLocaleDateString(t.end))))))}};w.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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}.tasks{background:var(--kup-layer-2);border-radius:var(--kup-radius-00);padding:var(--kup-space-05);margin-right:var(--kup-space-05)}.taskListWrapper{display:table;border-bottom:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}.taskListTableRow{display:table-row;text-overflow:ellipsis}.taskListCell{display:table-cell;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.taskListNameWrapper{display:flex}.taskListExpander{color:rgb(86, 86, 86);font-size:0.6rem;padding:0.15rem 0.2rem 0 0.2rem;user-select:none;cursor:pointer}.taskListEmptyExpander{font-size:0.6rem;padding-left:1rem;user-select:none}.ganttTable{display:table;border-bottom:#e6e4e4 1px solid;border-top:#e6e4e4 1px solid;border-left:#e6e4e4 1px solid}.ganttTable_Header{display:table-row;list-style:none}.ganttTable_HeaderSeparator{border-right:1px solid rgb(196, 196, 196);opacity:1;margin-left:-2px}.ganttTable_HeaderItem{display:table-cell;vertical-align:-webkit-baseline-middle;vertical-align:middle}";const z=class{constructor(i){t(this,i),this.task=void 0,this.rowHeight=void 0,this.rtl=void 0,this.svgContainerHeight=void 0,this.svgContainerWidth=void 0,this.scrollX=void 0,this.scrollY=void 0,this.arrowIndent=void 0,this.fontSize=void 0,this.fontFamily=void 0,this.headerHeight=void 0,this.taskListWidth=void 0,this.TooltipContent=void 0,this.svgWidth=void 0,this.relatedY=0,this.relatedX=0}componentWillLoad(){this.calculateTooltipPosition()}calculateTooltipPosition(){if(this.rootElement){const t=1.1*this.rootElement.offsetHeight,i=1.1*this.rootElement.offsetWidth;let e,a=this.task.index*this.rowHeight-this.scrollY+this.headerHeight;this.rtl?(e=this.task.x1-1.5*this.arrowIndent-i-this.scrollX,e<0&&(e=this.task.x2+1.5*this.arrowIndent-this.scrollX),i+e>this.svgContainerWidth&&(e=this.svgContainerWidth-i,a+=this.rowHeight)):(e=this.task.x2+1.5*this.arrowIndent+this.taskListWidth-this.scrollX,i+e>this.taskListWidth+this.svgContainerWidth&&(e=this.task.x1+this.taskListWidth-1.5*this.arrowIndent-this.scrollX-i),e<this.taskListWidth&&(e=this.svgContainerWidth+this.taskListWidth-i,a+=this.rowHeight)),t+a-this.scrollY>this.svgContainerHeight-this.scrollY&&(a=this.svgContainerHeight-t),this.relatedY=a,this.relatedX=e}}render(){return i("div",{key:"5a3f12cca0f8abc9cb87878314034b4326cf3efe",class:this.relatedX?"tooltipDetailsContainer":"tooltipDetailsContainerHidden",style:{left:`${this.relatedX}px`,top:`${this.relatedY}px`}},i(this.TooltipContent,{key:"b3c615e809ca951c28a264ff7089d24df4165379",task:this.task,fontSize:this.fontSize,fontFamily:this.fontFamily}))}get rootElement(){return a(this)}static get watchers(){return{task:["calculateTooltipPosition"],arrowIndent:["calculateTooltipPosition"],scrollX:["calculateTooltipPosition"],scrollY:["calculateTooltipPosition"],headerHeight:["calculateTooltipPosition"],taskListWidth:["calculateTooltipPosition"],rowHeight:["calculateTooltipPosition"],svgContainerHeight:["calculateTooltipPosition"],svgContainerWidth:["calculateTooltipPosition"],rtl:["calculateTooltipPosition"]}}};z.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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}.tooltipDefaultContainer{background:#fff;padding:12px;box-shadow:0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23)}.tooltipDefaultContainerParagraph{font-size:12px;margin-bottom:6px;color:#666}.tooltipDetailsContainer{position:absolute;display:flex;flex-shrink:0;pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tooltipDetailsContainerHidden{visibility:hidden;position:absolute;display:flex;pointer-events:none}";const S=class{constructor(i){t(this,i),this.scrollNumber=void 0,this.ganttHeight=void 0,this.ganttFullHeight=void 0,this.headerHeight=void 0,this.rtl=void 0,this.verticalScroll=void 0}componentDidLoad(){setTimeout((()=>{this.updateScroll()}),50)}updateScroll(){let t;if(this.scrollRef){const i=this.scrollRef;t=setTimeout((()=>{i.scrollTop=this.scrollNumber}),50)}return()=>{clearTimeout(t)}}render(){return i("div",{key:"6394eacedd25de6ebd3c06827ce5e506ea478ab8",style:{height:`${this.ganttHeight}px`,marginTop:`${this.headerHeight}px`,marginLeft:this.rtl?"":"-1rem"},class:"scroll",onScroll:this.verticalScroll,ref:t=>this.scrollRef=t},i("div",{key:"97bd98c885f4f0c8b5ff036bd95d087e82269e95",style:{height:`${this.ganttFullHeight}px`,width:"1px"}}))}get rootElement(){return a(this)}static get watchers(){return{scrollNumber:["updateScroll"]}}};S.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: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:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);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}.scroll{overflow:hidden auto;width:1rem;flex-shrink:0}.scroll::-webkit-scrollbar{width:1.1rem;height:1.1rem}.scroll::-webkit-scrollbar-corner{background:transparent}.scroll::-webkit-scrollbar-thumb{border:6px solid transparent;background:rgba(0, 0, 0, 0.2);background:var(--palette-black-alpha-20, rgba(0, 0, 0, 0.2));border-radius:10px;background-clip:padding-box}.scroll::-webkit-scrollbar-thumb:hover{border:4px solid transparent;background:rgba(0, 0, 0, 0.3);background:var(--palette-black-alpha-30, rgba(0, 0, 0, 0.3));background-clip:padding-box}";export{u as kup_gantt,k as kup_horizontal_scroll,m as kup_standard_tooltip,x as kup_switcher,y as kup_task_gantt,v as kup_task_list,b as kup_task_list_header,w as kup_task_list_table,z as kup_tooltip,S as kup_vertical_scroll}