@operato/gantt 8.0.0 → 9.0.0-beta.10

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 (37) hide show
  1. package/CHANGELOG.md +167 -9
  2. package/dist/src/draw-time-scale-header.d.ts +1 -1
  3. package/dist/src/draw-time-scale-header.js.map +1 -1
  4. package/dist/src/gantt-chart-controller.d.ts +7 -8
  5. package/dist/src/gantt-chart-controller.js +96 -33
  6. package/dist/src/gantt-chart-controller.js.map +1 -1
  7. package/dist/src/ox-gantt-chart.d.ts +378 -3
  8. package/dist/src/ox-gantt-chart.js +97 -186
  9. package/dist/src/ox-gantt-chart.js.map +1 -1
  10. package/dist/src/ox-gantt-resize-splitter.d.ts +6 -2
  11. package/dist/src/ox-gantt-resize-splitter.js +73 -44
  12. package/dist/src/ox-gantt-resize-splitter.js.map +1 -1
  13. package/dist/src/ox-gantt.js +84 -79
  14. package/dist/src/ox-gantt.js.map +1 -1
  15. package/dist/src/ox-resource-chart.d.ts +1 -1
  16. package/dist/src/ox-resource-chart.js +15 -9
  17. package/dist/src/ox-resource-chart.js.map +1 -1
  18. package/dist/src/ox-task-tooltip.d.ts +3 -1
  19. package/dist/src/ox-task-tooltip.js +43 -20
  20. package/dist/src/ox-task-tooltip.js.map +1 -1
  21. package/dist/src/resource-chart-controller.d.ts +1 -1
  22. package/dist/src/resource-chart-controller.js +14 -4
  23. package/dist/src/resource-chart-controller.js.map +1 -1
  24. package/dist/src/types.d.ts +1 -0
  25. package/dist/src/types.js.map +1 -1
  26. package/dist/src/utils.d.ts +1 -1
  27. package/dist/src/utils.js.map +1 -1
  28. package/dist/stories/ox-gantt-chart.stories.js +1 -1
  29. package/dist/stories/ox-gantt-chart.stories.js.map +1 -1
  30. package/dist/stories/ox-gantt.stories.js +38 -2
  31. package/dist/stories/ox-gantt.stories.js.map +1 -1
  32. package/dist/tsconfig.tsbuildinfo +1 -1
  33. package/package.json +15 -14
  34. package/assets/images/icon-editor-gradient-direction.png +0 -0
  35. package/assets/images/icon-properties-label.png +0 -0
  36. package/assets/images/icon-properties-line-type.png +0 -0
  37. package/assets/images/icon-properties-table.png +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"gantt-chart-controller.js","sourceRoot":"","sources":["../../src/gantt-chart-controller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AAGxB,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAEvF,MAAM,OAAO,oBAAoB;IAqB/B,YAAY,IAAyC,EAAE,QAAgB,EAAE,MAAc,EAAE,SAAoB;QAPtG,cAAS,GAAW,EAAE,CAAA;QAItB,UAAK,GAAW,EAAE,CAAA;QAClB,oBAAe,GAAY,KAAK,CAAA;QAGrC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAA;QAClC,IAAI,CAAC,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAAA;QAC9B,IAAI,CAAC,KAAK,GAAG,SAAS,CAAA;QACtB,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAA;QACnF,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;IAC/B,CAAC;IAED,aAAa;QACX,IAAI,CAAC,eAAe,EAAE,CAAA;IACxB,CAAC;IAED,gBAAgB,CAAC,aAAqC;QACpD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;IACpC,CAAC;IAED,IAAI,SAAS;QACX,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,IAAI,CAAC,UAAU,GAAG,EAAE;iBACjB,SAAS,EA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C,CAAA;IACtC,CAAC;IAED,uBAAuB,CAAC,KAAiB,EAAE,SAAyB;QAClE,KAAK,CAAC,eAAe,EAAE,CAAA;QAEvB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;QAC3C,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;QAE3C,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,UAAU,CAAA;QACxC,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,SAAS,CAAA;IACzC,CAAC;IAED,sBAAsB,CAAC,KAAiB,EAAE,SAAyB;QACjE,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;QAC9C,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;QAE9C,MAAM,MAAM,GAAG,IAAI,CAAC,WAAY,GAAG,aAAa,CAAA;QAChD,MAAM,MAAM,GAAG,IAAI,CAAC,WAAY,GAAG,aAAa,CAAA;QAEhD,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC,YAAa,GAAG,MAAM,CAAA;QAClD,SAAS,CAAC,SAAS,GAAG,IAAI,CAAC,YAAa,GAAG,MAAM,CAAA;QAEjD,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,QAAQ,EAAE;YAC5C,MAAM,EAAE;gBACN,UAAU,EAAE,SAAS,CAAC,UAAU;gBAChC,SAAS,EAAE,SAAS,CAAC,SAAS;aAC/B;YACD,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CAAA;QAEF,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAA;IACtC,CAAC;CACF","sourcesContent":["import { LitElement, ReactiveController, ReactiveControllerHost } from 'lit'\nimport * as d3 from 'd3'\nimport { TimeScale, Task, TaskTag } from './types'\nimport { OxTaskTooltip } from './ox-task-tooltip'\nimport { drawTimeScaleHeader, getScale, getChartWidth } from './draw-time-scale-header'\n\nexport class GanttChartController implements ReactiveController {\n private host: ReactiveControllerHost & LitElement\n private fromTime: Date\n private toTime: Date\n private totalDays: number\n private _timeScale?: d3.ScaleTime<number, number, never>\n\n private touchStartX?: number\n private touchStartY?: number\n private scrollStartX?: number\n private scrollStartY?: number\n\n private colorProvider?: (task: Task) => string\n\n public baseWidth: number = 30\n public level: TimeScale\n public selectedTaskId?: string\n\n public tasks: Task[] = []\n public extendGridLines: boolean = false\n\n constructor(host: ReactiveControllerHost & LitElement, fromDate: string, toDate: string, axisScale: TimeScale) {\n this.host = host\n this.fromTime = new Date(fromDate)\n this.toTime = new Date(toDate)\n this.level = axisScale\n this.totalDays = d3.timeDay.count(this.fromTime, d3.timeDay.offset(this.toTime, 1))\n this.host.addController(this)\n }\n\n hostConnected() {\n this.updateTimeScale()\n }\n\n setColorProvider(colorProvider: (task: Task) => string) {\n this.colorProvider = colorProvider\n }\n\n get timeScale() {\n if (!this._timeScale) {\n this._timeScale = d3\n .scaleTime()\n .domain([d3.timeDay.floor(this.fromTime), d3.timeDay.offset(this.toTime, 1)])\n .range([0, this.getChartWidth()])\n }\n return this._timeScale\n }\n\n updateRange(fromDate: string, toDate: string) {\n this.fromTime = new Date(fromDate)\n this.toTime = new Date(toDate)\n this.totalDays = d3.timeDay.count(this.fromTime, d3.timeDay.offset(this.toTime, 1))\n this._timeScale = undefined\n this.host.requestUpdate()\n }\n\n setTasks(tasks: Task[]) {\n this.tasks = tasks\n this.host.requestUpdate()\n }\n\n updateTimeScale() {\n this.timeScale.range([0, this.getChartWidth()])\n }\n\n getScale() {\n return getScale(this.level)\n }\n\n getChartWidth() {\n return getChartWidth(this.fromTime, this.toTime, this.baseWidth, this.level)\n }\n\n drawAxes(svgHeader: SVGElement) {\n drawTimeScaleHeader(svgHeader, this.timeScale, this.fromTime, this.toTime, this.baseWidth, this.level)\n }\n\n drawBody(svgBody: SVGElement, tooltip: OxTaskTooltip) {\n const body = d3.select(svgBody)\n\n body.selectAll('*').remove()\n body.attr('width', this.getChartWidth())\n\n // Define the arrow marker\n const defs = body.append('defs')\n defs\n .append('marker')\n .attr('id', 'arrow')\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 10) // Adjusted refX to move the arrow tip closer to the line's end\n .attr('refY', 5)\n .attr('markerWidth', 6)\n .attr('markerHeight', 6)\n .attr('orient', 'auto-start-reverse')\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z')\n .attr('fill', 'var(--md-sys-color-on-primary-container, black)')\n\n if (this.extendGridLines) {\n const addGridLines = (ticks: Date[]) => {\n ticks.forEach(tick => {\n const startX = this.timeScale(tick)\n body\n .append('line')\n .attr('x1', startX)\n .attr('x2', startX)\n .attr('y1', 0)\n .attr('y2', Number(svgBody.getBoundingClientRect().height) || 0)\n .attr('stroke', 'var(--ox-gantt-color-gridlines, var(--md-sys-color-outline))')\n .attr('stroke-width', 1)\n })\n }\n\n if (this.level === 'week-day') {\n const dayTicks = d3.timeDay.every(1)!.range(d3.timeDay.floor(this.fromTime), d3.timeDay.offset(this.toTime, 1))\n addGridLines(dayTicks)\n } else if (this.level === 'quarter-week') {\n const weekTicks = d3.timeWeek\n .every(1)!\n .range(d3.timeWeek.floor(this.fromTime), d3.timeWeek.offset(this.toTime, 1))\n addGridLines(weekTicks)\n } else if (this.level === 'year-month') {\n const monthTicks = d3.timeMonth\n .every(1)!\n .range(d3.timeMonth.floor(this.fromTime), d3.timeMonth.offset(this.toTime, 1))\n addGridLines(monthTicks)\n } else if (this.level === 'year-quarter') {\n const quarterTicks = d3.timeMonth\n .every(3)!\n .range(d3.timeMonth.floor(this.fromTime), d3.timeMonth.offset(this.toTime, 3))\n addGridLines(quarterTicks)\n }\n }\n\n const taskPositions: { [key: string]: { x: number; y: number; width: number } } = {}\n\n this.tasks.forEach((task, index) => {\n const startDate = new Date(task.startDate)\n const endDate = new Date(task.endDate)\n\n const startX = this.timeScale(d3.timeDay.floor(d3.min([startDate, endDate])!))\n const endX = this.timeScale(d3.timeDay.offset(d3.timeDay.ceil(d3.max([startDate, endDate])!), -1))\n\n const taskWidth = endX - startX + this.baseWidth / this.getScale()\n const taskY = index * 30 + 7.5\n\n const showTooltip = (event: MouseEvent) => {\n tooltip.title = task.title\n tooltip.startDate = startDate.toISOString().split('T')[0]\n tooltip.endDate = endDate.toISOString().split('T')[0]\n tooltip.progress = task.progress ?? 0\n tooltip.type = task.type\n\n tooltip.show(event.clientX, event.clientY)\n }\n\n const hideTooltip = () => {\n tooltip.hide()\n }\n\n if (this.selectedTaskId === task.id) {\n body\n .append('rect')\n .attr('x', 0)\n .attr('y', taskY - 7.5)\n .attr('width', this.getChartWidth())\n .attr('height', 30)\n .attr('fill', 'var(--ox-gantt-selected-row-background-color, var(--md-sys-color-surface-variant))')\n }\n\n const taskBar = body\n .append('rect')\n .attr('x', startX)\n .attr('y', taskY)\n .attr('width', taskWidth)\n .attr('height', 15)\n .attr('fill', this.colorProvider ? this.colorProvider(task) : 'gray')\n .attr('stroke', 'black')\n .attr('stroke-width', 1)\n\n taskBar\n .on('click', () => {\n this.selectedTaskId = task.id\n const customEvent = new CustomEvent('task-clicked', {\n detail: { taskId: task.id },\n bubbles: true,\n composed: true\n })\n this.host.dispatchEvent(customEvent)\n this.host.requestUpdate()\n })\n .on('mouseover', showTooltip)\n .on('mouseout', hideTooltip)\n\n if (task.progress !== undefined) {\n const progressWidth = taskWidth * (task.progress / 100)\n const progressBar = body\n .append('rect')\n .attr('x', startX)\n .attr('y', taskY + 7.5 - 3.75)\n .attr('width', progressWidth)\n .attr('height', 7.5)\n .attr('fill', 'lightgreen')\n\n progressBar\n .on('click', () => {\n this.selectedTaskId = task.id\n const customEvent = new CustomEvent('task-clicked', {\n detail: { taskId: task.id },\n bubbles: true,\n composed: true\n })\n this.host.dispatchEvent(customEvent)\n this.host.requestUpdate()\n })\n .on('mouseover', showTooltip)\n .on('mouseout', hideTooltip)\n }\n\n taskPositions[task.id] = { x: endX + this.baseWidth / this.getScale(), y: taskY + 7.5, width: taskWidth }\n })\n\n this.tasks.forEach(task => {\n if (task.dependsOn && taskPositions[task.dependsOn]) {\n const prevTask = taskPositions[task.dependsOn]\n const currTask = taskPositions[task.id]\n\n body\n .append('path')\n .attr(\n 'd',\n `\n M${prevTask.x},${prevTask.y}\n L${prevTask.x + 10},${prevTask.y}\n ${\n prevTask.x + 10 < currTask.x - 10 - currTask.width\n ? `\n L${(prevTask.x + currTask.x - currTask.width) / 2},${prevTask.y}\n L${(prevTask.x + currTask.x - currTask.width) / 2},${currTask.y}\n `\n : `\n L${prevTask.x + 10},${(prevTask.y + currTask.y) / 2}\n L${currTask.x - 10 - currTask.width},${(prevTask.y + currTask.y) / 2}\n `\n }\n L${currTask.x - 10 - currTask.width},${currTask.y}\n L${currTask.x - currTask.width},${currTask.y}\n `\n )\n .attr('stroke', 'var(--md-sys-color-on-primary-container, black)')\n .attr('fill', 'none')\n .attr('stroke-width', 1)\n .attr('marker-end', 'url(#arrow)') // Add arrow marker\n }\n })\n }\n\n getTaskColor(tags: TaskTag[]): string {\n if (tags.includes('critical')) {\n return 'red'\n } else if (tags.includes('milestone')) {\n return 'blue'\n } else if (tags.includes('done')) {\n return 'green'\n } else {\n return 'grey'\n }\n }\n\n handleWheelForBody(event: WheelEvent, container: HTMLDivElement) {\n event.preventDefault()\n event.stopPropagation()\n\n const deltaModeFactor =\n event.deltaMode === WheelEvent.DOM_DELTA_LINE\n ? 16\n : event.deltaMode === WheelEvent.DOM_DELTA_PAGE\n ? container.clientHeight\n : 1\n const deltaX = event.deltaX * deltaModeFactor\n const deltaY = event.deltaY * deltaModeFactor\n\n // 가로 스크롤 및 세로 스크롤 모두 처리\n container.scrollLeft += deltaX\n container.scrollTop += deltaY\n\n const customEvent = new CustomEvent('scroll', {\n detail: {\n scrollLeft: container.scrollLeft,\n scrollTop: container.scrollTop\n },\n bubbles: true,\n composed: true\n })\n\n this.host.dispatchEvent(customEvent)\n }\n\n handleTouchStartForBody(event: TouchEvent, container: HTMLDivElement) {\n event.stopPropagation()\n\n this.touchStartX = event.touches[0].clientX\n this.touchStartY = event.touches[0].clientY\n\n this.scrollStartX = container.scrollLeft\n this.scrollStartY = container.scrollTop\n }\n\n handleTouchMoveForBody(event: TouchEvent, container: HTMLDivElement) {\n const touchCurrentX = event.touches[0].clientX\n const touchCurrentY = event.touches[0].clientY\n\n const deltaX = this.touchStartX! - touchCurrentX\n const deltaY = this.touchStartY! - touchCurrentY\n\n container.scrollLeft = this.scrollStartX! + deltaX\n container.scrollTop = this.scrollStartY! + deltaY\n\n const customEvent = new CustomEvent('scroll', {\n detail: {\n scrollLeft: container.scrollLeft,\n scrollTop: container.scrollTop\n },\n bubbles: true,\n composed: true\n })\n\n this.host.dispatchEvent(customEvent)\n }\n}\n"]}
1
+ {"version":3,"file":"gantt-chart-controller.js","sourceRoot":"","sources":["../../src/gantt-chart-controller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AAGxB,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC1F,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAG/C,MAAM,OAAO,oBAAoB;IACvB,IAAI,CAA8C;IAClD,QAAQ,CAAM;IACd,MAAM,CAAM;IACZ,SAAS,CAAQ;IACjB,UAAU,CAAsC;IAEhD,aAAa,CAAyB;IAEvC,SAAS,GAAW,EAAE,CAAA;IACtB,KAAK,CAAW;IAChB,cAAc,CAAS;IAEvB,KAAK,GAAW,EAAE,CAAA;IAClB,eAAe,GAAY,KAAK,CAAA;IAEvC,YAAY,IAAyC,EAAE,QAAgB,EAAE,MAAc,EAAE,SAAoB;QAC3G,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,IAAI,CAAC,QAAQ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,EAAE;YAC5C,MAAM,EAAE;gBACN,UAAU,EAAE,SAAS,CAAC,UAAU;gBAChC,SAAS,EAAE,SAAS,CAAC,SAAS;aAC/B;YACD,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CAAA;QAEF,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;IACvC,CAAC,CAAA;CACF","sourcesContent":["import { LitElement, ReactiveController, ReactiveControllerHost } from 'lit'\nimport * as d3 from 'd3'\nimport { TimeScale, Task, TaskTag } from './types.js'\nimport { OxTaskTooltip } from './ox-task-tooltip.js'\nimport { drawTimeScaleHeader, getScale, getChartWidth } from './draw-time-scale-header.js'\nimport { levelDown, levelUp } from './utils.js'\nimport { GestureEventPinch, GestureEventDoubleTap, GestureEventDrag } from '@operato/utils/gesture-mixin.js'\n\nexport class GanttChartController implements ReactiveController {\n private host: (ReactiveControllerHost & LitElement) | null\n private fromTime: Date\n private toTime: Date\n private totalDays: number\n private _timeScale?: d3.ScaleTime<number, number, never>\n\n private colorProvider?: (task: Task) => string\n\n public baseWidth: number = 30\n public level: TimeScale\n public selectedTaskId?: string\n\n public tasks: Task[] = []\n public extendGridLines: boolean = false\n\n constructor(host: ReactiveControllerHost & LitElement, fromDate: string, toDate: string, axisScale: TimeScale) {\n this.host = host\n this.fromTime = new Date(fromDate)\n this.toTime = new Date(toDate)\n this.level = axisScale\n this.totalDays = d3.timeDay.count(this.fromTime, d3.timeDay.offset(this.toTime, 1))\n this.host.addController(this)\n }\n\n dispose() {\n this.host = null\n }\n\n hostConnected() {\n this.updateTimeScale()\n }\n\n setColorProvider(colorProvider: (task: Task) => string) {\n this.colorProvider = colorProvider\n }\n\n get timeScale() {\n if (!this._timeScale) {\n this._timeScale = d3\n .scaleTime()\n .domain([d3.timeDay.floor(this.fromTime), d3.timeDay.offset(this.toTime, 1)])\n .range([0, this.getChartWidth()])\n }\n return this._timeScale\n }\n\n updateRange(fromDate: string, toDate: string) {\n this.fromTime = new Date(fromDate)\n this.toTime = new Date(toDate)\n this.totalDays = d3.timeDay.count(this.fromTime, d3.timeDay.offset(this.toTime, 1))\n this._timeScale = undefined\n this.host?.requestUpdate()\n }\n\n setTasks(tasks: Task[]) {\n this.tasks = tasks\n this.host?.requestUpdate()\n }\n\n updateTimeScale() {\n this.timeScale.range([0, this.getChartWidth()])\n }\n\n getScale() {\n return getScale(this.level)\n }\n\n getChartWidth() {\n return getChartWidth(this.fromTime, this.toTime, this.baseWidth, this.level)\n }\n\n drawAxes(svgHeader: SVGElement) {\n drawTimeScaleHeader(svgHeader, this.timeScale, this.fromTime, this.toTime, this.baseWidth, this.level)\n }\n\n drawBody(svgBody: SVGElement, tooltip: OxTaskTooltip) {\n const body = d3.select(svgBody)\n\n body.selectAll('*').remove()\n body.attr('width', this.getChartWidth())\n\n // Define the arrow marker\n const defs = body.append('defs')\n defs\n .append('marker')\n .attr('id', 'arrow')\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 10)\n .attr('refY', 5)\n .attr('markerWidth', 6)\n .attr('markerHeight', 6)\n .attr('orient', 'auto-start-reverse')\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z')\n .attr('fill', 'var(--md-sys-color-on-primary-container, black)')\n\n if (this.extendGridLines) {\n const addGridLines = (ticks: Date[]) => {\n ticks.forEach(tick => {\n const startX = this.timeScale(tick)\n body\n .append('line')\n .attr('x1', startX)\n .attr('x2', startX)\n .attr('y1', 0)\n .attr('y2', Number(svgBody.getBoundingClientRect().height) || 0)\n .attr('stroke', 'var(--ox-gantt-color-gridlines, var(--md-sys-color-outline))')\n .attr('stroke-width', 1)\n })\n }\n\n if (this.level === 'week-day') {\n const dayTicks = d3.timeDay.every(1)!.range(d3.timeDay.floor(this.fromTime), d3.timeDay.offset(this.toTime, 1))\n addGridLines(dayTicks)\n } else if (this.level === 'quarter-week') {\n const weekTicks = d3.timeWeek\n .every(1)!\n .range(d3.timeWeek.floor(this.fromTime), d3.timeWeek.offset(this.toTime, 1))\n addGridLines(weekTicks)\n } else if (this.level === 'year-month') {\n const monthTicks = d3.timeMonth\n .every(1)!\n .range(d3.timeMonth.floor(this.fromTime), d3.timeMonth.offset(this.toTime, 1))\n addGridLines(monthTicks)\n } else if (this.level === 'year-quarter') {\n const quarterTicks = d3.timeMonth\n .every(3)!\n .range(d3.timeMonth.floor(this.fromTime), d3.timeMonth.offset(this.toTime, 3))\n addGridLines(quarterTicks)\n }\n }\n\n const taskPositions: { [key: string]: { x: number; y: number; width: number } } = {}\n\n this.tasks.forEach((task, index) => {\n const startDate = new Date(task.startDate)\n const endDate = new Date(task.endDate)\n\n const startX = this.timeScale(d3.timeDay.floor(d3.min([startDate, endDate])!))\n const endX = this.timeScale(d3.timeDay.offset(d3.timeDay.ceil(d3.max([startDate, endDate])!), -1))\n\n const taskWidth = endX - startX + this.baseWidth / this.getScale()\n const taskY = index * 30 + 7.5\n\n const showTooltip = (event: MouseEvent | TouchEvent) => {\n tooltip.hide()\n\n const touch = 'touches' in event\n const x = touch ? event.touches[0].clientX : event.clientX\n const y = touch ? event.touches[0].clientY : event.clientY\n\n tooltip.title = task.title\n tooltip.startDate = startDate.toISOString().split('T')[0]\n tooltip.endDate = endDate.toISOString().split('T')[0]\n tooltip.progress = task.progress ?? 0\n tooltip.type = task.type\n\n tooltip.show(x, y)\n }\n\n const hideTooltip = () => {\n tooltip.hide()\n }\n\n if (this.selectedTaskId === task.id) {\n body\n .append('rect')\n .attr('x', 0)\n .attr('y', taskY - 7.5)\n .attr('width', this.getChartWidth())\n .attr('height', 30)\n .attr('fill', 'var(--ox-gantt-selected-row-background-color, var(--md-sys-color-surface-variant))')\n }\n\n const taskBar = body\n .append('rect')\n .attr('x', startX)\n .attr('y', taskY)\n .attr('width', taskWidth)\n .attr('height', 15)\n .attr('fill', this.colorProvider ? this.colorProvider(task) : 'gray')\n .attr('stroke', 'black')\n .attr('stroke-width', 1)\n\n taskBar\n .on('click', e => {\n this.selectedTaskId = task.id\n const customEvent = new CustomEvent('task-clicked', {\n detail: { taskId: task.id },\n bubbles: true,\n composed: true\n })\n\n showTooltip(e)\n\n this.host?.dispatchEvent(customEvent)\n this.host?.requestUpdate()\n })\n .on('mouseover', showTooltip)\n .on('mouseout', hideTooltip)\n\n if (task.progress !== undefined) {\n const progressWidth = taskWidth * (task.progress / 100)\n const progressBar = body\n .append('rect')\n .attr('x', startX)\n .attr('y', taskY + 7.5 - 3.75)\n .attr('width', progressWidth)\n .attr('height', 7.5)\n .attr('fill', 'lightgreen')\n\n progressBar\n .on('click', e => {\n this.selectedTaskId = task.id\n const customEvent = new CustomEvent('task-clicked', {\n detail: { taskId: task.id },\n bubbles: true,\n composed: true\n })\n\n showTooltip(e)\n\n this.host?.dispatchEvent(customEvent)\n this.host?.requestUpdate()\n })\n .on('mouseover', showTooltip)\n .on('mouseout', hideTooltip)\n }\n\n taskPositions[task.id] = { x: endX + this.baseWidth / this.getScale(), y: taskY + 7.5, width: taskWidth }\n })\n\n this.tasks.forEach(task => {\n if (task.dependsOn && taskPositions[task.dependsOn]) {\n const prevTask = taskPositions[task.dependsOn]\n const currTask = taskPositions[task.id]\n\n body\n .append('path')\n .attr(\n 'd',\n `\n M${prevTask.x},${prevTask.y}\n L${prevTask.x + 10},${prevTask.y}\n ${\n prevTask.x + 10 < currTask.x - 10 - currTask.width\n ? `\n L${(prevTask.x + currTask.x - currTask.width) / 2},${prevTask.y}\n L${(prevTask.x + currTask.x - currTask.width) / 2},${currTask.y}\n `\n : `\n L${prevTask.x + 10},${(prevTask.y + currTask.y) / 2}\n L${currTask.x - 10 - currTask.width},${(prevTask.y + currTask.y) / 2}\n `\n }\n L${currTask.x - 10 - currTask.width},${currTask.y}\n L${currTask.x - currTask.width},${currTask.y}\n `\n )\n .attr('stroke', 'var(--md-sys-color-on-primary-container, black)')\n .attr('fill', 'none')\n .attr('stroke-width', 1)\n .attr('marker-end', 'url(#arrow)')\n }\n })\n }\n\n getTaskColor(tags: TaskTag[]): string {\n if (tags.includes('critical')) {\n return 'red'\n } else if (tags.includes('milestone')) {\n return 'blue'\n } else if (tags.includes('done')) {\n return 'green'\n } else {\n return 'grey'\n }\n }\n\n handleWheelForBody(event: WheelEvent, container: HTMLDivElement) {\n event.preventDefault()\n event.stopPropagation()\n\n const { offsetHeight } = container\n\n const deltaModeFactor =\n event.deltaMode === WheelEvent.DOM_DELTA_LINE\n ? 16\n : event.deltaMode === WheelEvent.DOM_DELTA_PAGE\n ? container.clientHeight\n : 1\n const deltaX = event.deltaX * deltaModeFactor\n const deltaY = event.deltaY * deltaModeFactor\n\n // 가로 스크롤 및 세로 스크롤 모두 처리\n container.scrollLeft += deltaX\n // container.scrollTop += deltaY\n container.scrollTop = Math.min(this.tasks.length * 30 - (offsetHeight - 40), container.scrollTop + deltaY)\n\n const customEvent = new CustomEvent('scroll', {\n detail: {\n scrollLeft: container.scrollLeft,\n scrollTop: container.scrollTop\n },\n bubbles: true,\n composed: true\n })\n\n this.host?.dispatchEvent(customEvent)\n }\n\n handlePinchForBody = (event: GestureEventPinch) => {\n const { scale } = event.detail\n\n this.baseWidth *= scale\n\n if (this.baseWidth > 40) {\n if (this.level === 'week-day') {\n this.baseWidth = 40\n } else {\n this.level = levelDown(this.level)\n this.baseWidth = 30\n }\n } else if (this.baseWidth < 30) {\n if (this.level === 'year-quarter') {\n this.baseWidth = 30\n }\n }\n\n if (this.baseWidth < 20) {\n this.level = levelUp(this.level)\n this.baseWidth = 30\n }\n\n this.updateTimeScale()\n this.host?.requestUpdate()\n\n const customEvent = new CustomEvent('timescale-changed', {\n detail: {\n baseWidth: this.baseWidth,\n level: this.level\n },\n bubbles: true,\n composed: true\n })\n\n this.host?.dispatchEvent(customEvent)\n }\n\n handleDoubleTapForBody = (event: GestureEventDoubleTap) => {\n const container = (this.host as any).container\n\n container.scrollLeft = 0\n container.scrollTop = 0\n\n this.baseWidth = 30\n this.level = 'week-day'\n\n this.updateTimeScale()\n this.host?.requestUpdate()\n\n const customEvent = new CustomEvent('timescale-changed', {\n detail: {\n baseWidth: this.baseWidth,\n level: this.level\n },\n bubbles: true,\n composed: true\n })\n\n this.host?.dispatchEvent(customEvent)\n }\n\n handleDragForBody = (event: GestureEventDrag) => {\n const { deltaX: dx, deltaY: dy } = event.detail\n const container = (this.host as any).container\n const { offsetHeight } = container\n\n container.scrollLeft -= dx\n container.scrollTop = Math.min(this.tasks.length * 30 - (offsetHeight - 40), container.scrollTop - dy)\n\n const customEvent = new CustomEvent('scroll', {\n detail: {\n scrollLeft: container.scrollLeft,\n scrollTop: container.scrollTop\n },\n bubbles: true,\n composed: true\n })\n\n this.host?.dispatchEvent(customEvent)\n }\n}\n"]}
@@ -3,7 +3,376 @@ import './ox-resource-chart.js';
3
3
  import { LitElement, PropertyValues, PropertyValueMap } from 'lit';
4
4
  import { Task, TimeScale } from './types.js';
5
5
  import { OxTaskTooltip } from './ox-task-tooltip.js';
6
- export declare class OxGanttChart extends LitElement {
6
+ declare const OxGanttChart_base: (new (...args: any[]) => {
7
+ __pointers: Map<number, {
8
+ x: number;
9
+ y: number;
10
+ }>;
11
+ __lastTapTime: number;
12
+ __lastPinchDistance: number;
13
+ __dragStart: {
14
+ x: number;
15
+ y: number;
16
+ } | null;
17
+ connectedCallback(): void;
18
+ disconnectedCallback(): void;
19
+ handlePointerDown: (e: PointerEvent) => void;
20
+ handlePointerMove: (e: PointerEvent) => void;
21
+ handlePointerUp: (e: PointerEvent) => void;
22
+ handlePinch(): void;
23
+ handleDrag(point: {
24
+ x: number;
25
+ y: number;
26
+ }, end: boolean): void;
27
+ handleTap(point: {
28
+ x: number;
29
+ y: number;
30
+ }): void;
31
+ getDistance(p1: {
32
+ x: number;
33
+ y: number;
34
+ }, p2: {
35
+ x: number;
36
+ y: number;
37
+ }): number;
38
+ addGlobalListeners(): void;
39
+ removeGlobalListeners(): void;
40
+ accessKey: string;
41
+ readonly accessKeyLabel: string;
42
+ autocapitalize: string;
43
+ dir: string;
44
+ draggable: boolean;
45
+ hidden: boolean;
46
+ inert: boolean;
47
+ innerText: string;
48
+ lang: string;
49
+ readonly offsetHeight: number;
50
+ readonly offsetLeft: number;
51
+ readonly offsetParent: Element | null;
52
+ readonly offsetTop: number;
53
+ readonly offsetWidth: number;
54
+ outerText: string;
55
+ popover: string | null;
56
+ spellcheck: boolean;
57
+ title: string;
58
+ translate: boolean;
59
+ writingSuggestions: string;
60
+ attachInternals(): ElementInternals;
61
+ click(): void;
62
+ hidePopover(): void;
63
+ showPopover(): void;
64
+ togglePopover(force?: boolean): boolean;
65
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
66
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
67
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
68
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
69
+ readonly attributes: NamedNodeMap;
70
+ readonly classList: DOMTokenList;
71
+ className: string;
72
+ readonly clientHeight: number;
73
+ readonly clientLeft: number;
74
+ readonly clientTop: number;
75
+ readonly clientWidth: number;
76
+ readonly currentCSSZoom: number;
77
+ id: string;
78
+ innerHTML: string;
79
+ readonly localName: string;
80
+ readonly namespaceURI: string | null;
81
+ onfullscreenchange: ((this: Element, ev: Event) => any) | null;
82
+ onfullscreenerror: ((this: Element, ev: Event) => any) | null;
83
+ outerHTML: string;
84
+ readonly ownerDocument: Document;
85
+ readonly part: DOMTokenList;
86
+ readonly prefix: string | null;
87
+ readonly scrollHeight: number;
88
+ scrollLeft: number;
89
+ scrollTop: number;
90
+ readonly scrollWidth: number;
91
+ readonly shadowRoot: ShadowRoot | null;
92
+ slot: string;
93
+ readonly tagName: string;
94
+ attachShadow(init: ShadowRootInit): ShadowRoot;
95
+ checkVisibility(options?: CheckVisibilityOptions): boolean;
96
+ closest<K extends keyof HTMLElementTagNameMap>(selector: K): HTMLElementTagNameMap[K] | null;
97
+ closest<K extends keyof SVGElementTagNameMap>(selector: K): SVGElementTagNameMap[K] | null;
98
+ closest<K extends keyof MathMLElementTagNameMap>(selector: K): MathMLElementTagNameMap[K] | null;
99
+ closest<E extends Element = Element>(selectors: string): E | null;
100
+ computedStyleMap(): StylePropertyMapReadOnly;
101
+ getAttribute(qualifiedName: string): string | null;
102
+ getAttributeNS(namespace: string | null, localName: string): string | null;
103
+ getAttributeNames(): string[];
104
+ getAttributeNode(qualifiedName: string): Attr | null;
105
+ getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
106
+ getBoundingClientRect(): DOMRect;
107
+ getClientRects(): DOMRectList;
108
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
109
+ getElementsByTagName<K extends keyof HTMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
110
+ getElementsByTagName<K extends keyof SVGElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>;
111
+ getElementsByTagName<K extends keyof MathMLElementTagNameMap>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
112
+ getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
113
+ getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
114
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
115
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
116
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>;
117
+ getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
118
+ getHTML(options?: GetHTMLOptions): string;
119
+ hasAttribute(qualifiedName: string): boolean;
120
+ hasAttributeNS(namespace: string | null, localName: string): boolean;
121
+ hasAttributes(): boolean;
122
+ hasPointerCapture(pointerId: number): boolean;
123
+ insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
124
+ insertAdjacentHTML(position: InsertPosition, string: string): void;
125
+ insertAdjacentText(where: InsertPosition, data: string): void;
126
+ matches(selectors: string): boolean;
127
+ releasePointerCapture(pointerId: number): void;
128
+ removeAttribute(qualifiedName: string): void;
129
+ removeAttributeNS(namespace: string | null, localName: string): void;
130
+ removeAttributeNode(attr: Attr): Attr;
131
+ requestFullscreen(options?: FullscreenOptions): Promise<void>;
132
+ requestPointerLock(options?: PointerLockOptions): Promise<void>;
133
+ scroll(options?: ScrollToOptions): void;
134
+ scroll(x: number, y: number): void;
135
+ scrollBy(options?: ScrollToOptions): void;
136
+ scrollBy(x: number, y: number): void;
137
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
138
+ scrollTo(options?: ScrollToOptions): void;
139
+ scrollTo(x: number, y: number): void;
140
+ setAttribute(qualifiedName: string, value: string): void;
141
+ setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
142
+ setAttributeNode(attr: Attr): Attr | null;
143
+ setAttributeNodeNS(attr: Attr): Attr | null;
144
+ setHTMLUnsafe(html: string): void;
145
+ setPointerCapture(pointerId: number): void;
146
+ toggleAttribute(qualifiedName: string, force?: boolean): boolean;
147
+ webkitMatchesSelector(selectors: string): boolean;
148
+ readonly baseURI: string;
149
+ readonly childNodes: NodeListOf<ChildNode>;
150
+ readonly firstChild: ChildNode | null;
151
+ readonly isConnected: boolean;
152
+ readonly lastChild: ChildNode | null;
153
+ readonly nextSibling: ChildNode | null;
154
+ readonly nodeName: string;
155
+ readonly nodeType: number;
156
+ nodeValue: string | null;
157
+ readonly parentElement: HTMLElement | null;
158
+ readonly parentNode: ParentNode | null;
159
+ readonly previousSibling: ChildNode | null;
160
+ textContent: string | null;
161
+ appendChild<T extends Node>(node: T): T;
162
+ cloneNode(deep?: boolean): Node;
163
+ compareDocumentPosition(other: Node): number;
164
+ contains(other: Node | null): boolean;
165
+ getRootNode(options?: GetRootNodeOptions): Node;
166
+ hasChildNodes(): boolean;
167
+ insertBefore<T extends Node>(node: T, child: Node | null): T;
168
+ isDefaultNamespace(namespace: string | null): boolean;
169
+ isEqualNode(otherNode: Node | null): boolean;
170
+ isSameNode(otherNode: Node | null): boolean;
171
+ lookupNamespaceURI(prefix: string | null): string | null;
172
+ lookupPrefix(namespace: string | null): string | null;
173
+ normalize(): void;
174
+ removeChild<T extends Node>(child: T): T;
175
+ replaceChild<T extends Node>(node: Node, child: T): T;
176
+ readonly ELEMENT_NODE: 1;
177
+ readonly ATTRIBUTE_NODE: 2;
178
+ readonly TEXT_NODE: 3;
179
+ readonly CDATA_SECTION_NODE: 4;
180
+ readonly ENTITY_REFERENCE_NODE: 5;
181
+ readonly ENTITY_NODE: 6;
182
+ readonly PROCESSING_INSTRUCTION_NODE: 7;
183
+ readonly COMMENT_NODE: 8;
184
+ readonly DOCUMENT_NODE: 9;
185
+ readonly DOCUMENT_TYPE_NODE: 10;
186
+ readonly DOCUMENT_FRAGMENT_NODE: 11;
187
+ readonly NOTATION_NODE: 12;
188
+ readonly DOCUMENT_POSITION_DISCONNECTED: 1;
189
+ readonly DOCUMENT_POSITION_PRECEDING: 2;
190
+ readonly DOCUMENT_POSITION_FOLLOWING: 4;
191
+ readonly DOCUMENT_POSITION_CONTAINS: 8;
192
+ readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
193
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
194
+ dispatchEvent(event: Event): boolean;
195
+ ariaAtomic: string | null;
196
+ ariaAutoComplete: string | null;
197
+ ariaBrailleLabel: string | null;
198
+ ariaBrailleRoleDescription: string | null;
199
+ ariaBusy: string | null;
200
+ ariaChecked: string | null;
201
+ ariaColCount: string | null;
202
+ ariaColIndex: string | null;
203
+ ariaColIndexText: string | null;
204
+ ariaColSpan: string | null;
205
+ ariaCurrent: string | null;
206
+ ariaDescription: string | null;
207
+ ariaDisabled: string | null;
208
+ ariaExpanded: string | null;
209
+ ariaHasPopup: string | null;
210
+ ariaHidden: string | null;
211
+ ariaInvalid: string | null;
212
+ ariaKeyShortcuts: string | null;
213
+ ariaLabel: string | null;
214
+ ariaLevel: string | null;
215
+ ariaLive: string | null;
216
+ ariaModal: string | null;
217
+ ariaMultiLine: string | null;
218
+ ariaMultiSelectable: string | null;
219
+ ariaOrientation: string | null;
220
+ ariaPlaceholder: string | null;
221
+ ariaPosInSet: string | null;
222
+ ariaPressed: string | null;
223
+ ariaReadOnly: string | null;
224
+ ariaRequired: string | null;
225
+ ariaRoleDescription: string | null;
226
+ ariaRowCount: string | null;
227
+ ariaRowIndex: string | null;
228
+ ariaRowIndexText: string | null;
229
+ ariaRowSpan: string | null;
230
+ ariaSelected: string | null;
231
+ ariaSetSize: string | null;
232
+ ariaSort: string | null;
233
+ ariaValueMax: string | null;
234
+ ariaValueMin: string | null;
235
+ ariaValueNow: string | null;
236
+ ariaValueText: string | null;
237
+ role: string | null;
238
+ animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation;
239
+ getAnimations(options?: GetAnimationsOptions): Animation[];
240
+ after(...nodes: (Node | string)[]): void;
241
+ before(...nodes: (Node | string)[]): void;
242
+ remove(): void;
243
+ replaceWith(...nodes: (Node | string)[]): void;
244
+ readonly nextElementSibling: Element | null;
245
+ readonly previousElementSibling: Element | null;
246
+ readonly childElementCount: number;
247
+ readonly children: HTMLCollection;
248
+ readonly firstElementChild: Element | null;
249
+ readonly lastElementChild: Element | null;
250
+ append(...nodes: (Node | string)[]): void;
251
+ prepend(...nodes: (Node | string)[]): void;
252
+ querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
253
+ querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
254
+ querySelector<K extends keyof MathMLElementTagNameMap>(selectors: K): MathMLElementTagNameMap[K] | null;
255
+ querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null;
256
+ querySelector<E extends Element = Element>(selectors: string): E | null;
257
+ querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
258
+ querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
259
+ querySelectorAll<K extends keyof MathMLElementTagNameMap>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>;
260
+ querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
261
+ querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
262
+ replaceChildren(...nodes: (Node | string)[]): void;
263
+ readonly assignedSlot: HTMLSlotElement | null;
264
+ readonly attributeStyleMap: StylePropertyMap;
265
+ readonly style: CSSStyleDeclaration;
266
+ contentEditable: string;
267
+ enterKeyHint: string;
268
+ inputMode: string;
269
+ readonly isContentEditable: boolean;
270
+ onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
271
+ onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
272
+ onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
273
+ onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
274
+ onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
275
+ onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
276
+ onbeforeinput: ((this: GlobalEventHandlers, ev: InputEvent) => any) | null;
277
+ onbeforetoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
278
+ onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
279
+ oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null;
280
+ oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
281
+ oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
282
+ onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
283
+ onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
284
+ onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
285
+ oncontextlost: ((this: GlobalEventHandlers, ev: Event) => any) | null;
286
+ oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
287
+ oncontextrestored: ((this: GlobalEventHandlers, ev: Event) => any) | null;
288
+ oncopy: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
289
+ oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
290
+ oncut: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
291
+ ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
292
+ ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
293
+ ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
294
+ ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
295
+ ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
296
+ ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
297
+ ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
298
+ ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
299
+ ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
300
+ onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
301
+ onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
302
+ onerror: OnErrorEventHandler;
303
+ onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
304
+ onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
305
+ ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
306
+ oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
307
+ oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
308
+ onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
309
+ onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
310
+ onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
311
+ onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
312
+ onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
313
+ onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
314
+ onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
315
+ onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
316
+ onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
317
+ onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
318
+ onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
319
+ onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
320
+ onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
321
+ onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
322
+ onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
323
+ onpaste: ((this: GlobalEventHandlers, ev: ClipboardEvent) => any) | null;
324
+ onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
325
+ onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
326
+ onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
327
+ onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
328
+ onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
329
+ onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
330
+ onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
331
+ onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
332
+ onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
333
+ onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
334
+ onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
335
+ onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null;
336
+ onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
337
+ onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
338
+ onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
339
+ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
340
+ onscrollend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
341
+ onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
342
+ onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
343
+ onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
344
+ onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
345
+ onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
346
+ onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
347
+ onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
348
+ onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
349
+ onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
350
+ onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
351
+ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
352
+ ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
353
+ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
354
+ ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
355
+ ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
356
+ ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
357
+ ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
358
+ ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
359
+ ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
360
+ ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
361
+ onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
362
+ onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
363
+ onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
364
+ onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
365
+ onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
366
+ onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
367
+ onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
368
+ autofocus: boolean;
369
+ readonly dataset: DOMStringMap;
370
+ nonce?: string;
371
+ tabIndex: number;
372
+ blur(): void;
373
+ focus(options?: FocusOptions): void;
374
+ }) & typeof LitElement;
375
+ export declare class OxGanttChart extends OxGanttChart_base {
7
376
  static styles: import("lit").CSSResult[];
8
377
  fromDate: string;
9
378
  toDate: string;
@@ -12,13 +381,18 @@ export declare class OxGanttChart extends LitElement {
12
381
  selectedTaskId?: string;
13
382
  locale: string;
14
383
  colorProvider: (task: Task) => string;
384
+ dateRangeSelected?: {
385
+ start: Date;
386
+ end: Date;
387
+ };
15
388
  svgHeader: SVGElement;
16
389
  svgBody: SVGElement;
17
390
  container: HTMLDivElement;
18
391
  tooltip: OxTaskTooltip;
19
392
  private ganttChartController;
20
- constructor();
21
393
  protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
394
+ connectedCallback(): void;
395
+ disconnectedCallback(): void;
22
396
  updated(changedProperties: PropertyValues<this>): void;
23
397
  render(): import("lit-html").TemplateResult<1>;
24
398
  scrollToStart(): void;
@@ -30,9 +404,10 @@ export declare class OxGanttChart extends LitElement {
30
404
  getHorizontalOffset(): number;
31
405
  flattenTasks(tasks: Task[], level?: number): Task[];
32
406
  handleWheelForHeader(event: WheelEvent): void;
33
- handleDateRangeSelected(event: CustomEvent): void;
34
407
  updateLocale(locale: string): void;
35
408
  initHeaderGestureHandlers(): void;
36
409
  highlightSelection(startX: number, endX: number): void;
37
410
  finalizeSelection(startX: number, endX: number): void;
411
+ drawSelectedRange(): void;
38
412
  }
413
+ export {};