@hpcc-js/timeline 3.2.0 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -1209
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +3 -2
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +9 -9
- package/src/ReactTimelineSeries.ts +17 -0
- package/types/ReactTimelineSeries.d.ts +4 -0
package/dist/index.umd.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.cjs","names":["bucketData: BucketInfo[]","ganttData: any[]","ganttData: any[]"],"sources":["../src/__package__.ts","../src/MiniGantt.ts","../src/ReactGantt.ts","../src/ReactAxisGantt.ts","../src/ReactAxisGanttSeries.ts","../src/ReactTimeline.ts","../src/ReactTimelineSeries.ts"],"sourcesContent":["export const PKG_NAME = \"__PACKAGE_NAME__\";\nexport const PKG_VERSION = \"__PACKAGE_VERSION__\";\nexport const BUILD_VERSION = \"__BUILD_VERSION__\";\n","import { ITooltip } from \"@hpcc-js/api\";\nimport { Axis } from \"@hpcc-js/chart\";\nimport { d3Event, EntityPin, EntityRect, local as d3Local, select as d3Select, SVGWidget, Utility } from \"@hpcc-js/common\";\nimport { extent as d3Extent } from \"d3-array\";\nimport { scaleBand as d3ScaleBand } from \"d3-scale\";\nimport { timeFormat as d3TimeFormat, timeParse as d3TimeParse } from \"d3-time-format\";\nimport { zoom as d3Zoom, zoomIdentity as d3ZoomIdentity } from \"d3-zoom\";\n\nimport \"../src/MiniGantt.css\";\n\nexport class MiniGantt extends SVGWidget {\n protected tlAxis: Axis;\n protected brAxis: Axis;\n protected verticalBands;\n protected _zoom;\n protected gUpperContent;\n protected gUpperAxis;\n protected gMiddleContent;\n protected gLowerAxis;\n protected gLowerContent;\n private localRect = d3Local<EntityRect>();\n private localEntityPin = d3Local<EntityPin>();\n private tooltipFormatter: (date: Date) => string;\n private _dateCache;\n\n protected rootExtent;\n protected _title_idx = 0;\n protected _startDate_idx = 1;\n protected _endDate_idx = 2;\n protected _icon_idx = -1;\n protected _color_idx = -1;\n protected _yoffset_idx = -1;\n\n constructor() {\n super();\n ITooltip.call(this);\n Utility.SimpleSelectionMixin.call(this);\n\n this._drawStartPos = \"origin\";\n this.tooltipHTML((d: any) => `<center>${d[this._title_idx]}</center><br>${this.tooltipFormatter(this.brAxis.parse(d[this._startDate_idx]))} -> ${this.tooltipFormatter(this.brAxis.parse(d[this._endDate_idx]))}`);\n\n this.tlAxis = new Axis()\n .type(\"time\")\n ;\n this.brAxis = new Axis()\n .type(\"time\")\n ;\n this.verticalBands = d3ScaleBand()\n .paddingOuter(0.2)\n .paddingInner(0.2)\n ;\n }\n\n isHorizontal(): boolean {\n return this.orientation() === \"horizontal\";\n }\n\n fullExtent() {\n const data = [...this.data().map(d => d[this._startDate_idx]), ...this.data().filter(d => !!d[this._endDate_idx]).map(d => d[this._endDate_idx])];\n return d3Extent(data);\n }\n\n extent() {\n const extent = this.rootExtent ? [this.rootExtent[1], this.rootExtent[2]] : this.fullExtent();\n if (extent[0] !== undefined && extent[1] !== undefined) {\n if (extent[0] === extent[1] || this.centerOnMostRecent()) {\n const parser = d3TimeParse(this.timePattern());\n const formatter = d3TimeFormat(this.timePattern());\n const date1 = parser(extent[0]);\n const date2 = parser(extent[1]);\n if (extent[0] === extent[1]) {\n extent[0] = formatter(new Date(date1.setFullYear(date1.getFullYear() - 1)));\n extent[1] = formatter(new Date(date1.setFullYear(date1.getFullYear() + 2)));\n } else {\n const time1 = date1.getTime();\n const timeDiff = date2.getTime() - time1;\n extent[0] = formatter(date1);\n extent[1] = formatter(new Date(time1 + (timeDiff * 2)));\n }\n }\n }\n return extent;\n }\n\n dataStartPos(d) {\n if (typeof this._dateCache[d[this._startDate_idx]] !== \"undefined\") {\n return this._dateCache[d[this._startDate_idx]];\n }\n const pos = this.brAxis.scalePos(d[this._startDate_idx]);\n this._dateCache[d[this._startDate_idx]] = pos;\n return pos;\n }\n\n dataEndPos(d) {\n if (typeof this._dateCache[d[this._endDate_idx]] !== \"undefined\") {\n return this._dateCache[d[this._endDate_idx]];\n }\n const pos = this.brAxis.scalePos(d[this._endDate_idx]);\n this._dateCache[d[this._endDate_idx]] = pos;\n return pos;\n }\n\n dataWidth(d) {\n return this.dataEndPos(d) - this.dataStartPos(d);\n }\n\n private transform;\n resetZoom() {\n // Triggers a \"zoomed\" event ---\n this._zoom.transform(this.element(), d3ZoomIdentity.translate(0, this.isHorizontal() ? 0 : this.height()));\n }\n\n zoomed() {\n this.transform = d3Event().transform;\n this.render();\n }\n\n private background;\n enter(domNode, element) {\n super.enter(domNode, element);\n this._zoom = d3Zoom()\n .scaleExtent([0, this.maxZoom()])\n .on(\"zoom\", () => {\n this.zoomed();\n })\n ;\n\n this.background = element.append(\"rect\")\n .attr(\"fill\", \"white\")\n .attr(\"opacity\", 0)\n .on(\"dblclick\", () => {\n d3Event().stopPropagation();\n delete this.rootExtent;\n this.resetZoom();\n })\n ;\n this.gUpperContent = element.append(\"g\").attr(\"class\", \"gUpperContent\");\n this.gUpperAxis = element.append(\"g\").attr(\"class\", \"gUpperAxis\");\n this.gMiddleContent = element.append(\"g\").attr(\"class\", \"gMiddleContent\");\n this.gLowerAxis = element.append(\"g\").attr(\"class\", \"gLowerAxis\");\n this.gLowerContent = element.append(\"g\").attr(\"class\", \"gLowerContent\");\n this.tlAxis\n .target(this.gUpperAxis.node())\n .tickFormat(this.tickFormat())\n .guideTarget(this.gUpperAxis.append(\"g\").node())\n .shrinkToFit(\"none\")\n .overlapMode(this.tickFormat_exists() ? \"stagger\" : \"none\")\n .extend(0.1)\n ;\n this.brAxis\n .target(this.gLowerAxis.node())\n .tickFormat(this.tickFormat())\n .guideTarget(this.gLowerAxis.append(\"g\").node())\n .shrinkToFit(\"none\")\n .overlapMode(this.tickFormat_exists() ? \"stagger\" : \"none\")\n .extend(0.1)\n ;\n\n element.call(this._zoom);\n this._selection.widgetElement(this.gMiddleContent);\n }\n\n private _prevIsHorizontal;\n update(domNode, element) {\n super.update(domNode, element);\n\n this._dateCache = {};\n\n this._title_idx = this.titleColumn() !== null ? this.columns().indexOf(this.titleColumn()) : this._title_idx;\n this._startDate_idx = this.startDateColumn() !== null ? this.columns().indexOf(this.startDateColumn()) : this._startDate_idx;\n this._endDate_idx = this.endDateColumn() !== null ? this.columns().indexOf(this.endDateColumn()) : this._endDate_idx;\n this._icon_idx = this.iconColumn() !== null ? this.columns().indexOf(this.iconColumn()) : this._icon_idx;\n this._color_idx = this.colorColumn() !== null ? this.columns().indexOf(this.colorColumn()) : this._color_idx;\n this._yoffset_idx = this.yOffsetColumn() !== null ? this.columns().indexOf(this.yOffsetColumn()) : this._yoffset_idx;\n\n if (this._prevIsHorizontal !== this.isHorizontal()) {\n this._prevIsHorizontal = this.isHorizontal();\n this.resetZoom();\n return;\n }\n\n this.tooltipFormatter = d3TimeFormat(this.tooltipTimeFormat());\n\n const width = this.width();\n const height = this.height();\n\n this.background\n .attr(\"x\", 0)\n .attr(\"y\", 0)\n .attr(\"width\", width)\n .attr(\"height\", height)\n ;\n\n const extent = this.extent();\n this.tlAxis\n .x(width / 2)\n .orientation(this.isHorizontal() ? \"top\" : \"left\")\n .reverse(!this.isHorizontal())\n .timePattern(this.timePattern()) // \"%Y-%m-%dT%H:%M:%S.%LZ\"\n .width(width - 1)\n .low(extent[0])\n .high(extent[1])\n .updateScale()\n ;\n\n this.brAxis\n .x(width / 2)\n .y(height / 2)\n .orientation(this.isHorizontal() ? \"bottom\" : \"right\")\n .reverse(!this.isHorizontal())\n .timePattern(this.timePattern()) // \"%Y-%m-%dT%H:%M:%S.%LZ\"\n .width(width - 1)\n .height(height)\n .low(extent[0])\n .high(extent[1])\n .updateScale()\n ;\n\n if (this.transform) {\n let low;\n let hi;\n if (this.isHorizontal()) {\n low = this.tlAxis.parseInvert(this.tlAxis.invert(this.transform.invertX(0)));\n hi = this.tlAxis.parseInvert(this.tlAxis.invert(this.transform.invertX(width - 1)));\n } else {\n low = this.tlAxis.parseInvert(this.tlAxis.invert(- this.transform.invertY(0)));\n hi = this.tlAxis.parseInvert(this.tlAxis.invert(- this.transform.invertY(height - 1)));\n }\n this.tlAxis\n .low(low)\n .high(hi)\n .updateScale()\n ;\n this.brAxis\n .low(low)\n .high(hi)\n .updateScale()\n ;\n }\n\n const data = this.data().sort(this.isHorizontal() ? (l, r) => {\n const retVal = this.brAxis.scalePos(l[1]) - this.brAxis.scalePos(r[1]);\n if (retVal === 0) {\n return (\"\" + l[0]).localeCompare(\"\" + r[0]);\n }\n return retVal;\n } : (l, r) => {\n return this.brAxis.scalePos(r[1]) - this.brAxis.scalePos(l[1]);\n });\n const events = data.filter(d => !d[this._endDate_idx]);\n const ranges = data.filter(d => !!d[this._endDate_idx]);\n\n this.tlAxis\n .render()\n ;\n this.brAxis\n .render()\n ;\n const brAxisBBox = this.brAxis.getBBox();\n\n let upperContentHeight = this.updateEntityPins(events);\n const lowerAxisHeight = brAxisBBox.height;\n let lowerHeight = height - upperContentHeight;\n const minYOffset = this._yoffset_idx !== -1 ? Math.min.apply(undefined, this.data().filter(row => !isNaN(row[this._yoffset_idx])).map(row => row[this._yoffset_idx])) : 0;\n if (events.length > 0 && ranges.length === 0) {\n // ONLY EVENTS\n this.tlAxis.visible(false);\n let y_offset = upperContentHeight / 4;\n if (y_offset > (height / 2) - lowerAxisHeight) {\n y_offset = (height / 2) - lowerAxisHeight;\n }\n const upperContentYOffset = (height / 2) + y_offset;\n const lowerAxisYOffset = ((height / 2) - lowerAxisHeight - y_offset) * -1;\n const halfMinYOffset = minYOffset !== 0 ? minYOffset / 2 : 0;\n this.gUpperContent.attr(\"transform\", `translate(0, ${upperContentYOffset - halfMinYOffset})`);\n this.gLowerAxis.attr(\"transform\", `translate(0, ${lowerAxisYOffset - halfMinYOffset})`);\n } else if (events.length === 0 && ranges.length > 0) {\n // ONLY RANGES\n this.tlAxis.visible(true);\n this.gUpperContent.attr(\"transform\", `translate(0, ${upperContentHeight})`);\n this.gUpperAxis.attr(\"transform\", `translate(0, ${upperContentHeight})`);\n } else {\n upperContentHeight -= minYOffset;\n lowerHeight += minYOffset;\n // BOTH\n this.tlAxis.visible(true);\n this.gUpperContent.attr(\"transform\", `translate(0, ${upperContentHeight})`);\n this.gUpperAxis.attr(\"transform\", `translate(0, ${upperContentHeight})`);\n this.gMiddleContent.attr(\"transform\", `translate(0, ${upperContentHeight})`);\n }\n this.tlAxis\n .render()\n ;\n const tlAxisBBox = this.tlAxis.getBBox();\n interface BucketInfo {\n endPos: number;\n }\n const bucketData: BucketInfo[] = [];\n const bucketIndex = {};\n for (const range of ranges) {\n for (let i = 0; i < bucketData.length; ++i) {\n const bucket = bucketData[i];\n if (bucket.endPos + this.overlapTolerence() <= this.dataStartPos(range)) {\n bucketIndex[range] = i;\n bucket.endPos = this.dataEndPos(range);\n break;\n }\n }\n\n if (bucketIndex[range] === undefined) {\n bucketIndex[range] = bucketData.length;\n bucketData.push({\n endPos: this.dataEndPos(range)\n });\n }\n }\n\n const vbLower = this.isHorizontal() ? 0 + tlAxisBBox.height : 0 + tlAxisBBox.width;\n const vbHigher = this.isHorizontal() ? lowerHeight - brAxisBBox.height : width - brAxisBBox.width;\n this.verticalBands\n .range([vbLower, vbHigher])\n .domain(bucketData.map((_d, i) => i))\n ;\n\n if (ranges.length > 0) {\n this.updateEventRanges(events, ranges, bucketIndex, lowerHeight, tlAxisBBox, brAxisBBox, width);\n }\n }\n\n updateEntityPins(events) {\n let event_height = 0;\n const context = this;\n const entityPins = this.gUpperContent.selectAll(\".entity_pin\").data(events, d => d[0] + \":\" + d[1]);\n const eventFontColor_idx = this.eventFontColorColumn() ? this.columns().indexOf(this.eventFontColorColumn()) : -1;\n const eventBorderColor_idx = this.eventBorderColorColumn() ? this.columns().indexOf(this.eventBorderColorColumn()) : -1;\n const eventBackgroundColor_idx = this.eventBackgroundColorColumn() ? this.columns().indexOf(this.eventBackgroundColorColumn()) : -1;\n const title_counts = {};\n for (const d of events) {\n const type = typeof d[context._title_idx] !== \"undefined\" ? d[context._title_idx] : d[0];\n title_counts[type] = title_counts[type] ? title_counts[type] + 1 : 1;\n }\n const title_types = Object.keys(title_counts);\n const title_group_offset = context.eventGroupOffset();\n const entityPinsEnter = entityPins.enter().append(\"g\")\n .attr(\"class\", \"entity_pin\");\n entityPinsEnter.append(\"line\")\n .attr(\"class\", \"entity_line\");\n\n entityPinsEnter\n .on(\"mouseover\", function (d) {\n d3Select(this).raise();\n })\n .each(function (d, i) {\n const entityPin = new EntityPin()\n .target(this)\n .icon(\"\")\n .iconOnlyShowOnHover(context.hideIconWhenCollapsed())\n .titleOnlyShowOnHover(context.hideTitleWhenCollapsed())\n .descriptionOnlyShowOnHover(context.hideDescriptionWhenCollapsed())\n .annotationOnlyShowOnHover(context.hideAnnotationsWhenCollapsed())\n .iconDiameter(18)\n .iconPaddingPercent(1)\n .titleFontSize(14)\n .descriptionColor(\"#333\")\n .descriptionFontSize(15)\n .iconColor(eventFontColor_idx === -1 ? \"#333\" : d[eventFontColor_idx])\n .titleColor(eventFontColor_idx === -1 ? \"#333\" : d[eventFontColor_idx])\n .descriptionColor(eventFontColor_idx === -1 ? \"#333\" : d[eventFontColor_idx])\n .backgroundShape(\"pin\")\n .backgroundColorFill(eventFontColor_idx === -1 ? \"#f8f8f8\" : d[eventBackgroundColor_idx])\n .backgroundColorStroke(eventFontColor_idx === -1 ? \"#ccc\" : d[eventBorderColor_idx])\n .cornerRadius(5)\n .arrowHeight(10)\n .arrowWidth(16)\n ;\n context.localEntityPin.set(this, entityPin);\n })\n .merge(entityPins)\n .each(function (d, i) {\n const entityPin = context.localEntityPin.get(this);\n const _title = typeof d[context._title_idx] !== \"undefined\" ? d[context._title_idx] : entityPin.title();\n const x_offset = context.dataStartPos(d) - 0;\n let y_offset = ((title_types.indexOf(_title) % context.eventGroupMod()) * title_group_offset) - 5;\n if (typeof d[context._yoffset_idx] !== \"undefined\") y_offset += d[context._yoffset_idx] ? d[context._yoffset_idx] : 0;\n if (d[context._title_idx] !== entityPin.title() && d[context._startDate_idx] !== entityPin.description()) {\n const parsed_start_time = context.brAxis.parse(d[context._startDate_idx]);\n const formatted_start_time = context.tooltipFormatter(parsed_start_time);\n entityPin\n .x(x_offset)\n .y(y_offset)\n .iconOnlyShowOnHover(context.hideIconWhenCollapsed())\n .titleOnlyShowOnHover(context.hideTitleWhenCollapsed())\n .descriptionOnlyShowOnHover(context.hideDescriptionWhenCollapsed())\n .annotationOnlyShowOnHover(context.hideAnnotationsWhenCollapsed())\n .icon(typeof d[context._icon_idx] !== \"undefined\" ? d[context._icon_idx] : entityPin.icon())\n .title(_title)\n .description(formatted_start_time)\n .animationFrameRender()\n ;\n } else {\n entityPin.move({ x: x_offset, y: y_offset });\n }\n const calc_height = entityPin.calcHeight();\n if (event_height < calc_height) event_height = calc_height;\n\n d3Select(this).selectAll(\".entity_line\")\n .attr(\"x1\", x_offset)\n .attr(\"x2\", x_offset)\n .attr(\"y1\", 0)\n .attr(\"y2\", y_offset)\n .style(\"stroke\", eventFontColor_idx === -1 ? \"#ccc\" : d[eventBorderColor_idx])\n .style(\"stroke-width\", 1)\n ;\n })\n ;\n entityPins.exit()\n .each(function (d, i) {\n const entityPin = context.localEntityPin.get(this);\n entityPin.target(null);\n\n })\n .remove();\n const event_offset = Math.abs(Math.min(events.length, context.eventGroupMod()) * context.eventGroupOffset());\n return event_height + event_offset;\n }\n\n updateEventRanges(events, ranges, bucketIndex, eventRangeHeight, tlAxisBBox, brAxisBBox, width) {\n const context = this;\n\n const lines = this.gMiddleContent.selectAll(\".line\").data(events, d => {\n return d[context._title_idx];\n });\n lines.enter().append(\"line\")\n .attr(\"class\", \"line\")\n .merge(lines)\n .attr(this.isHorizontal() ? \"x1\" : \"y1\", d => this.dataStartPos(d) - 0)\n .attr(this.isHorizontal() ? \"x2\" : \"y2\", d => this.dataStartPos(d) - 0)\n .attr(this.isHorizontal() ? \"y1\" : \"x1\", this.isHorizontal() ? tlAxisBBox.height : tlAxisBBox.width)\n .attr(this.isHorizontal() ? \"y2\" : \"x2\", this.isHorizontal() ? eventRangeHeight - brAxisBBox.height : width - brAxisBBox.width)\n ;\n lines.exit().remove();\n const buckets = this.gMiddleContent.selectAll(\".buckets\").data(ranges, d => d[context._title_idx]);\n buckets.enter().append(\"g\")\n .attr(\"class\", \"buckets\")\n .call(this._selection.enter.bind(this._selection))\n .each(function (d) {\n const entityRect = new EntityRect()\n .target(this)\n .iconDiameter(28)\n .iconPaddingPercent(0)\n .titleFontSize(28)\n .titleColor(context.rangeFontColor())\n .descriptionColor(context.rangeFontColor())\n .iconColor(context.rangeFontColor())\n .backgroundShape(\"rect\")\n .backgroundColorFill(d[context._color_idx])\n ;\n context.localRect.set(this, entityRect);\n context.enterEntityRect(entityRect, d);\n })\n .on(\"click\", function (d) {\n context.click(context.rowToObj(d), \"range\", context._selection.selected(this));\n }, false)\n .on(\"dblclick\", function (d) {\n context.rootExtent = d;\n context.resetZoom();\n context.dblclick(context.rowToObj(d), \"range\", context._selection.selected(this));\n }, true)\n .on(\"mouseout.tooltip\", this.tooltip.hide)\n .on(\"mousemove.tooltip\", this.tooltip.show)\n .merge(buckets)\n .attr(\"transform\", d => context.isHorizontal() ?\n `translate(${this.dataStartPos(d)}, ${this.verticalBands(bucketIndex[d])}) ` :\n `translate(${this.verticalBands(bucketIndex[d])}, ${this.dataStartPos(d)}) `)\n .each(function (d) {\n const textBox = context.localRect.get(this);\n const x = context.dataWidth(d) / 2;\n const y = context.verticalBands.bandwidth() / 2;\n const rectWidth = Math.max(context.dataWidth(d), 2);\n const rectHeight = Math.max(context.verticalBands.bandwidth(), 2);\n const fontHeightRatio = 0.618;\n const paddingRatio = ((1 - fontHeightRatio) / 2);\n const paddingSize = paddingRatio * rectHeight;\n const fontSize = rectHeight * fontHeightRatio;\n const iconSize = fontSize;\n textBox\n .pos(context.isHorizontal() ? { x, y } : { x: y, y: x })\n .fixedHeight(context.isHorizontal() ? rectHeight : rectWidth)\n .fixedWidth(context.isHorizontal() ? rectWidth : rectHeight)\n .icon(typeof d[context._icon_idx] !== \"undefined\" ? d[context._icon_idx] : \"\")\n .title(typeof d[context._title_idx] !== \"undefined\" ? d[context._title_idx] : \"\")\n .padding(paddingSize)\n .iconDiameter(iconSize)\n .titleFontSize(fontSize)\n ;\n if (iconSize * 1.5 > rectWidth) {\n textBox.icon(null);\n }\n context.updateEntityRect(textBox, d[context._icon_idx]);\n textBox\n .render()\n ;\n });\n buckets.exit().remove();\n }\n\n exit(domNode, element) {\n this.brAxis.target(null);\n this.tlAxis.target(null);\n super.exit(domNode, element);\n }\n\n // Events ---\n click(row, col, sel) {\n }\n\n dblclick(row, col, sel) {\n }\n\n enterEntityRect(textbox: EntityRect, d) {\n }\n\n updateEntityRect(textbox: EntityRect, d) {\n }\n}\nMiniGantt.prototype._class += \" timeline_MiniGantt\";\nMiniGantt.prototype.implements(ITooltip.prototype);\nMiniGantt.prototype.mixin(Utility.SimpleSelectionMixin);\n\nexport interface MiniGantt {\n // ITooltip ---\n tooltip;\n tooltipHTML(_): string;\n tooltipFormat(_): string;\n\n // SimpleSelectionMixin\n _selection;\n\n // Properties ---\n timePattern(): string;\n timePattern(_: string): this;\n tickFormat(): string;\n tickFormat(_: string): this;\n tickFormat_exists(): boolean;\n tooltipTimeFormat(): string;\n tooltipTimeFormat(_: string): this;\n overlapTolerence(): number;\n overlapTolerence(_: number): this;\n orientation(): string;\n orientation(_: string): this;\n rangeFontColor(): string;\n rangeFontColor(_: string): this;\n titleColumn(): string;\n titleColumn(_: string): this;\n startDateColumn(): string;\n startDateColumn(_: string): this;\n endDateColumn(): string;\n endDateColumn(_: string): this;\n iconColumn(): string;\n iconColumn(_: string): this;\n colorColumn(): string;\n colorColumn(_: string): this;\n yOffsetColumn(): string;\n yOffsetColumn(_: string): this;\n maxZoom(): number;\n maxZoom(_: number): this;\n eventGroupMod(): number;\n eventGroupMod(_: number): this;\n eventGroupOffset(): number;\n eventGroupOffset(_: number): this;\n eventFontColorColumn(): string;\n eventFontColorColumn(_: string): this;\n eventBorderColorColumn(): string;\n eventBorderColorColumn(_: string): this;\n eventBackgroundColorColumn(): string;\n eventBackgroundColorColumn(_: string): this;\n hideIconWhenCollapsed(): boolean;\n hideIconWhenCollapsed(_: boolean): this;\n hideTitleWhenCollapsed(): boolean;\n hideTitleWhenCollapsed(_: boolean): this;\n hideDescriptionWhenCollapsed(): boolean;\n hideDescriptionWhenCollapsed(_: boolean): this;\n hideAnnotationsWhenCollapsed(): boolean;\n hideAnnotationsWhenCollapsed(_: boolean): this;\n centerOnMostRecent(): boolean;\n centerOnMostRecent(_: boolean): this;\n\n}\n\nMiniGantt.prototype.publish(\"timePattern\", \"%Y-%m-%d\", \"string\", \"timePattern\");\nMiniGantt.prototype.publish(\"tickFormat\", null, \"string\", \"tickFormat\", undefined, { optional: true });\nMiniGantt.prototype.publish(\"tooltipTimeFormat\", \"%Y-%m-%d\", \"string\", \"tooltipTimeFormat\");\nMiniGantt.prototype.publish(\"overlapTolerence\", 2, \"number\", \"overlapTolerence\");\nMiniGantt.prototype.publish(\"orientation\", \"horizontal\", \"set\", \"orientation\", [\"horizontal\", \"vertical\"]);\nMiniGantt.prototype.publish(\"rangeFontColor\", \"#ecf0f1\", \"html-color\", \"rangeFontColor\");\nMiniGantt.prototype.publish(\"titleColumn\", null, \"string\", \"titleColumn\");\nMiniGantt.prototype.publish(\"startDateColumn\", null, \"string\", \"startDateColumn\");\nMiniGantt.prototype.publish(\"endDateColumn\", null, \"string\", \"endDateColumn\");\nMiniGantt.prototype.publish(\"iconColumn\", null, \"string\", \"iconColumn\");\nMiniGantt.prototype.publish(\"colorColumn\", null, \"string\", \"colorColumn\");\nMiniGantt.prototype.publish(\"yOffsetColumn\", null, \"string\", \"yOffsetColumn\");\nMiniGantt.prototype.publish(\"maxZoom\", 16, \"number\", \"maxZoom\");\nMiniGantt.prototype.publish(\"eventGroupOffset\", -50, \"number\", \"eventGroupOffset\");\nMiniGantt.prototype.publish(\"eventGroupMod\", 5, \"number\", \"eventGroupMod\");\nMiniGantt.prototype.publish(\"eventFontColorColumn\", null, \"string\", \"eventFontColorColumn\");\nMiniGantt.prototype.publish(\"eventBorderColorColumn\", null, \"string\", \"eventBorderColorColumn\");\nMiniGantt.prototype.publish(\"eventBackgroundColorColumn\", null, \"string\", \"eventBackgroundColorColumn\");\nMiniGantt.prototype.publish(\"hideIconWhenCollapsed\", false, \"boolean\", \"hideIconWhenCollapsed\");\nMiniGantt.prototype.publish(\"hideTitleWhenCollapsed\", false, \"boolean\", \"hideTitleWhenCollapsed\");\nMiniGantt.prototype.publish(\"hideDescriptionWhenCollapsed\", false, \"boolean\", \"hideDescriptionWhenCollapsed\");\nMiniGantt.prototype.publish(\"hideAnnotationsWhenCollapsed\", true, \"boolean\", \"hideAnnotationsWhenCollapsed\");\nMiniGantt.prototype.publish(\"centerOnMostRecent\", false, \"boolean\", \"If true, the timeline will be centered on the most recent data point\");\n","import { d3Event, select as d3Select, SVGZoomWidget, Utility } from \"@hpcc-js/common\";\nimport { HTMLTooltip } from \"@hpcc-js/html\";\nimport { scaleLinear as d3ScaleLinear } from \"d3-scale\";\nimport { React, render, LabelledRect } from \"@hpcc-js/react\";\n\nexport type IGanttData = [string, number, number, any?];\n\nexport interface IRangeOptions {\n rangePadding: number;\n fontFamily: string;\n fontSize: number;\n strokeWidth?: number;\n fill: string;\n stroke: string;\n textFill: string;\n cornerRadius: number;\n}\n\nexport class ReactGantt extends SVGZoomWidget {\n\n protected _selection = new Utility.Selection(this);\n\n protected _buckets;\n protected _interpolateX;\n protected _interpolateY;\n\n protected _bucketsBySeries;\n protected _dataBySeries;\n protected _origIdxMap;\n private _seriesBackgrounds;\n\n protected _maxFontSize;\n\n public _tooltip;\n\n public _minStart: number;\n public _maxEnd: number;\n\n protected _title_idx = 0;\n protected _startDate_idx = 1;\n protected _endDate_idx = 2;\n protected _icon_idx = -1;\n protected _color_idx = -1;\n protected _series_idx = -1;\n protected _bucket_idx = -1;\n protected _yoffset_idx = -1;\n\n protected _maxX: number;\n protected _maxY: number;\n\n private _rangeOptions: IRangeOptions = {\n rangePadding: 2,\n fontFamily: \"Verdana\",\n fontSize: 12,\n fill: \"white\",\n stroke: \"black\",\n textFill: \"black\",\n cornerRadius: 3,\n strokeWidth: 0\n };\n\n constructor(drawStartPosition: \"origin\" | \"center\" = \"origin\") {\n super();\n this._drawStartPos = drawStartPosition;\n\n this.showToolbar_default(false);\n\n this._tooltip = new HTMLTooltip();\n this._tooltip\n .tooltipHTML(d => {\n return `<div style=\"text-align:center;\">${d[0]}<br/><br/>${d[1]} -> ${d[2]}</div>`;\n });\n this._tooltip\n .followCursor(true)\n ;\n }\n\n selection(_: any[]): this;\n selection(): any[];\n selection(_?: any[]): any[] | this {\n if (!arguments.length) return this._selection.get();\n this._selection.set(_);\n return this;\n }\n\n private _rangeRenderer: React.FunctionComponent = LabelledRect;\n rangeRenderer(): React.FunctionComponent;\n rangeRenderer(_: React.FunctionComponent): this;\n rangeRenderer(_?: React.FunctionComponent): this | React.FunctionComponent {\n if (!arguments.length) return this._rangeRenderer;\n this._rangeRenderer = _;\n return this._rangeRenderer;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n const context = this;\n element\n .on(\"click\", function (this: SVGElement, d) {\n context._selection.clear();\n });\n\n this._tooltip.target(domNode);\n }\n update(domNode, element) {\n super.update(domNode, element);\n\n this.zoomExtent([0.05, this.maxZoom()]);\n\n this._title_idx = this.titleColumn() !== null ? this.columns().indexOf(this.titleColumn()) : this._title_idx;\n this._startDate_idx = this.startDateColumn() !== null ? this.columns().indexOf(this.startDateColumn()) : this._startDate_idx;\n this._endDate_idx = this.endDateColumn() !== null ? this.columns().indexOf(this.endDateColumn()) : this._endDate_idx;\n this._icon_idx = this.iconColumn() !== null ? this.columns().indexOf(this.iconColumn()) : this._icon_idx;\n this._color_idx = this.colorColumn() !== null ? this.columns().indexOf(this.colorColumn()) : this._color_idx;\n this._series_idx = this.seriesColumn() !== null ? this.columns().indexOf(this.seriesColumn()) : this._series_idx;\n this._bucket_idx = this.bucketColumn() !== null ? this.columns().indexOf(this.bucketColumn()) : -1;\n\n const context = this;\n const w = this.width();\n\n const x0 = 0;\n const x1 = w;\n\n this._interpolateX = d3ScaleLinear()\n .domain([this._minStart, this._maxEnd])\n .range([x0, x1])\n ;\n\n this.data().sort((a, b) => a[1] - b[1]);\n\n if (this._series_idx > -1) {\n this._origIdxMap = {};\n this._dataBySeries = {};\n this._bucketsBySeries = {};\n this.data().forEach((dataRow, origIdx) => {\n const seriesKey = dataRow[this._series_idx];\n if (!this._dataBySeries[seriesKey]) {\n this._origIdxMap[seriesKey] = {};\n this._dataBySeries[seriesKey] = [];\n }\n this._dataBySeries[seriesKey].push({\n dataRow,\n origIdx\n });\n });\n const gutter = this.gutter();\n let bucketOffset = 0;\n const seriesKeys = Object.keys(this._dataBySeries);\n seriesKeys.forEach(seriesKey => {\n this._dataBySeries[seriesKey].sort((a, b) => a.dataRow[1] - b.dataRow[1]);\n this._bucketsBySeries[seriesKey] = this.calcBuckets(this._dataBySeries[seriesKey].map(n => n.dataRow), 1, 2);\n this._bucketsBySeries[seriesKey].bucketHeight = this.bucketHeight();\n this._bucketsBySeries[seriesKey].bucketOffset = bucketOffset;\n bucketOffset += (this._bucketsBySeries[seriesKey].bucketHeight + this.strokeWidth() + this.gutter()) * (this._bucketsBySeries[seriesKey].maxBucket + 1);\n this._dataBySeries[seriesKey].forEach((n, i) => {\n this._origIdxMap[seriesKey][n.origIdx] = i;\n });\n });\n this._seriesBackgrounds = this._renderElement.selectAll(\".series-background\")\n .data(seriesKeys.map(key => {\n return this._bucketsBySeries[key];\n }))\n ;\n this._seriesBackgrounds\n .join(\n enter => enter.append(\"rect\")\n .attr(\"class\", \"series-background\"),\n update => update,\n exit => exit\n .each(function (d) {\n delete d.element;\n })\n .remove()\n )\n .attr(\"opacity\", d => d.props && d.props.hidden ? 0 : 1)\n .each(function (this: SVGGElement, d, i) {\n d3Select(this)\n .attr(\"x\", 0)\n .attr(\"y\", d.bucketOffset - (gutter / 2))\n .attr(\"width\", w)\n .attr(\"height\", ((d.bucketHeight + gutter) * (d.maxBucket + 1)) + gutter)\n .attr(\"fill\", i % 2 ? context.oddSeriesBackground() : context.evenSeriesBackground())\n ;\n });\n } else {\n if (this._bucket_idx !== -1) {\n this._buckets = this.calcBuckets(this.data(), this._startDate_idx, this._endDate_idx, this._bucket_idx);\n } else {\n this._buckets = this.calcBuckets(this.data(), this._startDate_idx, this._endDate_idx);\n }\n }\n const interpedStart = this._interpolateX(this._minStart);\n\n this.zoomTo(\n [interpedStart, 0],\n 1\n );\n\n const bucketHeight = this.bucketHeight();\n\n this.setRangeOptions();\n\n this._maxFontScale = (bucketHeight - (this.rangePadding() * 2));\n this.measureDataText();\n\n const itemSelection = this._renderElement.selectAll(\".item\")\n .data(this.data())\n ;\n const borderOffset1 = this.strokeWidth();\n const borderOffset2 = borderOffset1 * 2;\n itemSelection\n .join(\n enter => enter.append(\"g\")\n .attr(\"class\", \"item\")\n .on(\"click.selectionBag\", function (d, i) {\n const _id = d.id === undefined ? i : d.id;\n if (context._selection.isSelected({ _id, element: d.element })) {\n context._selection.clear();\n } else {\n context._selection.click(\n {\n _id,\n element: () => d.element\n },\n d3Event\n );\n }\n context.selectionChanged();\n d3Event().stopPropagation();\n })\n .on(\"click\", function (this: SVGElement, d) {\n const selected = d.element.classed(\"selected\");\n if (d[context.columns().length]) {\n d.__lparam = d[context.columns().length];\n }\n context.click(d, \"\", selected);\n })\n .on(\"dblclick\", function (this: SVGElement, d) {\n const selected = d.element.classed(\"selected\");\n if (d[context.columns().length]) {\n d.__lparam = d[context.columns().length];\n }\n context.click(d, \"\", selected);\n })\n .on(\"mousein\", function (d) {\n context.highlightItem(d3Select(this), d);\n const selected = d.element.classed(\"selected\");\n context.mousein(d, \"\", selected);\n })\n .on(\"mouseover\", function (d) {\n const d3evt = d3Event();\n context._tooltip._triggerElement = d.element;\n context._tooltip._cursorLoc = [\n d3evt.clientX,\n d3evt.clientY\n ];\n context._tooltip\n .data(d)\n .visible(true)\n .fitContent(true)\n .render()\n ;\n context.highlightItem(d3Select(this), d);\n const selected = d.element.classed(\"selected\");\n context.mouseover(d, \"\", selected);\n })\n .on(\"mouseout\", function (d) {\n context._tooltip\n .visible(false)\n .render()\n ;\n context.highlightItem(null, null);\n const selected = d.element.classed(\"selected\");\n context.mouseout(d, \"\", selected);\n })\n .each(function (d, i) {\n d.that = this;\n d.element = d3Select(this);\n d.x = context._interpolateX(d[1]);\n const endX = context._interpolateX(d[2]);\n if (context._series_idx > -1) {\n const seriesKey = d[context._series_idx];\n const bucket = context._bucketsBySeries[seriesKey].bucketMap[context._origIdxMap[seriesKey][i]];\n d.y = context._bucketsBySeries[seriesKey].interpolateY(bucket) + context._bucketsBySeries[seriesKey].bucketOffset;\n } else {\n const _i = context._bucket_idx === -1 ? i : d[context._bucket_idx];\n d.y = context._buckets.interpolateY(context._buckets.bucketMap[_i]);\n }\n d.props = {\n ...d[3],\n text: d[0]\n };\n d.props.width = endX - d.x;\n d.props.height = bucketHeight;\n d.x += borderOffset1;\n d.y += borderOffset1;\n d.props.width -= borderOffset2;\n d.props.height -= borderOffset2;\n d.element.attr(\"transform\", `translate(${d.x + (d.props.width / 2)} ${d.y + (d.props.height / 2)})`);\n }),\n update => update,\n exit => exit\n .each(function (d) {\n delete d.element;\n })\n .remove()\n )\n .attr(\"opacity\", d => d.props && d.props.hidden ? 0 : 1)\n .each(function (this: SVGGElement, d, i) {\n d.that = this;\n if (context._series_idx > -1) {\n const seriesKey = d[context._series_idx];\n d.x = context.renderRangeElement(d, i, false, context._rangeOptions, seriesKey);\n } else {\n d.x = context.renderRangeElement(d, i, false, context._rangeOptions);\n }\n })\n .on(\"dblclick.zoom\", d => {\n const x1 = this._interpolateX(d[1]);\n const x2 = this._interpolateX(d[2]);\n const xRange = x2 - x1;\n const xScale = w / xRange;\n this.zoomTo(\n [\n -x1 * xScale,\n 0\n ],\n xScale\n );\n })\n ;\n element.on(\"dblclick.zoom\", null);\n }\n exit(domNode, element) {\n this._tooltip.target(null);\n super.exit(domNode, element);\n }\n renderRangeElement(d, i, transformEach = false, options: any = {}, seriesKey?: string) {\n const borderOffset1 = options.strokeWidth;\n const borderOffset2 = borderOffset1 * 2;\n const padding = options.rangePadding;\n let endX;\n const x = isNaN(this._transform.x) ? 0 : this._transform.x;\n const k = isNaN(this._transform.k) ? 1 : this._transform.k;\n let b;\n const bucketHeight = this.bucketHeight();\n d.that.setAttribute(\"data-series\", seriesKey);\n\n if (this._color_idx > -1) {\n d.that.setAttribute(\"data-color\", d[this._color_idx]);\n }\n\n if (seriesKey !== undefined) {\n b = this._bucketsBySeries[seriesKey].bucketMap[this._origIdxMap[seriesKey][i]];\n d.that.setAttribute(\"data-b\", b);\n d.that.setAttribute(\"data-bucketOffset\", this._bucketsBySeries[seriesKey].bucketOffset);\n d.y = this._bucketsBySeries[seriesKey].interpolateY(b) + this._bucketsBySeries[seriesKey].bucketOffset;\n d.that.setAttribute(\"data-dy\", d.y);\n } else {\n b = this._buckets.bucketMap[i];\n d.y = this._buckets.interpolateY(b);\n }\n if (this._color_idx > -1) {\n options.fill = d[this._color_idx];\n }\n if (!transformEach) {\n d.x = this._interpolateX(d[1]);\n endX = this._interpolateX(d[2]);\n d.props = {\n ...d[3],\n text: d[0]\n };\n d.props.width = (endX - d.x) / k;\n } else {\n d.x = this._interpolateX(d[1]) * k;\n endX = this._interpolateX(d[2]) * k;\n d.props = {\n ...d[3],\n text: d[0]\n };\n d.props.width = (endX - d.x) / k;\n d.x += x;\n d.props.width *= k;\n }\n d.props.height = bucketHeight;\n if (seriesKey === undefined && this._buckets.bucketScale < 1) {\n d.props.height = this._buckets.bucketScale * bucketHeight;\n }\n if (d.element === undefined && d.that) {\n d.element = d3Select(d.that);\n }\n d.element.attr(\"transform\", `translate(${d.x + (d.props.width / 2)} ${d.y + (d.props.height / 2)})`);\n\n d.x += borderOffset1;\n d.y += borderOffset1;\n d.props.width -= borderOffset2;\n d.props.height -= borderOffset2;\n d.props.width = d.props.width < 1 ? 1 : d.props.width;\n d.props.height = d.props.height < 1 ? 1 : d.props.height;\n\n let text = this.truncateText(d.props.text, d.props.width - padding, this._maxFontScale);\n\n if (text !== d.props.text) {\n text = this.truncateText(d.props.text, d.props.width - padding);\n } else {\n d.props.fontSize = this._maxFontScale * options.fontSize;\n }\n if (seriesKey === undefined && this._buckets.bucketScale < 1) {\n d.props.fontSize = Math.min(this._maxFontScale, this._buckets.bucketScale) * options.fontSize;\n }\n if (!this._maxY || this._maxY < d.y + d.props.height) {\n this._maxY = d.y + d.props.height;\n }\n if (!this._maxX || this._maxX < d.x + d.props.width) {\n this._maxX = d.x + d.props.width;\n }\n render(\n this._rangeRenderer,\n {\n ...options,\n ...d.props,\n text,\n },\n d.that\n );\n }\n\n setRangeOptions() {\n this._rangeOptions = {\n rangePadding: this.rangePadding(),\n fontFamily: this.fontFamily(),\n fontSize: this.fontSize(),\n strokeWidth: this.strokeWidth(),\n fill: this.fill(),\n stroke: this.stroke(),\n textFill: this.rangeFontColor(),\n cornerRadius: this.cornerRadius(),\n };\n }\n\n public _transform = { k: 1, x: 0, y: 0 };\n zoomed(transform) {\n this._transform = transform;\n switch (this.renderMode()) {\n case \"scale-all\":\n this._zoomScale = transform.k;\n this._zoomTranslate = [transform.x, 0];\n this._zoomG.attr(\"transform\", `translate(${transform.x} ${0})scale(${transform.k} 1)`);\n break;\n default:\n const options = this._rangeOptions;\n this.data().forEach((d, i) => {\n if (this._color_idx > -1) {\n options.fill = d[this._color_idx];\n }\n if (this._series_idx > -1) {\n const seriesKey = d[this._series_idx];\n this.renderRangeElement(d, i, true, options, seriesKey);\n } else {\n this.renderRangeElement(d, i, true, options);\n }\n });\n }\n\n this.zoomedHook(transform);\n }\n\n zoomedHook(transform) {\n\n }\n\n private calcBuckets(data, startKey: string | number, endKey: string | number, bucketKey?: string | number) {\n const bucketMap = {};\n const bucketKeyMap = {};\n const tol = this.overlapTolerence();\n const buckets = [{ end: -Infinity }];\n let maxBucket = 0;\n if (bucketKey !== undefined) {\n data.forEach((d, i) => {\n bucketMap[i] = d[bucketKey];\n bucketKeyMap[d[bucketKey]] = true;\n });\n maxBucket = Object.keys(bucketKeyMap).length;\n } else {\n data.forEach((d, i) => {\n for (let i2 = 0; i2 < buckets.length; ++i2) {\n if (i === 0 || buckets[i2][endKey] + tol <= d[startKey]) {\n bucketMap[i] = i2;\n if (maxBucket < i2) maxBucket = i2;\n buckets[i2][endKey] = d[endKey];\n break;\n }\n }\n if (bucketMap[i] === undefined) {\n bucketMap[i] = buckets.length;\n const b = {};\n b[endKey] = d[endKey];\n buckets.push(b as any);\n }\n\n if (maxBucket < bucketMap[i]) maxBucket = bucketMap[i];\n });\n }\n const height = (maxBucket + 1) * (this.bucketHeight() + this.gutter());\n return {\n bucketMap,\n maxBucket,\n bucketScale: this.height() / height,\n interpolateY: d3ScaleLinear()\n .domain([0, maxBucket + 1])\n .range([0, Math.min(this.height(), height)])\n };\n }\n\n data(): IGanttData[];\n data(_: IGanttData[]): this;\n data(_?: IGanttData[]): this | IGanttData[] {\n const retVal = super.data.apply(this, arguments);\n if (arguments.length > 0) {\n this._minStart = Math.min(...this.data().map(n => n[1])) ?? 0;\n this._maxEnd = Math.max(...this.data().map(n => n[2])) ?? 1;\n this.measureDataText(true);\n }\n return retVal;\n }\n\n protected _textWidths;\n protected _maxFontScale;\n protected _characterWidths;\n protected _prevFontFamily;\n protected _prevFontSize;\n measureDataText(forceMeasure = false) {\n const textWidths = {};\n const characterWidths = {};\n const fontFamily = this.fontFamily();\n const fontSize = this.fontSize();\n const bucketHeight = this.bucketHeight();\n\n if (bucketHeight) {\n this._maxFontScale = (bucketHeight - (this.rangePadding() * 2)) / fontSize;\n }\n\n if (forceMeasure || this._prevFontFamily !== fontFamily || this._prevFontSize !== fontSize) {\n characterWidths[\".\"] = Utility.textSize(\".\", fontFamily, fontSize).width;\n this.data().forEach(d => {\n if (!textWidths[d[0]]) {\n textWidths[d[0]] = Utility.textSize(d[0], fontFamily, fontSize).width;\n }\n d[0].split(\"\").forEach(char => {\n if (!characterWidths[char]) {\n characterWidths[char] = Utility.textSize(char, fontFamily, fontSize).width;\n }\n });\n });\n this._textWidths = textWidths;\n this._characterWidths = characterWidths;\n }\n this._prevFontFamily = fontFamily;\n this._prevFontSize = fontSize;\n }\n\n truncateText(text, width, scale = 1) {\n const textFits = this._textWidths[text] * scale < width;\n if (textFits) {\n return text;\n }\n let ret = \"\";\n let sum = 0;\n const _width = width - (this._characterWidths[\".\"] * 3);\n for (const char of text) {\n sum += this._characterWidths[char];\n if (sum < _width) {\n ret += char;\n } else {\n break;\n }\n }\n return _width < 0 ? \"\" : ret + \"...\";\n }\n\n resize(_size?: { width: number, height: number }) {\n let retVal;\n if (this.fitWidthToContent() || this.fitHeightToContent()) {\n retVal = super.resize.call(this, {\n width: _size.width,\n height: this._maxY\n });\n } else {\n retVal = super.resize.apply(this, arguments);\n }\n return retVal;\n }\n\n selectionChanged() {\n\n }\n\n highlightItem(_element, d) {\n\n }\n\n click(row, _col, sel) {\n\n }\n\n dblclick(row, _col, sel) {\n\n }\n\n mousein(row, _col, sel) {\n }\n\n mouseover(row, _col, sel) {\n }\n\n mouseout(row, _col, sel) {\n }\n}\nReactGantt.prototype._class += \" timeline_ReactGantt\";\n\nexport interface ReactGantt {\n titleColumn(): string;\n titleColumn(_: string): this;\n startDateColumn(): string;\n startDateColumn(_: string): this;\n endDateColumn(): string;\n endDateColumn(_: string): this;\n iconColumn(): string;\n iconColumn(_: string): this;\n colorColumn(): string;\n colorColumn(_: string): this;\n seriesColumn(): string;\n seriesColumn(_: string): this;\n bucketColumn(): string;\n bucketColumn(_: string): this;\n overlapTolerence(): number;\n overlapTolerence(_: number): this;\n smallestRangeWidth(): number;\n smallestRangeWidth(_: number): this;\n bucketHeight(): number;\n bucketHeight(_: number): this;\n gutter(): number;\n gutter(_: number): this;\n showToolbar_default(_: boolean): this;\n fontSize(): number;\n fontSize(_: number): this;\n fontFamily(): string;\n fontFamily(_: string): this;\n strokeWidth(): number;\n strokeWidth(_: number): this;\n stroke(): string;\n stroke(_: string): this;\n cornerRadius(): number;\n cornerRadius(_: number): this;\n fill(): string;\n fill(_: string): this;\n rangeFontColor(): string;\n rangeFontColor(_: string): this;\n rangePadding(): number;\n rangePadding(_: number): this;\n renderMode(): \"default\" | \"scale-all\";\n renderMode(_: \"default\" | \"scale-all\"): this;\n maxZoom(): number;\n maxZoom(_: number): this;\n fitWidthToContent(): boolean;\n fitWidthToContent(_: boolean): this;\n fitHeightToContent(): boolean;\n fitHeightToContent(_: boolean): this;\n evenSeriesBackground(): string;\n evenSeriesBackground(_: string): this;\n oddSeriesBackground(): string;\n oddSeriesBackground(_: string): this;\n}\n\nReactGantt.prototype.publish(\"fitWidthToContent\", false, \"boolean\", \"If true, resize will simply reapply the bounding box width\");\nReactGantt.prototype.publish(\"fitHeightToContent\", false, \"boolean\", \"If true, resize will simply reapply the bounding box height\");\nReactGantt.prototype.publish(\"titleColumn\", null, \"string\", \"Column name to for the title\");\nReactGantt.prototype.publish(\"startDateColumn\", null, \"string\", \"Column name to for the start date\");\nReactGantt.prototype.publish(\"endDateColumn\", null, \"string\", \"Column name to for the end date\");\nReactGantt.prototype.publish(\"iconColumn\", null, \"string\", \"Column name to for the icon\");\nReactGantt.prototype.publish(\"colorColumn\", null, \"string\", \"Column name to for the color\");\nReactGantt.prototype.publish(\"seriesColumn\", null, \"string\", \"Column name to for the series identifier\");\nReactGantt.prototype.publish(\"bucketColumn\", null, \"string\", \"Column name to for the bucket identifier\");\nReactGantt.prototype.publish(\"renderMode\", \"default\", \"set\", \"Render modes vary in features and performance\", [\"default\", \"scale-all\"]);\nReactGantt.prototype.publish(\"rangePadding\", 3, \"number\", \"Padding within each range rectangle (pixels)\");\nReactGantt.prototype.publish(\"fill\", \"#1f77b4\", \"string\", \"Background color of range rectangle\");\nReactGantt.prototype.publish(\"stroke\", null, \"string\", \"Color of range rectangle border\");\nReactGantt.prototype.publish(\"strokeWidth\", null, \"number\", \"Width of range rectangle border (pixels)\");\nReactGantt.prototype.publish(\"cornerRadius\", 3, \"number\", \"Space between range buckets (pixels)\");\nReactGantt.prototype.publish(\"fontFamily\", null, \"string\", \"Font family within range rectangle\", null, { optional: true });\nReactGantt.prototype.publish(\"fontSize\", 10, \"number\", \"Size of font within range rectangle (pixels)\");\nReactGantt.prototype.publish(\"rangeFontColor\", \"#ecf0f1\", \"html-color\", \"rangeFontColor\");\nReactGantt.prototype.publish(\"overlapTolerence\", 2, \"number\", \"overlapTolerence\");\nReactGantt.prototype.publish(\"smallestRangeWidth\", 10, \"number\", \"Width of the shortest range (pixels)\");\nReactGantt.prototype.publish(\"bucketHeight\", 100, \"number\", \"Max height of range element (pixels)\");\nReactGantt.prototype.publish(\"gutter\", 2, \"number\", \"Space between range buckets (pixels)\");\nReactGantt.prototype.publish(\"maxZoom\", 16, \"number\", \"Maximum zoom\");\nReactGantt.prototype.publish(\"evenSeriesBackground\", \"#FFFFFF\", \"html-color\", \"Background color of even series rows\");\nReactGantt.prototype.publish(\"oddSeriesBackground\", \"#DDDDDD\", \"html-color\", \"Background color of odd series rows\");\n","import { Axis } from \"@hpcc-js/chart\";\nimport { SVGWidget } from \"@hpcc-js/common\";\nimport { ReactGantt } from \"./ReactGantt.ts\";\n\nexport type IAxisGanttData = [string, number | string, number | string, any?] | any[];\n\nexport class ReactAxisGantt extends SVGWidget {\n\n protected _topAxis: Axis = new Axis(\"center\")\n .orientation(\"top\")\n .type(\"linear\")\n .shrinkToFit(\"none\")\n .overlapMode(\"hide\")\n .extend(0)\n .tickFormat(\"d\")\n ;\n protected _gantt: ReactGantt = new ReactGantt(\"center\")\n .stroke(\"#000000\")\n ;\n protected _bottomAxis: Axis = new Axis(\"center\")\n .orientation(\"bottom\")\n .type(\"linear\")\n .shrinkToFit(\"none\")\n .overlapMode(\"hide\")\n .extend(0)\n .tickFormat(\"d\")\n ;\n\n protected _topAxisElement;\n protected _contentElement;\n protected _bottomAxisElement;\n protected _topRect;\n protected _contentRect;\n protected _bottomRect;\n\n protected rangeRenderer;\n\n constructor() {\n super();\n this._drawStartPos = \"origin\";\n this.rangeRenderer = function () {\n const ret = this._gantt.rangeRenderer.apply(this._gantt, arguments);\n if (!arguments.length) return ret;\n return this;\n };\n }\n\n selection(_: any[]): this;\n selection(): any[];\n selection(_?: any[]): any[] | this {\n if (!arguments.length) return this._gantt.selection();\n this._gantt.selection(_);\n return this;\n }\n\n resizeWrappers() {\n\n const w = this.width();\n const h = this.height();\n\n const axisHeight = this.axisHeight(); //TODO: Dynamic scaling to allow for small resolutions?\n\n const contentHeight = (h - (axisHeight * 2));\n const borderOffset1 = this.strokeWidth();\n this._topRect\n .attr(\"height\", axisHeight)\n .attr(\"width\", w)\n .attr(\"fill\", \"transparent\")\n ;\n this._topAxisElement.attr(\"transform\", \"translate(0 0)\");\n this._topAxis.resize({ height: axisHeight, width: w });\n this._contentRect\n .attr(\"height\", contentHeight)\n .attr(\"width\", w)\n .attr(\"fill\", \"transparent\")\n ;\n this._contentElement.attr(\"transform\", `translate(0 ${axisHeight + borderOffset1})`);\n this._gantt.resize({ height: contentHeight, width: w });\n this._bottomRect\n .attr(\"height\", axisHeight)\n .attr(\"width\", w)\n .attr(\"fill\", \"transparent\")\n ;\n this._bottomAxisElement.attr(\"transform\", `translate(0 ${axisHeight + contentHeight + borderOffset1})`);\n this._bottomAxis.resize({ height: axisHeight, width: w });\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n this._gantt.click = (row, col, sel) => {\n this.click(row, col, sel);\n };\n\n this._gantt.dblclick = (row, col, sel) => {\n this.dblclick(row, col, sel);\n };\n\n this._topAxisElement = element.append(\"g\")\n .attr(\"class\", \"top-axis-wrapper\")\n ;\n this._topRect = this._topAxisElement.append(\"rect\")\n .attr(\"class\", \"top-axis-rect\")\n ;\n this._contentElement = element.append(\"g\")\n .attr(\"class\", \"content-wrapper\")\n ;\n this._contentRect = this._contentElement.append(\"rect\")\n .attr(\"class\", \"content-rect\")\n ;\n this._bottomAxisElement = element.append(\"g\")\n .attr(\"class\", \"bottom-axis-wrapper\")\n ;\n this._bottomRect = this._bottomAxisElement.append(\"rect\")\n .attr(\"class\", \"top-axis-rect\")\n ;\n this._topAxis.target(this._topAxisElement.node());\n this._gantt.target(this._contentElement.node()).bucketHeight(30);\n this._bottomAxis.target(this._bottomAxisElement.node());\n\n this.resizeWrappers();\n\n this._gantt.zoomedHook = (transform) => {\n this.onzoom(transform);\n };\n }\n\n onzoom(transform) {\n\n const w = this.width();\n const low = this._gantt._minStart;\n const high = this._gantt._maxEnd;\n const range = high - low;\n const wpp = range / w;\n const nextLow = Math.floor(low - (wpp * (transform.x / transform.k)));\n const nextHigh = Math.ceil((range / transform.k) + nextLow);\n\n this._topAxis\n .fontFamily(this.axisFontFamily())\n .fontSize(this.axisFontSize())\n .tickLength(this.axisTickLength())\n .low(nextLow)\n .high(nextHigh)\n .render()\n ;\n this._bottomAxis\n .fontFamily(this.axisFontFamily())\n .fontSize(this.axisFontSize())\n .tickLength(this.axisTickLength())\n .low(nextLow)\n .high(nextHigh)\n .render()\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._topAxis.tickFormat(this.tickFormat()).render();\n this._bottomAxis.tickFormat(this.tickFormat()).render();\n this._gantt.render();\n }\n\n exit(domNode, element) {\n this._bottomAxis.target(null);\n this._gantt.target(null);\n this._topAxis.target(null);\n super.exit(domNode, element);\n }\n\n columns(): string[];\n columns(_: string[]): this;\n columns(_?: string[]): this | string[] {\n const retVal = super.columns.apply(this, arguments);\n if (arguments.length > 0) {\n this._gantt.columns(_);\n }\n return retVal;\n }\n\n data(): IAxisGanttData[];\n data(_: IAxisGanttData[]): this;\n data(_?: IAxisGanttData[]): this | IAxisGanttData[] {\n const retVal = super.data.apply(this, arguments);\n if (arguments.length > 0) {\n const ganttData: any[] = this.data().map(n => {\n const ret = [...n];\n ret[1] = isNaN(n[1] as any) ? new Date(n[1]).getTime() : Number(n[1]);\n ret[2] = isNaN(n[2] as any) ? new Date(n[2]).getTime() : Number(n[2]);\n return ret;\n });\n this._gantt._minStart = Math.min(...ganttData.map(n => n[1])) ?? 0;\n this._gantt._maxEnd = Math.max(...ganttData.map(n => n[2])) ?? 1;\n this._gantt.data(ganttData);\n }\n return retVal;\n }\n\n resize(_size?: { width: number, height: number }) {\n const retVal = super.resize.apply(this, arguments);\n\n if (this._topAxisElement) {\n this.resizeWrappers();\n }\n\n return retVal;\n }\n\n click(row, col, sel) {\n\n }\n\n dblclick(row, col, sel) {\n\n }\n\n tooltip() {\n return this._gantt._tooltip;\n }\n}\nReactAxisGantt.prototype._class += \" timeline_ReactAxisGantt\";\n\nexport interface ReactAxisGantt {\n tickFormat(): string;\n tickFormat(_: string): this;\n tickFormat_exists(): boolean;\n overlapTolerence(): number;\n overlapTolerence(_: number): this;\n smallestRangeWidth(): number;\n smallestRangeWidth(_: number): this;\n scaleMode(): boolean;\n scaleMode(_: boolean): this;\n fontSize(): number;\n fontSize(_: number): this;\n fontFamily(): string;\n fontFamily(_: string): this;\n strokeWidth(): number;\n strokeWidth(_: number): this;\n stroke(): string;\n stroke(_: string): this;\n cornerRadius(): number;\n cornerRadius(_: number): this;\n axisFontSize(): number;\n axisFontSize(_: number): this;\n axisFontFamily(): string;\n axisFontFamily(_: string): this;\n axisTickLength(): number;\n axisTickLength(_: number): this;\n axisHeight(): number;\n axisHeight(_: number): this;\n titleColumn(): string;\n titleColumn(_: string): this;\n startDateColumn(): string;\n startDateColumn(_: string): this;\n endDateColumn(): string;\n endDateColumn(_: string): this;\n iconColumn(): string;\n iconColumn(_: string): this;\n colorColumn(): string;\n colorColumn(_: string): this;\n bucketColumn(): string;\n bucketColumn(_: string): this;\n maxZoom(): number;\n maxZoom(_: number): this;\n}\nReactAxisGantt.prototype.publish(\"tickFormat\", null, \"string\", \"Format rule applied to axis tick labels\", undefined, { optional: true });\nReactAxisGantt.prototype.publish(\"axisHeight\", 22, \"number\", \"Height of axes (pixels)\");\nReactAxisGantt.prototype.publish(\"overlapTolerence\", 2, \"number\", \"overlapTolerence\");\nReactAxisGantt.prototype.publish(\"smallestRangeWidth\", 10, \"number\", \"Width of the shortest range (pixels)\");\nReactAxisGantt.prototype.publish(\"axisFontSize\", null, \"number\", \"Font size of axis tick labels\");\nReactAxisGantt.prototype.publish(\"axisFontFamily\", null, \"string\", \"Font family of axis tick labels\");\nReactAxisGantt.prototype.publish(\"axisTickLength\", null, \"number\", \"Length of axis ticks\");\nReactAxisGantt.prototype.publishProxy(\"gutter\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"renderMode\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"strokeWidth\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"fontSize\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"fontFamily\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"stroke\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"cornerRadius\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"titleColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"startDateColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"endDateColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"iconColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"colorColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"bucketColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"maxZoom\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"bucketHeight\", \"_gantt\");\n","import { min as d3Min, max as d3Max } from \"d3-array\";\nimport { Axis } from \"@hpcc-js/chart\";\nimport { Border2 } from \"@hpcc-js/layout\";\nimport { React } from \"@hpcc-js/react\";\nimport { ReactGantt } from \"./ReactGantt.ts\";\nimport { IAxisGanttData } from \"./ReactAxisGantt.ts\";\n\nexport class ReactAxisGanttSeries extends Border2 {\n\n protected _topAxis: Axis = new Axis(\"origin\")\n .orientation(\"top\")\n .type(\"linear\")\n .shrinkToFit(\"none\")\n .overlapMode(\"hide\")\n .extend(0)\n .tickFormat(\"d\")\n ;\n protected _gantt: ReactGantt = new ReactGantt(\"origin\")\n .stroke(\"#000000\")\n .fitHeightToContent(true)\n ;\n protected _bottomAxis: Axis = new Axis(\"origin\")\n .orientation(\"bottom\")\n .type(\"linear\")\n .shrinkToFit(\"none\")\n .overlapMode(\"hide\")\n .extend(0)\n .tickFormat(\"d\")\n ;\n\n protected _topAxisElement;\n protected _contentElement;\n protected _bottomAxisElement;\n protected _topRect;\n protected _contentRect;\n protected _bottomRect;\n\n constructor() {\n super();\n this.centerOverflowX_default(\"hidden\");\n this.centerOverflowY_default(\"auto\");\n }\n\n selection(_: any[]): this;\n selection(): any[];\n selection(_?: any[]): any[] | this {\n if (!arguments.length) return this._gantt.selection();\n this._gantt.selection(_);\n return this;\n }\n\n rangeRenderer(): React.FunctionComponent;\n rangeRenderer(_: React.FunctionComponent): this;\n rangeRenderer(_?: React.FunctionComponent): this | React.FunctionComponent {\n const ret = this._gantt.rangeRenderer.apply(this._gantt, arguments);\n if (!arguments.length) return ret;\n return this;\n }\n\n resizeWrappers() {\n\n const w = this.width();\n const h = this.height();\n\n const axisHeight = this.axisHeight(); //TODO: Dynamic scaling to allow for small resolutions?\n const contentHeight = (h - (axisHeight * 2));\n\n this.bottomHeight(axisHeight);\n\n this._topWA.resize({\n width: w,\n height: axisHeight\n });\n this._centerWA.resize({\n width: w,\n height: contentHeight\n });\n this._bottomWA.resize({\n width: w,\n height: axisHeight\n });\n this.top().render();\n this.bottom().render();\n this.center().render();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n this._gantt.click = (row, col, sel) => {\n this.click(row, col, sel);\n };\n\n this._gantt.dblclick = (row, col, sel) => {\n this.dblclick(row, col, sel);\n };\n\n this.top(this._topAxis);\n this.center(this._gantt);\n this.bottom(this._bottomAxis);\n\n this.resizeWrappers();\n\n this._gantt.zoomedHook = (transform) => {\n this.onzoom(transform);\n };\n }\n\n onzoom(transform) {\n const w = this.width();\n const low = this._gantt._minStart;\n const high = this._gantt._maxEnd;\n const range = high - low;\n const wpp = range / w;\n const nextLow = Math.floor(low - (wpp * (transform.x / transform.k)));\n const nextHigh = Math.ceil((range / transform.k) + nextLow);\n\n this._topAxis\n .fontFamily(this.axisFontFamily())\n .fontSize(this.axisFontSize())\n .tickLength(this.axisTickLength())\n .low(nextLow)\n .high(nextHigh)\n .lazyRender()\n ;\n this._bottomAxis\n .fontFamily(this.axisFontFamily())\n .fontSize(this.axisFontSize())\n .tickLength(this.axisTickLength())\n .low(nextLow)\n .high(nextHigh)\n .lazyRender()\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._topAxis.tickFormat(this.tickFormat()).render();\n this._bottomAxis.tickFormat(this.tickFormat()).render();\n this._gantt.render();\n }\n\n columns(): string[];\n columns(_: string[]): this;\n columns(_?: string[]): this | string[] {\n const retVal = super.columns.apply(this, arguments);\n if (arguments.length > 0) {\n this._gantt.columns(_);\n }\n return retVal;\n }\n\n data(): IAxisGanttData[];\n data(_: IAxisGanttData[]): this;\n data(_?: IAxisGanttData[]): this | IAxisGanttData[] {\n const retVal = super.data.apply(this, arguments);\n if (arguments.length > 0) {\n const ganttData: any[] = this.data().map(n => {\n const ret = [...n];\n ret[1] = isNaN(n[1] as any) ? new Date(n[1]).getTime() : Number(n[1]);\n ret[2] = isNaN(n[2] as any) ? new Date(n[2]).getTime() : Number(n[2]);\n return ret;\n });\n\n this._gantt._minStart = d3Min(ganttData, n => n[1]);\n this._gantt._maxEnd = d3Max(ganttData, n => n[2]);\n this._gantt.data(ganttData);\n }\n return retVal;\n }\n\n resize(_size?: { width: number, height: number }) {\n const retVal = super.resize.apply(this, arguments);\n\n if (this._topAxisElement) {\n this.resizeWrappers();\n }\n\n return retVal;\n }\n\n click(row, col, sel) {\n\n }\n\n dblclick(row, col, sel) {\n\n }\n\n tooltip() {\n return this._gantt._tooltip;\n }\n}\nReactAxisGanttSeries.prototype._class += \" timeline_ReactAxisGanttSeries\";\n\nexport interface ReactAxisGanttSeries {\n tickFormat(): string;\n tickFormat(_: string): this;\n tickFormat_exists(): boolean;\n overlapTolerence(): number;\n overlapTolerence(_: number): this;\n smallestRangeWidth(): number;\n smallestRangeWidth(_: number): this;\n scaleMode(): boolean;\n scaleMode(_: boolean): this;\n fontSize(): number;\n fontSize(_: number): this;\n fontFamily(): string;\n fontFamily(_: string): this;\n strokeWidth(): number;\n strokeWidth(_: number): this;\n stroke(): string;\n stroke(_: string): this;\n cornerRadius(): number;\n cornerRadius(_: number): this;\n axisFontSize(): number;\n axisFontSize(_: number): this;\n axisFontFamily(): string;\n axisFontFamily(_: string): this;\n axisTickLength(): number;\n axisTickLength(_: number): this;\n axisHeight(): number;\n axisHeight(_: number): this;\n titleColumn(): string;\n titleColumn(_: string): this;\n startDateColumn(): string;\n startDateColumn(_: string): this;\n endDateColumn(): string;\n endDateColumn(_: string): this;\n iconColumn(): string;\n iconColumn(_: string): this;\n colorColumn(): string;\n colorColumn(_: string): this;\n seriesColumn(): string;\n seriesColumn(_: string): this;\n bucketColumn(): string;\n bucketColumn(_: string): this;\n maxZoom(): number;\n maxZoom(_: number): this;\n}\nReactAxisGanttSeries.prototype.publish(\"tickFormat\", null, \"string\", \"Format rule applied to axis tick labels\", undefined, { optional: true });\nReactAxisGanttSeries.prototype.publish(\"axisHeight\", 22, \"number\", \"Height of axes (pixels)\");\nReactAxisGanttSeries.prototype.publish(\"overlapTolerence\", 2, \"number\", \"overlapTolerence\");\nReactAxisGanttSeries.prototype.publish(\"smallestRangeWidth\", 10, \"number\", \"Width of the shortest range (pixels)\");\nReactAxisGanttSeries.prototype.publish(\"axisFontSize\", null, \"number\", \"Font size of axis tick labels\");\nReactAxisGanttSeries.prototype.publish(\"axisFontFamily\", null, \"string\", \"Font family of axis tick labels\");\nReactAxisGanttSeries.prototype.publish(\"axisTickLength\", null, \"number\", \"Length of axis ticks\");\nReactAxisGanttSeries.prototype.publishProxy(\"gutter\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"renderMode\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"strokeWidth\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"fontSize\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"fontFamily\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"stroke\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"cornerRadius\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"titleColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"startDateColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"endDateColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"iconColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"colorColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"seriesColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"bucketColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"maxZoom\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"evenSeriesBackground\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"oddSeriesBackground\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"bucketHeight\", \"_gantt\");\n","import { timeFormat as d3TimeFormat, timeParse as d3TimeParse } from \"d3-time-format\";\nimport { ReactAxisGantt } from \"./ReactAxisGantt.ts\";\n\nexport class ReactTimeline extends ReactAxisGantt {\n\n protected _axisLabelFormatter;//TODO: add a type to this? d3 time formatting function type?\n\n constructor() {\n super();\n this._drawStartPos = \"origin\";\n this._topAxis.type(\"time\");\n this._bottomAxis.type(\"time\");\n\n this.tooltipHTML((d: any) => {\n const parser = d3TimeParse(\"%Q\");\n const startTime = parser(d[1]);\n const endTime = parser(d[2]);\n\n const formatter = d3TimeFormat(this.tooltipTimeFormat());\n return `<div style=\"text-align:center;\">${d[0]}<br/><br/>${formatter(startTime)} -> ${formatter(endTime)}</div>`;\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n if (this.timePattern_exists()) {\n\n let minTimestamp = Infinity;\n let maxTimestamp = -Infinity;\n let lowDateStr = \"\";\n let highDateStr = \"\";\n this.data().map(n => {\n const start = new Date(n[1]).getTime();\n const end = new Date(n[2]).getTime();\n if (minTimestamp > start) {\n minTimestamp = start;\n lowDateStr = \"\" + n[1];\n }\n if (maxTimestamp < end) {\n maxTimestamp = end;\n highDateStr = \"\" + n[2];\n }\n });\n\n const axisTickFormat = this._axisLabelFormatter\n ? this._axisLabelFormatter\n : (this.tickFormat_exists && this.tickFormat_exists() ? this.tickFormat() : undefined);\n\n this._topAxis\n .type(\"time\")\n .timePattern(this.timePattern())\n .overlapMode(\"none\")\n .low(lowDateStr)\n .high(highDateStr)\n ;\n this._bottomAxis\n .type(\"time\")\n .timePattern(this.timePattern())\n .overlapMode(\"none\")\n .low(lowDateStr)\n .high(highDateStr)\n ;\n\n if (axisTickFormat) {\n this._topAxis.tickFormat(axisTickFormat);\n this._bottomAxis.tickFormat(axisTickFormat);\n } else {\n this._topAxis.tickFormat_reset();\n this._bottomAxis.tickFormat_reset();\n }\n this._gantt._minStart = minTimestamp;\n this._gantt._maxEnd = maxTimestamp;\n }\n }\n\n tooltipHTML(callback) {\n this._tooltipHTML = callback;\n this.tooltip().tooltipHTML(this._tooltipHTML);\n return this;\n }\n\n parseAxisValue(v) {\n const parseTime = d3TimeParse(\"%Q\");\n const parsedTime = parseTime(v);\n\n const formatTime = d3TimeFormat(this.timePattern());\n return formatTime(parsedTime);\n }\n\n onzoom(transform) {\n\n const w = this.width();\n const low = this._gantt._minStart;\n const high = this._gantt._maxEnd;\n const range = high - low;\n const wpp = range / w;\n const nextLow = Math.floor(low - (wpp * (transform.x / transform.k)));\n const nextHigh = Math.ceil((range / transform.k) + nextLow);\n\n this._topAxis\n .low(this.parseAxisValue(nextLow))\n .high(this.parseAxisValue(nextHigh))\n .render()\n ;\n this._bottomAxis\n .low(this.parseAxisValue(nextLow))\n .high(this.parseAxisValue(nextHigh))\n .render()\n ;\n }\n}\nReactTimeline.prototype._class += \" timeline_ReactTimeline\";\n\nexport interface ReactTimeline {\n _tooltipHTML(_): string;\n\n timePattern(): string;\n timePattern(_: string): this;\n timePattern_exists(): boolean;\n tooltipTimeFormat(): string;\n tooltipTimeFormat(_: string): this;\n}\nReactTimeline.prototype.publish(\"timePattern\", \"%Y-%m-%d\", \"string\", \"Time pattern used for parsing datetime strings on each data row\", null, { optional: true });\nReactTimeline.prototype.publish(\"tooltipTimeFormat\", \"%Y-%m-%d\", \"string\", \"Time format used in the default html tooltip\");\n\n","import { timeFormat as d3TimeFormat, timeParse as d3TimeParse } from \"d3-time-format\";\nimport { ReactAxisGanttSeries } from \"./ReactAxisGanttSeries.ts\";\n\nconst parseTime = d3TimeParse(\"%Q\");\nexport class ReactTimelineSeries extends ReactAxisGanttSeries {\n\n protected _axisLabelFormatter;//TODO: add a type to this? d3 time formatting function type?\n\n constructor() {\n super();\n this._topAxis.type(\"time\");\n this._bottomAxis.type(\"time\");\n\n this.tooltipHTML((d: any) => {\n const startTime = parseTime(d[1]);\n const endTime = parseTime(d[2]);\n\n const formatter = d3TimeFormat(this.tooltipTimeFormat());\n return `<div style=\"text-align:center;\">${d[0]}<br/><br/>${formatter(startTime)} -> ${formatter(endTime)}</div>`;\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n if (this.timePattern_exists()) {\n\n let minTimestamp = Infinity;\n let maxTimestamp = -Infinity;\n let lowDateStr = \"\";\n let highDateStr = \"\";\n this.data().forEach(n => {\n const start = new Date(n[1]).getTime();\n const end = new Date(n[2]).getTime();\n if (minTimestamp > start) {\n minTimestamp = start;\n lowDateStr = \"\" + n[1];\n }\n if (maxTimestamp < end) {\n maxTimestamp = end;\n highDateStr = \"\" + n[2];\n }\n });\n\n const axisTickFormat = this._axisLabelFormatter\n ? this._axisLabelFormatter\n : (this.tickFormat_exists && this.tickFormat_exists() ? this.tickFormat() : undefined);\n\n this._topAxis\n .type(\"time\")\n .timePattern(this.timePattern())\n .overlapMode(\"none\")\n .low(lowDateStr)\n .high(highDateStr)\n ;\n this._bottomAxis\n .type(\"time\")\n .timePattern(this.timePattern())\n .overlapMode(\"none\")\n .low(lowDateStr)\n .high(highDateStr)\n ;\n\n if (axisTickFormat) {\n this._topAxis.tickFormat(axisTickFormat);\n this._bottomAxis.tickFormat(axisTickFormat);\n } else {\n this._topAxis.tickFormat_reset();\n this._bottomAxis.tickFormat_reset();\n }\n this._gantt._minStart = minTimestamp;\n this._gantt._maxEnd = maxTimestamp;\n }\n }\n\n tooltipHTML(callback) {\n this._tooltipHTML = callback;\n this.tooltip().tooltipHTML(this._tooltipHTML);\n return this;\n }\n\n parseAxisValue(v) {\n const parsedTime = parseTime(v);\n\n const formatTime = d3TimeFormat(this.timePattern());\n return formatTime(parsedTime);\n }\n\n onzoom(transform) {\n\n const w = this.width();\n const low = this._gantt._minStart;\n const high = this._gantt._maxEnd;\n const range = high - low;\n const wpp = range / w;\n const nextLow = Math.floor(low - (wpp * (transform.x / transform.k)));\n const nextHigh = Math.ceil((range / transform.k) + nextLow);\n\n this._topAxis\n .low(this.parseAxisValue(nextLow))\n .high(this.parseAxisValue(nextHigh))\n .render()\n ;\n this._bottomAxis\n .low(this.parseAxisValue(nextLow))\n .high(this.parseAxisValue(nextHigh))\n .render()\n ;\n }\n\n _tooltipHTML: (_) => string;\n}\nReactTimelineSeries.prototype._class += \" timeline_ReactTimelineSeries\";\n\nexport interface ReactTimelineSeries {\n timePattern(): string;\n timePattern(_: string): this;\n timePattern_exists(): boolean;\n tooltipTimeFormat(): string;\n tooltipTimeFormat(_: string): this;\n}\nReactTimelineSeries.prototype.publish(\"timePattern\", \"%Y-%m-%d\", \"string\", \"Time pattern used for parsing datetime strings on each data row\", null, { optional: true });\nReactTimelineSeries.prototype.publish(\"tooltipTimeFormat\", \"%Y-%m-%d\", \"string\", \"Time format used in the default html tooltip\");\n\n"],"mappings":"qnCCUA,IAAa,EAAb,cAA+B,EAAA,UAC3B,OACA,OACA,cACA,MACA,cACA,WACA,eACA,WACA,cACA,WAAA,EAAA,EAAA,SACA,gBAAA,EAAA,EAAA,SACA,iBACA,WAEA,WACA,WAAuB,EACvB,eAA2B,EAC3B,aAAyB,EACzB,WAAsB,EACtB,YAAuB,EACvB,cAAyB,EAEzB,WAAA,GACI,QACA,EAAA,SAAS,KAAK,MACd,EAAA,QAAQ,qBAAqB,KAAK,MAElC,KAAK,cAAgB,SACrB,KAAK,YAAa,GAAW,WAAW,EAAE,KAAK,2BAA2B,KAAK,iBAAiB,KAAK,OAAO,MAAM,EAAE,KAAK,wBAAwB,KAAK,iBAAiB,KAAK,OAAO,MAAM,EAAE,KAAK,mBAEhM,KAAK,QAAS,IAAI,EAAA,MACb,KAAK,QAEV,KAAK,QAAS,IAAI,EAAA,MACb,KAAK,QAEV,KAAK,eAAA,EAAA,EAAA,aACA,aAAa,IACb,aAAa,IAItB,YAAA,GACI,MAA8B,eAAvB,KAAK,cAGhB,UAAA,GAEI,OAAA,EAAA,EAAA,QADa,IAAI,KAAK,OAAO,IAAI,GAAK,EAAE,KAAK,oBAAqB,KAAK,OAAO,OAAO,KAAO,EAAE,KAAK,eAAe,IAAI,GAAK,EAAE,KAAK,iBAItI,MAAA,GACI,MAAM,EAAS,KAAK,WAAa,CAAC,KAAK,WAAW,GAAI,KAAK,WAAW,IAAM,KAAK,aACjF,QAAkB,IAAd,EAAO,SAAkC,IAAd,EAAO,KAC9B,EAAO,KAAO,EAAO,IAAM,KAAK,sBAAsB,CACtD,MAAM,GAAA,EAAA,EAAA,WAAqB,KAAK,eAC1B,GAAA,EAAA,EAAA,YAAyB,KAAK,eAC9B,EAAQ,EAAO,EAAO,IACtB,EAAQ,EAAO,EAAO,IAC5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AQ,EACd,EAAU,KAAK,MAAM,EAAO,GAAO,EAAU,EAAI,EAAU,IAC3D,EAAW,KAAK,KAAM,EAAQ,EAAU,EAAK,GAEnD,KAAK,SACA,IAAI,KAAK,eAAe,IACxB,KAAK,KAAK,eAAe,IACzB,SAEL,KAAK,YACA,IAAI,KAAK,eAAe,IACxB,KAAK,KAAK,eAAe,IACzB,SAIT,cAEJ,EAAoB,UAAU,QAAU,gCASxC,EAAoB,UAAU,QAAQ,cAAe,WAAY,SAAU,kEAAmE,KAAM,CAAE,UAAU,IAChK,EAAoB,UAAU,QAAQ,oBAAqB,WAAY,SAAU,gENxHpD,kCAFL,kCACG"}
|
|
1
|
+
{"version":3,"file":"index.umd.cjs","sources":["../src/__package__.ts","../src/MiniGantt.ts","../src/ReactGantt.ts","../src/ReactAxisGantt.ts","../src/ReactAxisGanttSeries.ts","../src/ReactTimeline.ts","../src/ReactTimelineSeries.ts"],"sourcesContent":["export const PKG_NAME = \"__PACKAGE_NAME__\";\nexport const PKG_VERSION = \"__PACKAGE_VERSION__\";\nexport const BUILD_VERSION = \"__BUILD_VERSION__\";\n","import { ITooltip } from \"@hpcc-js/api\";\nimport { Axis } from \"@hpcc-js/chart\";\nimport { d3Event, EntityPin, EntityRect, local as d3Local, select as d3Select, SVGWidget, Utility } from \"@hpcc-js/common\";\nimport { extent as d3Extent } from \"d3-array\";\nimport { scaleBand as d3ScaleBand } from \"d3-scale\";\nimport { timeFormat as d3TimeFormat, timeParse as d3TimeParse } from \"d3-time-format\";\nimport { zoom as d3Zoom, zoomIdentity as d3ZoomIdentity } from \"d3-zoom\";\n\nimport \"../src/MiniGantt.css\";\n\nexport class MiniGantt extends SVGWidget {\n protected tlAxis: Axis;\n protected brAxis: Axis;\n protected verticalBands;\n protected _zoom;\n protected gUpperContent;\n protected gUpperAxis;\n protected gMiddleContent;\n protected gLowerAxis;\n protected gLowerContent;\n private localRect = d3Local<EntityRect>();\n private localEntityPin = d3Local<EntityPin>();\n private tooltipFormatter: (date: Date) => string;\n private _dateCache;\n\n protected rootExtent;\n protected _title_idx = 0;\n protected _startDate_idx = 1;\n protected _endDate_idx = 2;\n protected _icon_idx = -1;\n protected _color_idx = -1;\n protected _yoffset_idx = -1;\n\n constructor() {\n super();\n ITooltip.call(this);\n Utility.SimpleSelectionMixin.call(this);\n\n this._drawStartPos = \"origin\";\n this.tooltipHTML((d: any) => `<center>${d[this._title_idx]}</center><br>${this.tooltipFormatter(this.brAxis.parse(d[this._startDate_idx]))} -> ${this.tooltipFormatter(this.brAxis.parse(d[this._endDate_idx]))}`);\n\n this.tlAxis = new Axis()\n .type(\"time\")\n ;\n this.brAxis = new Axis()\n .type(\"time\")\n ;\n this.verticalBands = d3ScaleBand()\n .paddingOuter(0.2)\n .paddingInner(0.2)\n ;\n }\n\n isHorizontal(): boolean {\n return this.orientation() === \"horizontal\";\n }\n\n fullExtent() {\n const data = [...this.data().map(d => d[this._startDate_idx]), ...this.data().filter(d => !!d[this._endDate_idx]).map(d => d[this._endDate_idx])];\n return d3Extent(data);\n }\n\n extent() {\n const extent = this.rootExtent ? [this.rootExtent[1], this.rootExtent[2]] : this.fullExtent();\n if (extent[0] !== undefined && extent[1] !== undefined) {\n if (extent[0] === extent[1] || this.centerOnMostRecent()) {\n const parser = d3TimeParse(this.timePattern());\n const formatter = d3TimeFormat(this.timePattern());\n const date1 = parser(extent[0]);\n const date2 = parser(extent[1]);\n if (extent[0] === extent[1]) {\n extent[0] = formatter(new Date(date1.setFullYear(date1.getFullYear() - 1)));\n extent[1] = formatter(new Date(date1.setFullYear(date1.getFullYear() + 2)));\n } else {\n const time1 = date1.getTime();\n const timeDiff = date2.getTime() - time1;\n extent[0] = formatter(date1);\n extent[1] = formatter(new Date(time1 + (timeDiff * 2)));\n }\n }\n }\n return extent;\n }\n\n dataStartPos(d) {\n if (typeof this._dateCache[d[this._startDate_idx]] !== \"undefined\") {\n return this._dateCache[d[this._startDate_idx]];\n }\n const pos = this.brAxis.scalePos(d[this._startDate_idx]);\n this._dateCache[d[this._startDate_idx]] = pos;\n return pos;\n }\n\n dataEndPos(d) {\n if (typeof this._dateCache[d[this._endDate_idx]] !== \"undefined\") {\n return this._dateCache[d[this._endDate_idx]];\n }\n const pos = this.brAxis.scalePos(d[this._endDate_idx]);\n this._dateCache[d[this._endDate_idx]] = pos;\n return pos;\n }\n\n dataWidth(d) {\n return this.dataEndPos(d) - this.dataStartPos(d);\n }\n\n private transform;\n resetZoom() {\n // Triggers a \"zoomed\" event ---\n this._zoom.transform(this.element(), d3ZoomIdentity.translate(0, this.isHorizontal() ? 0 : this.height()));\n }\n\n zoomed() {\n this.transform = d3Event().transform;\n this.render();\n }\n\n private background;\n enter(domNode, element) {\n super.enter(domNode, element);\n this._zoom = d3Zoom()\n .scaleExtent([0, this.maxZoom()])\n .on(\"zoom\", () => {\n this.zoomed();\n })\n ;\n\n this.background = element.append(\"rect\")\n .attr(\"fill\", \"white\")\n .attr(\"opacity\", 0)\n .on(\"dblclick\", () => {\n d3Event().stopPropagation();\n delete this.rootExtent;\n this.resetZoom();\n })\n ;\n this.gUpperContent = element.append(\"g\").attr(\"class\", \"gUpperContent\");\n this.gUpperAxis = element.append(\"g\").attr(\"class\", \"gUpperAxis\");\n this.gMiddleContent = element.append(\"g\").attr(\"class\", \"gMiddleContent\");\n this.gLowerAxis = element.append(\"g\").attr(\"class\", \"gLowerAxis\");\n this.gLowerContent = element.append(\"g\").attr(\"class\", \"gLowerContent\");\n this.tlAxis\n .target(this.gUpperAxis.node())\n .tickFormat(this.tickFormat())\n .guideTarget(this.gUpperAxis.append(\"g\").node())\n .shrinkToFit(\"none\")\n .overlapMode(this.tickFormat_exists() ? \"stagger\" : \"none\")\n .extend(0.1)\n ;\n this.brAxis\n .target(this.gLowerAxis.node())\n .tickFormat(this.tickFormat())\n .guideTarget(this.gLowerAxis.append(\"g\").node())\n .shrinkToFit(\"none\")\n .overlapMode(this.tickFormat_exists() ? \"stagger\" : \"none\")\n .extend(0.1)\n ;\n\n element.call(this._zoom);\n this._selection.widgetElement(this.gMiddleContent);\n }\n\n private _prevIsHorizontal;\n update(domNode, element) {\n super.update(domNode, element);\n\n this._dateCache = {};\n\n this._title_idx = this.titleColumn() !== null ? this.columns().indexOf(this.titleColumn()) : this._title_idx;\n this._startDate_idx = this.startDateColumn() !== null ? this.columns().indexOf(this.startDateColumn()) : this._startDate_idx;\n this._endDate_idx = this.endDateColumn() !== null ? this.columns().indexOf(this.endDateColumn()) : this._endDate_idx;\n this._icon_idx = this.iconColumn() !== null ? this.columns().indexOf(this.iconColumn()) : this._icon_idx;\n this._color_idx = this.colorColumn() !== null ? this.columns().indexOf(this.colorColumn()) : this._color_idx;\n this._yoffset_idx = this.yOffsetColumn() !== null ? this.columns().indexOf(this.yOffsetColumn()) : this._yoffset_idx;\n\n if (this._prevIsHorizontal !== this.isHorizontal()) {\n this._prevIsHorizontal = this.isHorizontal();\n this.resetZoom();\n return;\n }\n\n this.tooltipFormatter = d3TimeFormat(this.tooltipTimeFormat());\n\n const width = this.width();\n const height = this.height();\n\n this.background\n .attr(\"x\", 0)\n .attr(\"y\", 0)\n .attr(\"width\", width)\n .attr(\"height\", height)\n ;\n\n const extent = this.extent();\n this.tlAxis\n .x(width / 2)\n .orientation(this.isHorizontal() ? \"top\" : \"left\")\n .reverse(!this.isHorizontal())\n .timePattern(this.timePattern()) // \"%Y-%m-%dT%H:%M:%S.%LZ\"\n .width(width - 1)\n .low(extent[0])\n .high(extent[1])\n .updateScale()\n ;\n\n this.brAxis\n .x(width / 2)\n .y(height / 2)\n .orientation(this.isHorizontal() ? \"bottom\" : \"right\")\n .reverse(!this.isHorizontal())\n .timePattern(this.timePattern()) // \"%Y-%m-%dT%H:%M:%S.%LZ\"\n .width(width - 1)\n .height(height)\n .low(extent[0])\n .high(extent[1])\n .updateScale()\n ;\n\n if (this.transform) {\n let low;\n let hi;\n if (this.isHorizontal()) {\n low = this.tlAxis.parseInvert(this.tlAxis.invert(this.transform.invertX(0)));\n hi = this.tlAxis.parseInvert(this.tlAxis.invert(this.transform.invertX(width - 1)));\n } else {\n low = this.tlAxis.parseInvert(this.tlAxis.invert(- this.transform.invertY(0)));\n hi = this.tlAxis.parseInvert(this.tlAxis.invert(- this.transform.invertY(height - 1)));\n }\n this.tlAxis\n .low(low)\n .high(hi)\n .updateScale()\n ;\n this.brAxis\n .low(low)\n .high(hi)\n .updateScale()\n ;\n }\n\n const data = this.data().sort(this.isHorizontal() ? (l, r) => {\n const retVal = this.brAxis.scalePos(l[1]) - this.brAxis.scalePos(r[1]);\n if (retVal === 0) {\n return (\"\" + l[0]).localeCompare(\"\" + r[0]);\n }\n return retVal;\n } : (l, r) => {\n return this.brAxis.scalePos(r[1]) - this.brAxis.scalePos(l[1]);\n });\n const events = data.filter(d => !d[this._endDate_idx]);\n const ranges = data.filter(d => !!d[this._endDate_idx]);\n\n this.tlAxis\n .render()\n ;\n this.brAxis\n .render()\n ;\n const brAxisBBox = this.brAxis.getBBox();\n\n let upperContentHeight = this.updateEntityPins(events);\n const lowerAxisHeight = brAxisBBox.height;\n let lowerHeight = height - upperContentHeight;\n const minYOffset = this._yoffset_idx !== -1 ? Math.min.apply(undefined, this.data().filter(row => !isNaN(row[this._yoffset_idx])).map(row => row[this._yoffset_idx])) : 0;\n if (events.length > 0 && ranges.length === 0) {\n // ONLY EVENTS\n this.tlAxis.visible(false);\n let y_offset = upperContentHeight / 4;\n if (y_offset > (height / 2) - lowerAxisHeight) {\n y_offset = (height / 2) - lowerAxisHeight;\n }\n const upperContentYOffset = (height / 2) + y_offset;\n const lowerAxisYOffset = ((height / 2) - lowerAxisHeight - y_offset) * -1;\n const halfMinYOffset = minYOffset !== 0 ? minYOffset / 2 : 0;\n this.gUpperContent.attr(\"transform\", `translate(0, ${upperContentYOffset - halfMinYOffset})`);\n this.gLowerAxis.attr(\"transform\", `translate(0, ${lowerAxisYOffset - halfMinYOffset})`);\n } else if (events.length === 0 && ranges.length > 0) {\n // ONLY RANGES\n this.tlAxis.visible(true);\n this.gUpperContent.attr(\"transform\", `translate(0, ${upperContentHeight})`);\n this.gUpperAxis.attr(\"transform\", `translate(0, ${upperContentHeight})`);\n } else {\n upperContentHeight -= minYOffset;\n lowerHeight += minYOffset;\n // BOTH\n this.tlAxis.visible(true);\n this.gUpperContent.attr(\"transform\", `translate(0, ${upperContentHeight})`);\n this.gUpperAxis.attr(\"transform\", `translate(0, ${upperContentHeight})`);\n this.gMiddleContent.attr(\"transform\", `translate(0, ${upperContentHeight})`);\n }\n this.tlAxis\n .render()\n ;\n const tlAxisBBox = this.tlAxis.getBBox();\n interface BucketInfo {\n endPos: number;\n }\n const bucketData: BucketInfo[] = [];\n const bucketIndex = {};\n for (const range of ranges) {\n for (let i = 0; i < bucketData.length; ++i) {\n const bucket = bucketData[i];\n if (bucket.endPos + this.overlapTolerence() <= this.dataStartPos(range)) {\n bucketIndex[range] = i;\n bucket.endPos = this.dataEndPos(range);\n break;\n }\n }\n\n if (bucketIndex[range] === undefined) {\n bucketIndex[range] = bucketData.length;\n bucketData.push({\n endPos: this.dataEndPos(range)\n });\n }\n }\n\n const vbLower = this.isHorizontal() ? 0 + tlAxisBBox.height : 0 + tlAxisBBox.width;\n const vbHigher = this.isHorizontal() ? lowerHeight - brAxisBBox.height : width - brAxisBBox.width;\n this.verticalBands\n .range([vbLower, vbHigher])\n .domain(bucketData.map((_d, i) => i))\n ;\n\n if (ranges.length > 0) {\n this.updateEventRanges(events, ranges, bucketIndex, lowerHeight, tlAxisBBox, brAxisBBox, width);\n }\n }\n\n updateEntityPins(events) {\n let event_height = 0;\n const context = this;\n const entityPins = this.gUpperContent.selectAll(\".entity_pin\").data(events, d => d[0] + \":\" + d[1]);\n const eventFontColor_idx = this.eventFontColorColumn() ? this.columns().indexOf(this.eventFontColorColumn()) : -1;\n const eventBorderColor_idx = this.eventBorderColorColumn() ? this.columns().indexOf(this.eventBorderColorColumn()) : -1;\n const eventBackgroundColor_idx = this.eventBackgroundColorColumn() ? this.columns().indexOf(this.eventBackgroundColorColumn()) : -1;\n const title_counts = {};\n for (const d of events) {\n const type = typeof d[context._title_idx] !== \"undefined\" ? d[context._title_idx] : d[0];\n title_counts[type] = title_counts[type] ? title_counts[type] + 1 : 1;\n }\n const title_types = Object.keys(title_counts);\n const title_group_offset = context.eventGroupOffset();\n const entityPinsEnter = entityPins.enter().append(\"g\")\n .attr(\"class\", \"entity_pin\");\n entityPinsEnter.append(\"line\")\n .attr(\"class\", \"entity_line\");\n\n entityPinsEnter\n .on(\"mouseover\", function (d) {\n d3Select(this).raise();\n })\n .each(function (d, i) {\n const entityPin = new EntityPin()\n .target(this)\n .icon(\"\")\n .iconOnlyShowOnHover(context.hideIconWhenCollapsed())\n .titleOnlyShowOnHover(context.hideTitleWhenCollapsed())\n .descriptionOnlyShowOnHover(context.hideDescriptionWhenCollapsed())\n .annotationOnlyShowOnHover(context.hideAnnotationsWhenCollapsed())\n .iconDiameter(18)\n .iconPaddingPercent(1)\n .titleFontSize(14)\n .descriptionColor(\"#333\")\n .descriptionFontSize(15)\n .iconColor(eventFontColor_idx === -1 ? \"#333\" : d[eventFontColor_idx])\n .titleColor(eventFontColor_idx === -1 ? \"#333\" : d[eventFontColor_idx])\n .descriptionColor(eventFontColor_idx === -1 ? \"#333\" : d[eventFontColor_idx])\n .backgroundShape(\"pin\")\n .backgroundColorFill(eventFontColor_idx === -1 ? \"#f8f8f8\" : d[eventBackgroundColor_idx])\n .backgroundColorStroke(eventFontColor_idx === -1 ? \"#ccc\" : d[eventBorderColor_idx])\n .cornerRadius(5)\n .arrowHeight(10)\n .arrowWidth(16)\n ;\n context.localEntityPin.set(this, entityPin);\n })\n .merge(entityPins)\n .each(function (d, i) {\n const entityPin = context.localEntityPin.get(this);\n const _title = typeof d[context._title_idx] !== \"undefined\" ? d[context._title_idx] : entityPin.title();\n const x_offset = context.dataStartPos(d) - 0;\n let y_offset = ((title_types.indexOf(_title) % context.eventGroupMod()) * title_group_offset) - 5;\n if (typeof d[context._yoffset_idx] !== \"undefined\") y_offset += d[context._yoffset_idx] ? d[context._yoffset_idx] : 0;\n if (d[context._title_idx] !== entityPin.title() && d[context._startDate_idx] !== entityPin.description()) {\n const parsed_start_time = context.brAxis.parse(d[context._startDate_idx]);\n const formatted_start_time = context.tooltipFormatter(parsed_start_time);\n entityPin\n .x(x_offset)\n .y(y_offset)\n .iconOnlyShowOnHover(context.hideIconWhenCollapsed())\n .titleOnlyShowOnHover(context.hideTitleWhenCollapsed())\n .descriptionOnlyShowOnHover(context.hideDescriptionWhenCollapsed())\n .annotationOnlyShowOnHover(context.hideAnnotationsWhenCollapsed())\n .icon(typeof d[context._icon_idx] !== \"undefined\" ? d[context._icon_idx] : entityPin.icon())\n .title(_title)\n .description(formatted_start_time)\n .animationFrameRender()\n ;\n } else {\n entityPin.move({ x: x_offset, y: y_offset });\n }\n const calc_height = entityPin.calcHeight();\n if (event_height < calc_height) event_height = calc_height;\n\n d3Select(this).selectAll(\".entity_line\")\n .attr(\"x1\", x_offset)\n .attr(\"x2\", x_offset)\n .attr(\"y1\", 0)\n .attr(\"y2\", y_offset)\n .style(\"stroke\", eventFontColor_idx === -1 ? \"#ccc\" : d[eventBorderColor_idx])\n .style(\"stroke-width\", 1)\n ;\n })\n ;\n entityPins.exit()\n .each(function (d, i) {\n const entityPin = context.localEntityPin.get(this);\n entityPin.target(null);\n\n })\n .remove();\n const event_offset = Math.abs(Math.min(events.length, context.eventGroupMod()) * context.eventGroupOffset());\n return event_height + event_offset;\n }\n\n updateEventRanges(events, ranges, bucketIndex, eventRangeHeight, tlAxisBBox, brAxisBBox, width) {\n const context = this;\n\n const lines = this.gMiddleContent.selectAll(\".line\").data(events, d => {\n return d[context._title_idx];\n });\n lines.enter().append(\"line\")\n .attr(\"class\", \"line\")\n .merge(lines)\n .attr(this.isHorizontal() ? \"x1\" : \"y1\", d => this.dataStartPos(d) - 0)\n .attr(this.isHorizontal() ? \"x2\" : \"y2\", d => this.dataStartPos(d) - 0)\n .attr(this.isHorizontal() ? \"y1\" : \"x1\", this.isHorizontal() ? tlAxisBBox.height : tlAxisBBox.width)\n .attr(this.isHorizontal() ? \"y2\" : \"x2\", this.isHorizontal() ? eventRangeHeight - brAxisBBox.height : width - brAxisBBox.width)\n ;\n lines.exit().remove();\n const buckets = this.gMiddleContent.selectAll(\".buckets\").data(ranges, d => d[context._title_idx]);\n buckets.enter().append(\"g\")\n .attr(\"class\", \"buckets\")\n .call(this._selection.enter.bind(this._selection))\n .each(function (d) {\n const entityRect = new EntityRect()\n .target(this)\n .iconDiameter(28)\n .iconPaddingPercent(0)\n .titleFontSize(28)\n .titleColor(context.rangeFontColor())\n .descriptionColor(context.rangeFontColor())\n .iconColor(context.rangeFontColor())\n .backgroundShape(\"rect\")\n .backgroundColorFill(d[context._color_idx])\n ;\n context.localRect.set(this, entityRect);\n context.enterEntityRect(entityRect, d);\n })\n .on(\"click\", function (d) {\n context.click(context.rowToObj(d), \"range\", context._selection.selected(this));\n }, false)\n .on(\"dblclick\", function (d) {\n context.rootExtent = d;\n context.resetZoom();\n context.dblclick(context.rowToObj(d), \"range\", context._selection.selected(this));\n }, true)\n .on(\"mouseout.tooltip\", this.tooltip.hide)\n .on(\"mousemove.tooltip\", this.tooltip.show)\n .merge(buckets)\n .attr(\"transform\", d => context.isHorizontal() ?\n `translate(${this.dataStartPos(d)}, ${this.verticalBands(bucketIndex[d])}) ` :\n `translate(${this.verticalBands(bucketIndex[d])}, ${this.dataStartPos(d)}) `)\n .each(function (d) {\n const textBox = context.localRect.get(this);\n const x = context.dataWidth(d) / 2;\n const y = context.verticalBands.bandwidth() / 2;\n const rectWidth = Math.max(context.dataWidth(d), 2);\n const rectHeight = Math.max(context.verticalBands.bandwidth(), 2);\n const fontHeightRatio = 0.618;\n const paddingRatio = ((1 - fontHeightRatio) / 2);\n const paddingSize = paddingRatio * rectHeight;\n const fontSize = rectHeight * fontHeightRatio;\n const iconSize = fontSize;\n textBox\n .pos(context.isHorizontal() ? { x, y } : { x: y, y: x })\n .fixedHeight(context.isHorizontal() ? rectHeight : rectWidth)\n .fixedWidth(context.isHorizontal() ? rectWidth : rectHeight)\n .icon(typeof d[context._icon_idx] !== \"undefined\" ? d[context._icon_idx] : \"\")\n .title(typeof d[context._title_idx] !== \"undefined\" ? d[context._title_idx] : \"\")\n .padding(paddingSize)\n .iconDiameter(iconSize)\n .titleFontSize(fontSize)\n ;\n if (iconSize * 1.5 > rectWidth) {\n textBox.icon(null);\n }\n context.updateEntityRect(textBox, d[context._icon_idx]);\n textBox\n .render()\n ;\n });\n buckets.exit().remove();\n }\n\n exit(domNode, element) {\n this.brAxis.target(null);\n this.tlAxis.target(null);\n super.exit(domNode, element);\n }\n\n // Events ---\n click(row, col, sel) {\n }\n\n dblclick(row, col, sel) {\n }\n\n enterEntityRect(textbox: EntityRect, d) {\n }\n\n updateEntityRect(textbox: EntityRect, d) {\n }\n}\nMiniGantt.prototype._class += \" timeline_MiniGantt\";\nMiniGantt.prototype.implements(ITooltip.prototype);\nMiniGantt.prototype.mixin(Utility.SimpleSelectionMixin);\n\nexport interface MiniGantt {\n // ITooltip ---\n tooltip;\n tooltipHTML(_): string;\n tooltipFormat(_): string;\n\n // SimpleSelectionMixin\n _selection;\n\n // Properties ---\n timePattern(): string;\n timePattern(_: string): this;\n tickFormat(): string;\n tickFormat(_: string): this;\n tickFormat_exists(): boolean;\n tooltipTimeFormat(): string;\n tooltipTimeFormat(_: string): this;\n overlapTolerence(): number;\n overlapTolerence(_: number): this;\n orientation(): string;\n orientation(_: string): this;\n rangeFontColor(): string;\n rangeFontColor(_: string): this;\n titleColumn(): string;\n titleColumn(_: string): this;\n startDateColumn(): string;\n startDateColumn(_: string): this;\n endDateColumn(): string;\n endDateColumn(_: string): this;\n iconColumn(): string;\n iconColumn(_: string): this;\n colorColumn(): string;\n colorColumn(_: string): this;\n yOffsetColumn(): string;\n yOffsetColumn(_: string): this;\n maxZoom(): number;\n maxZoom(_: number): this;\n eventGroupMod(): number;\n eventGroupMod(_: number): this;\n eventGroupOffset(): number;\n eventGroupOffset(_: number): this;\n eventFontColorColumn(): string;\n eventFontColorColumn(_: string): this;\n eventBorderColorColumn(): string;\n eventBorderColorColumn(_: string): this;\n eventBackgroundColorColumn(): string;\n eventBackgroundColorColumn(_: string): this;\n hideIconWhenCollapsed(): boolean;\n hideIconWhenCollapsed(_: boolean): this;\n hideTitleWhenCollapsed(): boolean;\n hideTitleWhenCollapsed(_: boolean): this;\n hideDescriptionWhenCollapsed(): boolean;\n hideDescriptionWhenCollapsed(_: boolean): this;\n hideAnnotationsWhenCollapsed(): boolean;\n hideAnnotationsWhenCollapsed(_: boolean): this;\n centerOnMostRecent(): boolean;\n centerOnMostRecent(_: boolean): this;\n\n}\n\nMiniGantt.prototype.publish(\"timePattern\", \"%Y-%m-%d\", \"string\", \"timePattern\");\nMiniGantt.prototype.publish(\"tickFormat\", null, \"string\", \"tickFormat\", undefined, { optional: true });\nMiniGantt.prototype.publish(\"tooltipTimeFormat\", \"%Y-%m-%d\", \"string\", \"tooltipTimeFormat\");\nMiniGantt.prototype.publish(\"overlapTolerence\", 2, \"number\", \"overlapTolerence\");\nMiniGantt.prototype.publish(\"orientation\", \"horizontal\", \"set\", \"orientation\", [\"horizontal\", \"vertical\"]);\nMiniGantt.prototype.publish(\"rangeFontColor\", \"#ecf0f1\", \"html-color\", \"rangeFontColor\");\nMiniGantt.prototype.publish(\"titleColumn\", null, \"string\", \"titleColumn\");\nMiniGantt.prototype.publish(\"startDateColumn\", null, \"string\", \"startDateColumn\");\nMiniGantt.prototype.publish(\"endDateColumn\", null, \"string\", \"endDateColumn\");\nMiniGantt.prototype.publish(\"iconColumn\", null, \"string\", \"iconColumn\");\nMiniGantt.prototype.publish(\"colorColumn\", null, \"string\", \"colorColumn\");\nMiniGantt.prototype.publish(\"yOffsetColumn\", null, \"string\", \"yOffsetColumn\");\nMiniGantt.prototype.publish(\"maxZoom\", 16, \"number\", \"maxZoom\");\nMiniGantt.prototype.publish(\"eventGroupOffset\", -50, \"number\", \"eventGroupOffset\");\nMiniGantt.prototype.publish(\"eventGroupMod\", 5, \"number\", \"eventGroupMod\");\nMiniGantt.prototype.publish(\"eventFontColorColumn\", null, \"string\", \"eventFontColorColumn\");\nMiniGantt.prototype.publish(\"eventBorderColorColumn\", null, \"string\", \"eventBorderColorColumn\");\nMiniGantt.prototype.publish(\"eventBackgroundColorColumn\", null, \"string\", \"eventBackgroundColorColumn\");\nMiniGantt.prototype.publish(\"hideIconWhenCollapsed\", false, \"boolean\", \"hideIconWhenCollapsed\");\nMiniGantt.prototype.publish(\"hideTitleWhenCollapsed\", false, \"boolean\", \"hideTitleWhenCollapsed\");\nMiniGantt.prototype.publish(\"hideDescriptionWhenCollapsed\", false, \"boolean\", \"hideDescriptionWhenCollapsed\");\nMiniGantt.prototype.publish(\"hideAnnotationsWhenCollapsed\", true, \"boolean\", \"hideAnnotationsWhenCollapsed\");\nMiniGantt.prototype.publish(\"centerOnMostRecent\", false, \"boolean\", \"If true, the timeline will be centered on the most recent data point\");\n","import { d3Event, select as d3Select, SVGZoomWidget, Utility } from \"@hpcc-js/common\";\nimport { HTMLTooltip } from \"@hpcc-js/html\";\nimport { scaleLinear as d3ScaleLinear } from \"d3-scale\";\nimport { React, render, LabelledRect } from \"@hpcc-js/react\";\n\nexport type IGanttData = [string, number, number, any?];\n\nexport interface IRangeOptions {\n rangePadding: number;\n fontFamily: string;\n fontSize: number;\n strokeWidth?: number;\n fill: string;\n stroke: string;\n textFill: string;\n cornerRadius: number;\n}\n\nexport class ReactGantt extends SVGZoomWidget {\n\n protected _selection = new Utility.Selection(this);\n\n protected _buckets;\n protected _interpolateX;\n protected _interpolateY;\n\n protected _bucketsBySeries;\n protected _dataBySeries;\n protected _origIdxMap;\n private _seriesBackgrounds;\n\n protected _maxFontSize;\n\n public _tooltip;\n\n public _minStart: number;\n public _maxEnd: number;\n\n protected _title_idx = 0;\n protected _startDate_idx = 1;\n protected _endDate_idx = 2;\n protected _icon_idx = -1;\n protected _color_idx = -1;\n protected _series_idx = -1;\n protected _bucket_idx = -1;\n protected _yoffset_idx = -1;\n\n protected _maxX: number;\n protected _maxY: number;\n\n private _rangeOptions: IRangeOptions = {\n rangePadding: 2,\n fontFamily: \"Verdana\",\n fontSize: 12,\n fill: \"white\",\n stroke: \"black\",\n textFill: \"black\",\n cornerRadius: 3,\n strokeWidth: 0\n };\n\n constructor(drawStartPosition: \"origin\" | \"center\" = \"origin\") {\n super();\n this._drawStartPos = drawStartPosition;\n\n this.showToolbar_default(false);\n\n this._tooltip = new HTMLTooltip();\n this._tooltip\n .tooltipHTML(d => {\n return `<div style=\"text-align:center;\">${d[0]}<br/><br/>${d[1]} -> ${d[2]}</div>`;\n });\n this._tooltip\n .followCursor(true)\n ;\n }\n\n selection(_: any[]): this;\n selection(): any[];\n selection(_?: any[]): any[] | this {\n if (!arguments.length) return this._selection.get();\n this._selection.set(_);\n return this;\n }\n\n private _rangeRenderer: React.FunctionComponent = LabelledRect;\n rangeRenderer(): React.FunctionComponent;\n rangeRenderer(_: React.FunctionComponent): this;\n rangeRenderer(_?: React.FunctionComponent): this | React.FunctionComponent {\n if (!arguments.length) return this._rangeRenderer;\n this._rangeRenderer = _;\n return this._rangeRenderer;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n const context = this;\n element\n .on(\"click\", function (this: SVGElement, d) {\n context._selection.clear();\n });\n\n this._tooltip.target(domNode);\n }\n update(domNode, element) {\n super.update(domNode, element);\n\n this.zoomExtent([0.05, this.maxZoom()]);\n\n this._title_idx = this.titleColumn() !== null ? this.columns().indexOf(this.titleColumn()) : this._title_idx;\n this._startDate_idx = this.startDateColumn() !== null ? this.columns().indexOf(this.startDateColumn()) : this._startDate_idx;\n this._endDate_idx = this.endDateColumn() !== null ? this.columns().indexOf(this.endDateColumn()) : this._endDate_idx;\n this._icon_idx = this.iconColumn() !== null ? this.columns().indexOf(this.iconColumn()) : this._icon_idx;\n this._color_idx = this.colorColumn() !== null ? this.columns().indexOf(this.colorColumn()) : this._color_idx;\n this._series_idx = this.seriesColumn() !== null ? this.columns().indexOf(this.seriesColumn()) : this._series_idx;\n this._bucket_idx = this.bucketColumn() !== null ? this.columns().indexOf(this.bucketColumn()) : -1;\n\n const context = this;\n const w = this.width();\n\n const x0 = 0;\n const x1 = w;\n\n this._interpolateX = d3ScaleLinear()\n .domain([this._minStart, this._maxEnd])\n .range([x0, x1])\n ;\n\n this.data().sort((a, b) => a[1] - b[1]);\n\n if (this._series_idx > -1) {\n this._origIdxMap = {};\n this._dataBySeries = {};\n this._bucketsBySeries = {};\n this.data().forEach((dataRow, origIdx) => {\n const seriesKey = dataRow[this._series_idx];\n if (!this._dataBySeries[seriesKey]) {\n this._origIdxMap[seriesKey] = {};\n this._dataBySeries[seriesKey] = [];\n }\n this._dataBySeries[seriesKey].push({\n dataRow,\n origIdx\n });\n });\n const gutter = this.gutter();\n let bucketOffset = 0;\n const seriesKeys = Object.keys(this._dataBySeries);\n seriesKeys.forEach(seriesKey => {\n this._dataBySeries[seriesKey].sort((a, b) => a.dataRow[1] - b.dataRow[1]);\n this._bucketsBySeries[seriesKey] = this.calcBuckets(this._dataBySeries[seriesKey].map(n => n.dataRow), 1, 2);\n this._bucketsBySeries[seriesKey].bucketHeight = this.bucketHeight();\n this._bucketsBySeries[seriesKey].bucketOffset = bucketOffset;\n bucketOffset += (this._bucketsBySeries[seriesKey].bucketHeight + this.strokeWidth() + this.gutter()) * (this._bucketsBySeries[seriesKey].maxBucket + 1);\n this._dataBySeries[seriesKey].forEach((n, i) => {\n this._origIdxMap[seriesKey][n.origIdx] = i;\n });\n });\n this._seriesBackgrounds = this._renderElement.selectAll(\".series-background\")\n .data(seriesKeys.map(key => {\n return this._bucketsBySeries[key];\n }))\n ;\n this._seriesBackgrounds\n .join(\n enter => enter.append(\"rect\")\n .attr(\"class\", \"series-background\"),\n update => update,\n exit => exit\n .each(function (d) {\n delete d.element;\n })\n .remove()\n )\n .attr(\"opacity\", d => d.props && d.props.hidden ? 0 : 1)\n .each(function (this: SVGGElement, d, i) {\n d3Select(this)\n .attr(\"x\", 0)\n .attr(\"y\", d.bucketOffset - (gutter / 2))\n .attr(\"width\", w)\n .attr(\"height\", ((d.bucketHeight + gutter) * (d.maxBucket + 1)) + gutter)\n .attr(\"fill\", i % 2 ? context.oddSeriesBackground() : context.evenSeriesBackground())\n ;\n });\n } else {\n if (this._bucket_idx !== -1) {\n this._buckets = this.calcBuckets(this.data(), this._startDate_idx, this._endDate_idx, this._bucket_idx);\n } else {\n this._buckets = this.calcBuckets(this.data(), this._startDate_idx, this._endDate_idx);\n }\n }\n const interpedStart = this._interpolateX(this._minStart);\n\n this.zoomTo(\n [interpedStart, 0],\n 1\n );\n\n const bucketHeight = this.bucketHeight();\n\n this.setRangeOptions();\n\n this._maxFontScale = (bucketHeight - (this.rangePadding() * 2));\n this.measureDataText();\n\n const itemSelection = this._renderElement.selectAll(\".item\")\n .data(this.data())\n ;\n const borderOffset1 = this.strokeWidth();\n const borderOffset2 = borderOffset1 * 2;\n itemSelection\n .join(\n enter => enter.append(\"g\")\n .attr(\"class\", \"item\")\n .on(\"click.selectionBag\", function (d, i) {\n const _id = d.id === undefined ? i : d.id;\n if (context._selection.isSelected({ _id, element: d.element })) {\n context._selection.clear();\n } else {\n context._selection.click(\n {\n _id,\n element: () => d.element\n },\n d3Event\n );\n }\n context.selectionChanged();\n d3Event().stopPropagation();\n })\n .on(\"click\", function (this: SVGElement, d) {\n const selected = d.element.classed(\"selected\");\n if (d[context.columns().length]) {\n d.__lparam = d[context.columns().length];\n }\n context.click(d, \"\", selected);\n })\n .on(\"dblclick\", function (this: SVGElement, d) {\n const selected = d.element.classed(\"selected\");\n if (d[context.columns().length]) {\n d.__lparam = d[context.columns().length];\n }\n context.click(d, \"\", selected);\n })\n .on(\"mousein\", function (d) {\n context.highlightItem(d3Select(this), d);\n const selected = d.element.classed(\"selected\");\n context.mousein(d, \"\", selected);\n })\n .on(\"mouseover\", function (d) {\n const d3evt = d3Event();\n context._tooltip._triggerElement = d.element;\n context._tooltip._cursorLoc = [\n d3evt.clientX,\n d3evt.clientY\n ];\n context._tooltip\n .data(d)\n .visible(true)\n .fitContent(true)\n .render()\n ;\n context.highlightItem(d3Select(this), d);\n const selected = d.element.classed(\"selected\");\n context.mouseover(d, \"\", selected);\n })\n .on(\"mouseout\", function (d) {\n context._tooltip\n .visible(false)\n .render()\n ;\n context.highlightItem(null, null);\n const selected = d.element.classed(\"selected\");\n context.mouseout(d, \"\", selected);\n })\n .each(function (d, i) {\n d.that = this;\n d.element = d3Select(this);\n d.x = context._interpolateX(d[1]);\n const endX = context._interpolateX(d[2]);\n if (context._series_idx > -1) {\n const seriesKey = d[context._series_idx];\n const bucket = context._bucketsBySeries[seriesKey].bucketMap[context._origIdxMap[seriesKey][i]];\n d.y = context._bucketsBySeries[seriesKey].interpolateY(bucket) + context._bucketsBySeries[seriesKey].bucketOffset;\n } else {\n const _i = context._bucket_idx === -1 ? i : d[context._bucket_idx];\n d.y = context._buckets.interpolateY(context._buckets.bucketMap[_i]);\n }\n d.props = {\n ...d[3],\n text: d[0]\n };\n d.props.width = endX - d.x;\n d.props.height = bucketHeight;\n d.x += borderOffset1;\n d.y += borderOffset1;\n d.props.width -= borderOffset2;\n d.props.height -= borderOffset2;\n d.element.attr(\"transform\", `translate(${d.x + (d.props.width / 2)} ${d.y + (d.props.height / 2)})`);\n }),\n update => update,\n exit => exit\n .each(function (d) {\n delete d.element;\n })\n .remove()\n )\n .attr(\"opacity\", d => d.props && d.props.hidden ? 0 : 1)\n .each(function (this: SVGGElement, d, i) {\n d.that = this;\n if (context._series_idx > -1) {\n const seriesKey = d[context._series_idx];\n d.x = context.renderRangeElement(d, i, false, context._rangeOptions, seriesKey);\n } else {\n d.x = context.renderRangeElement(d, i, false, context._rangeOptions);\n }\n })\n .on(\"dblclick.zoom\", d => {\n const x1 = this._interpolateX(d[1]);\n const x2 = this._interpolateX(d[2]);\n const xRange = x2 - x1;\n const xScale = w / xRange;\n this.zoomTo(\n [\n -x1 * xScale,\n 0\n ],\n xScale\n );\n })\n ;\n element.on(\"dblclick.zoom\", null);\n }\n exit(domNode, element) {\n this._tooltip.target(null);\n super.exit(domNode, element);\n }\n renderRangeElement(d, i, transformEach = false, options: any = {}, seriesKey?: string) {\n const borderOffset1 = options.strokeWidth;\n const borderOffset2 = borderOffset1 * 2;\n const padding = options.rangePadding;\n let endX;\n const x = isNaN(this._transform.x) ? 0 : this._transform.x;\n const k = isNaN(this._transform.k) ? 1 : this._transform.k;\n let b;\n const bucketHeight = this.bucketHeight();\n d.that.setAttribute(\"data-series\", seriesKey);\n\n if (this._color_idx > -1) {\n d.that.setAttribute(\"data-color\", d[this._color_idx]);\n }\n\n if (seriesKey !== undefined) {\n b = this._bucketsBySeries[seriesKey].bucketMap[this._origIdxMap[seriesKey][i]];\n d.that.setAttribute(\"data-b\", b);\n d.that.setAttribute(\"data-bucketOffset\", this._bucketsBySeries[seriesKey].bucketOffset);\n d.y = this._bucketsBySeries[seriesKey].interpolateY(b) + this._bucketsBySeries[seriesKey].bucketOffset;\n d.that.setAttribute(\"data-dy\", d.y);\n } else {\n b = this._buckets.bucketMap[i];\n d.y = this._buckets.interpolateY(b);\n }\n if (this._color_idx > -1) {\n options.fill = d[this._color_idx];\n }\n if (!transformEach) {\n d.x = this._interpolateX(d[1]);\n endX = this._interpolateX(d[2]);\n d.props = {\n ...d[3],\n text: d[0]\n };\n d.props.width = (endX - d.x) / k;\n } else {\n d.x = this._interpolateX(d[1]) * k;\n endX = this._interpolateX(d[2]) * k;\n d.props = {\n ...d[3],\n text: d[0]\n };\n d.props.width = (endX - d.x) / k;\n d.x += x;\n d.props.width *= k;\n }\n d.props.height = bucketHeight;\n if (seriesKey === undefined && this._buckets.bucketScale < 1) {\n d.props.height = this._buckets.bucketScale * bucketHeight;\n }\n if (d.element === undefined && d.that) {\n d.element = d3Select(d.that);\n }\n d.element.attr(\"transform\", `translate(${d.x + (d.props.width / 2)} ${d.y + (d.props.height / 2)})`);\n\n d.x += borderOffset1;\n d.y += borderOffset1;\n d.props.width -= borderOffset2;\n d.props.height -= borderOffset2;\n d.props.width = d.props.width < 1 ? 1 : d.props.width;\n d.props.height = d.props.height < 1 ? 1 : d.props.height;\n\n let text = this.truncateText(d.props.text, d.props.width - padding, this._maxFontScale);\n\n if (text !== d.props.text) {\n text = this.truncateText(d.props.text, d.props.width - padding);\n } else {\n d.props.fontSize = this._maxFontScale * options.fontSize;\n }\n if (seriesKey === undefined && this._buckets.bucketScale < 1) {\n d.props.fontSize = Math.min(this._maxFontScale, this._buckets.bucketScale) * options.fontSize;\n }\n if (!this._maxY || this._maxY < d.y + d.props.height) {\n this._maxY = d.y + d.props.height;\n }\n if (!this._maxX || this._maxX < d.x + d.props.width) {\n this._maxX = d.x + d.props.width;\n }\n render(\n this._rangeRenderer,\n {\n ...options,\n ...d.props,\n text,\n },\n d.that\n );\n }\n\n setRangeOptions() {\n this._rangeOptions = {\n rangePadding: this.rangePadding(),\n fontFamily: this.fontFamily(),\n fontSize: this.fontSize(),\n strokeWidth: this.strokeWidth(),\n fill: this.fill(),\n stroke: this.stroke(),\n textFill: this.rangeFontColor(),\n cornerRadius: this.cornerRadius(),\n };\n }\n\n public _transform = { k: 1, x: 0, y: 0 };\n zoomed(transform) {\n this._transform = transform;\n switch (this.renderMode()) {\n case \"scale-all\":\n this._zoomScale = transform.k;\n this._zoomTranslate = [transform.x, 0];\n this._zoomG.attr(\"transform\", `translate(${transform.x} ${0})scale(${transform.k} 1)`);\n break;\n default:\n const options = this._rangeOptions;\n this.data().forEach((d, i) => {\n if (this._color_idx > -1) {\n options.fill = d[this._color_idx];\n }\n if (this._series_idx > -1) {\n const seriesKey = d[this._series_idx];\n this.renderRangeElement(d, i, true, options, seriesKey);\n } else {\n this.renderRangeElement(d, i, true, options);\n }\n });\n }\n\n this.zoomedHook(transform);\n }\n\n zoomedHook(transform) {\n\n }\n\n private calcBuckets(data, startKey: string | number, endKey: string | number, bucketKey?: string | number) {\n const bucketMap = {};\n const bucketKeyMap = {};\n const tol = this.overlapTolerence();\n const buckets = [{ end: -Infinity }];\n let maxBucket = 0;\n if (bucketKey !== undefined) {\n data.forEach((d, i) => {\n bucketMap[i] = d[bucketKey];\n bucketKeyMap[d[bucketKey]] = true;\n });\n maxBucket = Object.keys(bucketKeyMap).length;\n } else {\n data.forEach((d, i) => {\n for (let i2 = 0; i2 < buckets.length; ++i2) {\n if (i === 0 || buckets[i2][endKey] + tol <= d[startKey]) {\n bucketMap[i] = i2;\n if (maxBucket < i2) maxBucket = i2;\n buckets[i2][endKey] = d[endKey];\n break;\n }\n }\n if (bucketMap[i] === undefined) {\n bucketMap[i] = buckets.length;\n const b = {};\n b[endKey] = d[endKey];\n buckets.push(b as any);\n }\n\n if (maxBucket < bucketMap[i]) maxBucket = bucketMap[i];\n });\n }\n const height = (maxBucket + 1) * (this.bucketHeight() + this.gutter());\n return {\n bucketMap,\n maxBucket,\n bucketScale: this.height() / height,\n interpolateY: d3ScaleLinear()\n .domain([0, maxBucket + 1])\n .range([0, Math.min(this.height(), height)])\n };\n }\n\n data(): IGanttData[];\n data(_: IGanttData[]): this;\n data(_?: IGanttData[]): this | IGanttData[] {\n const retVal = super.data.apply(this, arguments);\n if (arguments.length > 0) {\n this._minStart = Math.min(...this.data().map(n => n[1])) ?? 0;\n this._maxEnd = Math.max(...this.data().map(n => n[2])) ?? 1;\n this.measureDataText(true);\n }\n return retVal;\n }\n\n protected _textWidths;\n protected _maxFontScale;\n protected _characterWidths;\n protected _prevFontFamily;\n protected _prevFontSize;\n measureDataText(forceMeasure = false) {\n const textWidths = {};\n const characterWidths = {};\n const fontFamily = this.fontFamily();\n const fontSize = this.fontSize();\n const bucketHeight = this.bucketHeight();\n\n if (bucketHeight) {\n this._maxFontScale = (bucketHeight - (this.rangePadding() * 2)) / fontSize;\n }\n\n if (forceMeasure || this._prevFontFamily !== fontFamily || this._prevFontSize !== fontSize) {\n characterWidths[\".\"] = Utility.textSize(\".\", fontFamily, fontSize).width;\n this.data().forEach(d => {\n if (!textWidths[d[0]]) {\n textWidths[d[0]] = Utility.textSize(d[0], fontFamily, fontSize).width;\n }\n d[0].split(\"\").forEach(char => {\n if (!characterWidths[char]) {\n characterWidths[char] = Utility.textSize(char, fontFamily, fontSize).width;\n }\n });\n });\n this._textWidths = textWidths;\n this._characterWidths = characterWidths;\n }\n this._prevFontFamily = fontFamily;\n this._prevFontSize = fontSize;\n }\n\n truncateText(text, width, scale = 1) {\n const textFits = this._textWidths[text] * scale < width;\n if (textFits) {\n return text;\n }\n let ret = \"\";\n let sum = 0;\n const _width = width - (this._characterWidths[\".\"] * 3);\n for (const char of text) {\n sum += this._characterWidths[char];\n if (sum < _width) {\n ret += char;\n } else {\n break;\n }\n }\n return _width < 0 ? \"\" : ret + \"...\";\n }\n\n resize(_size?: { width: number, height: number }) {\n let retVal;\n if (this.fitWidthToContent() || this.fitHeightToContent()) {\n retVal = super.resize.call(this, {\n width: _size.width,\n height: this._maxY\n });\n } else {\n retVal = super.resize.apply(this, arguments);\n }\n return retVal;\n }\n\n selectionChanged() {\n\n }\n\n highlightItem(_element, d) {\n\n }\n\n click(row, _col, sel) {\n\n }\n\n dblclick(row, _col, sel) {\n\n }\n\n mousein(row, _col, sel) {\n }\n\n mouseover(row, _col, sel) {\n }\n\n mouseout(row, _col, sel) {\n }\n}\nReactGantt.prototype._class += \" timeline_ReactGantt\";\n\nexport interface ReactGantt {\n titleColumn(): string;\n titleColumn(_: string): this;\n startDateColumn(): string;\n startDateColumn(_: string): this;\n endDateColumn(): string;\n endDateColumn(_: string): this;\n iconColumn(): string;\n iconColumn(_: string): this;\n colorColumn(): string;\n colorColumn(_: string): this;\n seriesColumn(): string;\n seriesColumn(_: string): this;\n bucketColumn(): string;\n bucketColumn(_: string): this;\n overlapTolerence(): number;\n overlapTolerence(_: number): this;\n smallestRangeWidth(): number;\n smallestRangeWidth(_: number): this;\n bucketHeight(): number;\n bucketHeight(_: number): this;\n gutter(): number;\n gutter(_: number): this;\n showToolbar_default(_: boolean): this;\n fontSize(): number;\n fontSize(_: number): this;\n fontFamily(): string;\n fontFamily(_: string): this;\n strokeWidth(): number;\n strokeWidth(_: number): this;\n stroke(): string;\n stroke(_: string): this;\n cornerRadius(): number;\n cornerRadius(_: number): this;\n fill(): string;\n fill(_: string): this;\n rangeFontColor(): string;\n rangeFontColor(_: string): this;\n rangePadding(): number;\n rangePadding(_: number): this;\n renderMode(): \"default\" | \"scale-all\";\n renderMode(_: \"default\" | \"scale-all\"): this;\n maxZoom(): number;\n maxZoom(_: number): this;\n fitWidthToContent(): boolean;\n fitWidthToContent(_: boolean): this;\n fitHeightToContent(): boolean;\n fitHeightToContent(_: boolean): this;\n evenSeriesBackground(): string;\n evenSeriesBackground(_: string): this;\n oddSeriesBackground(): string;\n oddSeriesBackground(_: string): this;\n}\n\nReactGantt.prototype.publish(\"fitWidthToContent\", false, \"boolean\", \"If true, resize will simply reapply the bounding box width\");\nReactGantt.prototype.publish(\"fitHeightToContent\", false, \"boolean\", \"If true, resize will simply reapply the bounding box height\");\nReactGantt.prototype.publish(\"titleColumn\", null, \"string\", \"Column name to for the title\");\nReactGantt.prototype.publish(\"startDateColumn\", null, \"string\", \"Column name to for the start date\");\nReactGantt.prototype.publish(\"endDateColumn\", null, \"string\", \"Column name to for the end date\");\nReactGantt.prototype.publish(\"iconColumn\", null, \"string\", \"Column name to for the icon\");\nReactGantt.prototype.publish(\"colorColumn\", null, \"string\", \"Column name to for the color\");\nReactGantt.prototype.publish(\"seriesColumn\", null, \"string\", \"Column name to for the series identifier\");\nReactGantt.prototype.publish(\"bucketColumn\", null, \"string\", \"Column name to for the bucket identifier\");\nReactGantt.prototype.publish(\"renderMode\", \"default\", \"set\", \"Render modes vary in features and performance\", [\"default\", \"scale-all\"]);\nReactGantt.prototype.publish(\"rangePadding\", 3, \"number\", \"Padding within each range rectangle (pixels)\");\nReactGantt.prototype.publish(\"fill\", \"#1f77b4\", \"string\", \"Background color of range rectangle\");\nReactGantt.prototype.publish(\"stroke\", null, \"string\", \"Color of range rectangle border\");\nReactGantt.prototype.publish(\"strokeWidth\", null, \"number\", \"Width of range rectangle border (pixels)\");\nReactGantt.prototype.publish(\"cornerRadius\", 3, \"number\", \"Space between range buckets (pixels)\");\nReactGantt.prototype.publish(\"fontFamily\", null, \"string\", \"Font family within range rectangle\", null, { optional: true });\nReactGantt.prototype.publish(\"fontSize\", 10, \"number\", \"Size of font within range rectangle (pixels)\");\nReactGantt.prototype.publish(\"rangeFontColor\", \"#ecf0f1\", \"html-color\", \"rangeFontColor\");\nReactGantt.prototype.publish(\"overlapTolerence\", 2, \"number\", \"overlapTolerence\");\nReactGantt.prototype.publish(\"smallestRangeWidth\", 10, \"number\", \"Width of the shortest range (pixels)\");\nReactGantt.prototype.publish(\"bucketHeight\", 100, \"number\", \"Max height of range element (pixels)\");\nReactGantt.prototype.publish(\"gutter\", 2, \"number\", \"Space between range buckets (pixels)\");\nReactGantt.prototype.publish(\"maxZoom\", 16, \"number\", \"Maximum zoom\");\nReactGantt.prototype.publish(\"evenSeriesBackground\", \"#FFFFFF\", \"html-color\", \"Background color of even series rows\");\nReactGantt.prototype.publish(\"oddSeriesBackground\", \"#DDDDDD\", \"html-color\", \"Background color of odd series rows\");\n","import { Axis } from \"@hpcc-js/chart\";\nimport { SVGWidget } from \"@hpcc-js/common\";\nimport { ReactGantt } from \"./ReactGantt.ts\";\n\nexport type IAxisGanttData = [string, number | string, number | string, any?] | any[];\n\nexport class ReactAxisGantt extends SVGWidget {\n\n protected _topAxis: Axis = new Axis(\"center\")\n .orientation(\"top\")\n .type(\"linear\")\n .shrinkToFit(\"none\")\n .overlapMode(\"hide\")\n .extend(0)\n .tickFormat(\"d\")\n ;\n protected _gantt: ReactGantt = new ReactGantt(\"center\")\n .stroke(\"#000000\")\n ;\n protected _bottomAxis: Axis = new Axis(\"center\")\n .orientation(\"bottom\")\n .type(\"linear\")\n .shrinkToFit(\"none\")\n .overlapMode(\"hide\")\n .extend(0)\n .tickFormat(\"d\")\n ;\n\n protected _topAxisElement;\n protected _contentElement;\n protected _bottomAxisElement;\n protected _topRect;\n protected _contentRect;\n protected _bottomRect;\n\n protected rangeRenderer;\n\n constructor() {\n super();\n this._drawStartPos = \"origin\";\n this.rangeRenderer = function () {\n const ret = this._gantt.rangeRenderer.apply(this._gantt, arguments);\n if (!arguments.length) return ret;\n return this;\n };\n }\n\n selection(_: any[]): this;\n selection(): any[];\n selection(_?: any[]): any[] | this {\n if (!arguments.length) return this._gantt.selection();\n this._gantt.selection(_);\n return this;\n }\n\n resizeWrappers() {\n\n const w = this.width();\n const h = this.height();\n\n const axisHeight = this.axisHeight(); //TODO: Dynamic scaling to allow for small resolutions?\n\n const contentHeight = (h - (axisHeight * 2));\n const borderOffset1 = this.strokeWidth();\n this._topRect\n .attr(\"height\", axisHeight)\n .attr(\"width\", w)\n .attr(\"fill\", \"transparent\")\n ;\n this._topAxisElement.attr(\"transform\", \"translate(0 0)\");\n this._topAxis.resize({ height: axisHeight, width: w });\n this._contentRect\n .attr(\"height\", contentHeight)\n .attr(\"width\", w)\n .attr(\"fill\", \"transparent\")\n ;\n this._contentElement.attr(\"transform\", `translate(0 ${axisHeight + borderOffset1})`);\n this._gantt.resize({ height: contentHeight, width: w });\n this._bottomRect\n .attr(\"height\", axisHeight)\n .attr(\"width\", w)\n .attr(\"fill\", \"transparent\")\n ;\n this._bottomAxisElement.attr(\"transform\", `translate(0 ${axisHeight + contentHeight + borderOffset1})`);\n this._bottomAxis.resize({ height: axisHeight, width: w });\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n this._gantt.click = (row, col, sel) => {\n this.click(row, col, sel);\n };\n\n this._gantt.dblclick = (row, col, sel) => {\n this.dblclick(row, col, sel);\n };\n\n this._topAxisElement = element.append(\"g\")\n .attr(\"class\", \"top-axis-wrapper\")\n ;\n this._topRect = this._topAxisElement.append(\"rect\")\n .attr(\"class\", \"top-axis-rect\")\n ;\n this._contentElement = element.append(\"g\")\n .attr(\"class\", \"content-wrapper\")\n ;\n this._contentRect = this._contentElement.append(\"rect\")\n .attr(\"class\", \"content-rect\")\n ;\n this._bottomAxisElement = element.append(\"g\")\n .attr(\"class\", \"bottom-axis-wrapper\")\n ;\n this._bottomRect = this._bottomAxisElement.append(\"rect\")\n .attr(\"class\", \"top-axis-rect\")\n ;\n this._topAxis.target(this._topAxisElement.node());\n this._gantt.target(this._contentElement.node()).bucketHeight(30);\n this._bottomAxis.target(this._bottomAxisElement.node());\n\n this.resizeWrappers();\n\n this._gantt.zoomedHook = (transform) => {\n this.onzoom(transform);\n };\n }\n\n onzoom(transform) {\n\n const w = this.width();\n const low = this._gantt._minStart;\n const high = this._gantt._maxEnd;\n const range = high - low;\n const wpp = range / w;\n const nextLow = Math.floor(low - (wpp * (transform.x / transform.k)));\n const nextHigh = Math.ceil((range / transform.k) + nextLow);\n\n this._topAxis\n .fontFamily(this.axisFontFamily())\n .fontSize(this.axisFontSize())\n .tickLength(this.axisTickLength())\n .low(nextLow)\n .high(nextHigh)\n .render()\n ;\n this._bottomAxis\n .fontFamily(this.axisFontFamily())\n .fontSize(this.axisFontSize())\n .tickLength(this.axisTickLength())\n .low(nextLow)\n .high(nextHigh)\n .render()\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._topAxis.tickFormat(this.tickFormat()).render();\n this._bottomAxis.tickFormat(this.tickFormat()).render();\n this._gantt.render();\n }\n\n exit(domNode, element) {\n this._bottomAxis.target(null);\n this._gantt.target(null);\n this._topAxis.target(null);\n super.exit(domNode, element);\n }\n\n columns(): string[];\n columns(_: string[]): this;\n columns(_?: string[]): this | string[] {\n const retVal = super.columns.apply(this, arguments);\n if (arguments.length > 0) {\n this._gantt.columns(_);\n }\n return retVal;\n }\n\n data(): IAxisGanttData[];\n data(_: IAxisGanttData[]): this;\n data(_?: IAxisGanttData[]): this | IAxisGanttData[] {\n const retVal = super.data.apply(this, arguments);\n if (arguments.length > 0) {\n const ganttData: any[] = this.data().map(n => {\n const ret = [...n];\n ret[1] = isNaN(n[1] as any) ? new Date(n[1]).getTime() : Number(n[1]);\n ret[2] = isNaN(n[2] as any) ? new Date(n[2]).getTime() : Number(n[2]);\n return ret;\n });\n this._gantt._minStart = Math.min(...ganttData.map(n => n[1])) ?? 0;\n this._gantt._maxEnd = Math.max(...ganttData.map(n => n[2])) ?? 1;\n this._gantt.data(ganttData);\n }\n return retVal;\n }\n\n resize(_size?: { width: number, height: number }) {\n const retVal = super.resize.apply(this, arguments);\n\n if (this._topAxisElement) {\n this.resizeWrappers();\n }\n\n return retVal;\n }\n\n click(row, col, sel) {\n\n }\n\n dblclick(row, col, sel) {\n\n }\n\n tooltip() {\n return this._gantt._tooltip;\n }\n}\nReactAxisGantt.prototype._class += \" timeline_ReactAxisGantt\";\n\nexport interface ReactAxisGantt {\n tickFormat(): string;\n tickFormat(_: string): this;\n tickFormat_exists(): boolean;\n overlapTolerence(): number;\n overlapTolerence(_: number): this;\n smallestRangeWidth(): number;\n smallestRangeWidth(_: number): this;\n scaleMode(): boolean;\n scaleMode(_: boolean): this;\n fontSize(): number;\n fontSize(_: number): this;\n fontFamily(): string;\n fontFamily(_: string): this;\n strokeWidth(): number;\n strokeWidth(_: number): this;\n stroke(): string;\n stroke(_: string): this;\n cornerRadius(): number;\n cornerRadius(_: number): this;\n axisFontSize(): number;\n axisFontSize(_: number): this;\n axisFontFamily(): string;\n axisFontFamily(_: string): this;\n axisTickLength(): number;\n axisTickLength(_: number): this;\n axisHeight(): number;\n axisHeight(_: number): this;\n titleColumn(): string;\n titleColumn(_: string): this;\n startDateColumn(): string;\n startDateColumn(_: string): this;\n endDateColumn(): string;\n endDateColumn(_: string): this;\n iconColumn(): string;\n iconColumn(_: string): this;\n colorColumn(): string;\n colorColumn(_: string): this;\n bucketColumn(): string;\n bucketColumn(_: string): this;\n maxZoom(): number;\n maxZoom(_: number): this;\n}\nReactAxisGantt.prototype.publish(\"tickFormat\", null, \"string\", \"Format rule applied to axis tick labels\", undefined, { optional: true });\nReactAxisGantt.prototype.publish(\"axisHeight\", 22, \"number\", \"Height of axes (pixels)\");\nReactAxisGantt.prototype.publish(\"overlapTolerence\", 2, \"number\", \"overlapTolerence\");\nReactAxisGantt.prototype.publish(\"smallestRangeWidth\", 10, \"number\", \"Width of the shortest range (pixels)\");\nReactAxisGantt.prototype.publish(\"axisFontSize\", null, \"number\", \"Font size of axis tick labels\");\nReactAxisGantt.prototype.publish(\"axisFontFamily\", null, \"string\", \"Font family of axis tick labels\");\nReactAxisGantt.prototype.publish(\"axisTickLength\", null, \"number\", \"Length of axis ticks\");\nReactAxisGantt.prototype.publishProxy(\"gutter\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"renderMode\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"strokeWidth\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"fontSize\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"fontFamily\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"stroke\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"cornerRadius\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"titleColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"startDateColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"endDateColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"iconColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"colorColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"bucketColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"maxZoom\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"bucketHeight\", \"_gantt\");\n","import { min as d3Min, max as d3Max } from \"d3-array\";\nimport { Axis } from \"@hpcc-js/chart\";\nimport { Border2 } from \"@hpcc-js/layout\";\nimport { React } from \"@hpcc-js/react\";\nimport { ReactGantt } from \"./ReactGantt.ts\";\nimport { IAxisGanttData } from \"./ReactAxisGantt.ts\";\n\nexport class ReactAxisGanttSeries extends Border2 {\n\n protected _topAxis: Axis = new Axis(\"origin\")\n .orientation(\"top\")\n .type(\"linear\")\n .shrinkToFit(\"none\")\n .overlapMode(\"hide\")\n .extend(0)\n .tickFormat(\"d\")\n ;\n protected _gantt: ReactGantt = new ReactGantt(\"origin\")\n .stroke(\"#000000\")\n .fitHeightToContent(true)\n ;\n protected _bottomAxis: Axis = new Axis(\"origin\")\n .orientation(\"bottom\")\n .type(\"linear\")\n .shrinkToFit(\"none\")\n .overlapMode(\"hide\")\n .extend(0)\n .tickFormat(\"d\")\n ;\n\n protected _topAxisElement;\n protected _contentElement;\n protected _bottomAxisElement;\n protected _topRect;\n protected _contentRect;\n protected _bottomRect;\n\n constructor() {\n super();\n this.centerOverflowX_default(\"hidden\");\n this.centerOverflowY_default(\"auto\");\n }\n\n selection(_: any[]): this;\n selection(): any[];\n selection(_?: any[]): any[] | this {\n if (!arguments.length) return this._gantt.selection();\n this._gantt.selection(_);\n return this;\n }\n\n rangeRenderer(): React.FunctionComponent;\n rangeRenderer(_: React.FunctionComponent): this;\n rangeRenderer(_?: React.FunctionComponent): this | React.FunctionComponent {\n const ret = this._gantt.rangeRenderer.apply(this._gantt, arguments);\n if (!arguments.length) return ret;\n return this;\n }\n\n resizeWrappers() {\n\n const w = this.width();\n const h = this.height();\n\n const axisHeight = this.axisHeight(); //TODO: Dynamic scaling to allow for small resolutions?\n const contentHeight = (h - (axisHeight * 2));\n\n this.bottomHeight(axisHeight);\n\n this._topWA.resize({\n width: w,\n height: axisHeight\n });\n this._centerWA.resize({\n width: w,\n height: contentHeight\n });\n this._bottomWA.resize({\n width: w,\n height: axisHeight\n });\n this.top().render();\n this.bottom().render();\n this.center().render();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n this._gantt.click = (row, col, sel) => {\n this.click(row, col, sel);\n };\n\n this._gantt.dblclick = (row, col, sel) => {\n this.dblclick(row, col, sel);\n };\n\n this.top(this._topAxis);\n this.center(this._gantt);\n this.bottom(this._bottomAxis);\n\n this.resizeWrappers();\n\n this._gantt.zoomedHook = (transform) => {\n this.onzoom(transform);\n };\n }\n\n onzoom(transform) {\n const w = this.width();\n const low = this._gantt._minStart;\n const high = this._gantt._maxEnd;\n const range = high - low;\n const wpp = range / w;\n const nextLow = Math.floor(low - (wpp * (transform.x / transform.k)));\n const nextHigh = Math.ceil((range / transform.k) + nextLow);\n\n this._topAxis\n .fontFamily(this.axisFontFamily())\n .fontSize(this.axisFontSize())\n .tickLength(this.axisTickLength())\n .low(nextLow)\n .high(nextHigh)\n .lazyRender()\n ;\n this._bottomAxis\n .fontFamily(this.axisFontFamily())\n .fontSize(this.axisFontSize())\n .tickLength(this.axisTickLength())\n .low(nextLow)\n .high(nextHigh)\n .lazyRender()\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._topAxis.tickFormat(this.tickFormat()).render();\n this._bottomAxis.tickFormat(this.tickFormat()).render();\n this._gantt.render();\n }\n\n columns(): string[];\n columns(_: string[]): this;\n columns(_?: string[]): this | string[] {\n const retVal = super.columns.apply(this, arguments);\n if (arguments.length > 0) {\n this._gantt.columns(_);\n }\n return retVal;\n }\n\n data(): IAxisGanttData[];\n data(_: IAxisGanttData[]): this;\n data(_?: IAxisGanttData[]): this | IAxisGanttData[] {\n const retVal = super.data.apply(this, arguments);\n if (arguments.length > 0) {\n const ganttData: any[] = this.data().map(n => {\n const ret = [...n];\n ret[1] = isNaN(n[1] as any) ? new Date(n[1]).getTime() : Number(n[1]);\n ret[2] = isNaN(n[2] as any) ? new Date(n[2]).getTime() : Number(n[2]);\n return ret;\n });\n\n this._gantt._minStart = d3Min(ganttData, n => n[1]);\n this._gantt._maxEnd = d3Max(ganttData, n => n[2]);\n this._gantt.data(ganttData);\n }\n return retVal;\n }\n\n resize(_size?: { width: number, height: number }) {\n const retVal = super.resize.apply(this, arguments);\n\n if (this._topAxisElement) {\n this.resizeWrappers();\n }\n\n return retVal;\n }\n\n click(row, col, sel) {\n\n }\n\n dblclick(row, col, sel) {\n\n }\n\n tooltip() {\n return this._gantt._tooltip;\n }\n}\nReactAxisGanttSeries.prototype._class += \" timeline_ReactAxisGanttSeries\";\n\nexport interface ReactAxisGanttSeries {\n tickFormat(): string;\n tickFormat(_: string): this;\n tickFormat_exists(): boolean;\n overlapTolerence(): number;\n overlapTolerence(_: number): this;\n smallestRangeWidth(): number;\n smallestRangeWidth(_: number): this;\n scaleMode(): boolean;\n scaleMode(_: boolean): this;\n fontSize(): number;\n fontSize(_: number): this;\n fontFamily(): string;\n fontFamily(_: string): this;\n strokeWidth(): number;\n strokeWidth(_: number): this;\n stroke(): string;\n stroke(_: string): this;\n cornerRadius(): number;\n cornerRadius(_: number): this;\n axisFontSize(): number;\n axisFontSize(_: number): this;\n axisFontFamily(): string;\n axisFontFamily(_: string): this;\n axisTickLength(): number;\n axisTickLength(_: number): this;\n axisHeight(): number;\n axisHeight(_: number): this;\n titleColumn(): string;\n titleColumn(_: string): this;\n startDateColumn(): string;\n startDateColumn(_: string): this;\n endDateColumn(): string;\n endDateColumn(_: string): this;\n iconColumn(): string;\n iconColumn(_: string): this;\n colorColumn(): string;\n colorColumn(_: string): this;\n seriesColumn(): string;\n seriesColumn(_: string): this;\n bucketColumn(): string;\n bucketColumn(_: string): this;\n maxZoom(): number;\n maxZoom(_: number): this;\n}\nReactAxisGanttSeries.prototype.publish(\"tickFormat\", null, \"string\", \"Format rule applied to axis tick labels\", undefined, { optional: true });\nReactAxisGanttSeries.prototype.publish(\"axisHeight\", 22, \"number\", \"Height of axes (pixels)\");\nReactAxisGanttSeries.prototype.publish(\"overlapTolerence\", 2, \"number\", \"overlapTolerence\");\nReactAxisGanttSeries.prototype.publish(\"smallestRangeWidth\", 10, \"number\", \"Width of the shortest range (pixels)\");\nReactAxisGanttSeries.prototype.publish(\"axisFontSize\", null, \"number\", \"Font size of axis tick labels\");\nReactAxisGanttSeries.prototype.publish(\"axisFontFamily\", null, \"string\", \"Font family of axis tick labels\");\nReactAxisGanttSeries.prototype.publish(\"axisTickLength\", null, \"number\", \"Length of axis ticks\");\nReactAxisGanttSeries.prototype.publishProxy(\"gutter\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"renderMode\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"strokeWidth\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"fontSize\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"fontFamily\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"stroke\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"cornerRadius\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"titleColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"startDateColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"endDateColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"iconColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"colorColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"seriesColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"bucketColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"maxZoom\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"evenSeriesBackground\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"oddSeriesBackground\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"bucketHeight\", \"_gantt\");\n","import { timeFormat as d3TimeFormat, timeParse as d3TimeParse } from \"d3-time-format\";\nimport { ReactAxisGantt } from \"./ReactAxisGantt.ts\";\n\nexport class ReactTimeline extends ReactAxisGantt {\n\n protected _axisLabelFormatter;//TODO: add a type to this? d3 time formatting function type?\n\n constructor() {\n super();\n this._drawStartPos = \"origin\";\n this._topAxis.type(\"time\");\n this._bottomAxis.type(\"time\");\n\n this.tooltipHTML((d: any) => {\n const parser = d3TimeParse(\"%Q\");\n const startTime = parser(d[1]);\n const endTime = parser(d[2]);\n\n const formatter = d3TimeFormat(this.tooltipTimeFormat());\n return `<div style=\"text-align:center;\">${d[0]}<br/><br/>${formatter(startTime)} -> ${formatter(endTime)}</div>`;\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n if (this.timePattern_exists()) {\n\n let minTimestamp = Infinity;\n let maxTimestamp = -Infinity;\n let lowDateStr = \"\";\n let highDateStr = \"\";\n this.data().map(n => {\n const start = new Date(n[1]).getTime();\n const end = new Date(n[2]).getTime();\n if (minTimestamp > start) {\n minTimestamp = start;\n lowDateStr = \"\" + n[1];\n }\n if (maxTimestamp < end) {\n maxTimestamp = end;\n highDateStr = \"\" + n[2];\n }\n });\n\n const axisTickFormat = this._axisLabelFormatter\n ? this._axisLabelFormatter\n : (this.tickFormat_exists && this.tickFormat_exists() ? this.tickFormat() : undefined);\n\n this._topAxis\n .type(\"time\")\n .timePattern(this.timePattern())\n .overlapMode(\"none\")\n .low(lowDateStr)\n .high(highDateStr)\n ;\n this._bottomAxis\n .type(\"time\")\n .timePattern(this.timePattern())\n .overlapMode(\"none\")\n .low(lowDateStr)\n .high(highDateStr)\n ;\n\n if (axisTickFormat) {\n this._topAxis.tickFormat(axisTickFormat);\n this._bottomAxis.tickFormat(axisTickFormat);\n } else {\n this._topAxis.tickFormat_reset();\n this._bottomAxis.tickFormat_reset();\n }\n this._gantt._minStart = minTimestamp;\n this._gantt._maxEnd = maxTimestamp;\n }\n }\n\n tooltipHTML(callback) {\n this._tooltipHTML = callback;\n this.tooltip().tooltipHTML(this._tooltipHTML);\n return this;\n }\n\n parseAxisValue(v) {\n const parseTime = d3TimeParse(\"%Q\");\n const parsedTime = parseTime(v);\n\n const formatTime = d3TimeFormat(this.timePattern());\n return formatTime(parsedTime);\n }\n\n onzoom(transform) {\n\n const w = this.width();\n const low = this._gantt._minStart;\n const high = this._gantt._maxEnd;\n const range = high - low;\n const wpp = range / w;\n const nextLow = Math.floor(low - (wpp * (transform.x / transform.k)));\n const nextHigh = Math.ceil((range / transform.k) + nextLow);\n\n this._topAxis\n .low(this.parseAxisValue(nextLow))\n .high(this.parseAxisValue(nextHigh))\n .render()\n ;\n this._bottomAxis\n .low(this.parseAxisValue(nextLow))\n .high(this.parseAxisValue(nextHigh))\n .render()\n ;\n }\n}\nReactTimeline.prototype._class += \" timeline_ReactTimeline\";\n\nexport interface ReactTimeline {\n _tooltipHTML(_): string;\n\n timePattern(): string;\n timePattern(_: string): this;\n timePattern_exists(): boolean;\n tooltipTimeFormat(): string;\n tooltipTimeFormat(_: string): this;\n}\nReactTimeline.prototype.publish(\"timePattern\", \"%Y-%m-%d\", \"string\", \"Time pattern used for parsing datetime strings on each data row\", null, { optional: true });\nReactTimeline.prototype.publish(\"tooltipTimeFormat\", \"%Y-%m-%d\", \"string\", \"Time format used in the default html tooltip\");\n\n","import { timeFormat as d3TimeFormat, timeParse as d3TimeParse } from \"d3-time-format\";\nimport { ReactAxisGanttSeries } from \"./ReactAxisGanttSeries.ts\";\n\nconst parseTime = d3TimeParse(\"%Q\");\nexport class ReactTimelineSeries extends ReactAxisGanttSeries {\n\n protected _axisLabelFormatter;//TODO: add a type to this? d3 time formatting function type?\n\n constructor() {\n super();\n this._topAxis.type(\"time\");\n this._bottomAxis.type(\"time\");\n\n this.tooltipHTML((d: any) => {\n const startTime = parseTime(d[1]);\n const endTime = parseTime(d[2]);\n\n const formatter = d3TimeFormat(this.tooltipTimeFormat());\n return `<div style=\"text-align:center;\">${d[0]}<br/><br/>${formatter(startTime)} -> ${formatter(endTime)}</div>`;\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n if (this.timePattern_exists()) {\n\n let minTimestamp = Infinity;\n let maxTimestamp = -Infinity;\n let lowDateStr = \"\";\n let highDateStr = \"\";\n this.data().forEach(n => {\n const start = new Date(n[1]).getTime();\n const end = new Date(n[2]).getTime();\n if (minTimestamp > start) {\n minTimestamp = start;\n lowDateStr = \"\" + n[1];\n }\n if (maxTimestamp < end) {\n maxTimestamp = end;\n highDateStr = \"\" + n[2];\n }\n });\n\n const axisTickFormat = this._axisLabelFormatter\n ? this._axisLabelFormatter\n : (this.tickFormat_exists && this.tickFormat_exists() ? this.tickFormat() : undefined);\n\n this._topAxis\n .type(\"time\")\n .timePattern(this.timePattern())\n .overlapMode(\"none\")\n .low(lowDateStr)\n .high(highDateStr)\n ;\n this._bottomAxis\n .type(\"time\")\n .timePattern(this.timePattern())\n .overlapMode(\"none\")\n .low(lowDateStr)\n .high(highDateStr)\n ;\n\n if (axisTickFormat) {\n this._topAxis.tickFormat(axisTickFormat);\n this._bottomAxis.tickFormat(axisTickFormat);\n } else {\n this._topAxis.tickFormat_reset();\n this._bottomAxis.tickFormat_reset();\n }\n this._gantt._minStart = minTimestamp;\n this._gantt._maxEnd = maxTimestamp;\n }\n }\n\n tickFormatFunc(fn: (d: any) => string): this;\n tickFormatFunc(): ((d: any) => string) | undefined;\n tickFormatFunc(fn?: (d: any) => string): this | ((d: any) => string) | undefined {\n if (!arguments.length) {\n return this._axisLabelFormatter;\n }\n this._axisLabelFormatter = fn;\n\n // Delegate to underlying Axis instances using the proper method\n this._topAxis.tickFormatFunc(fn);\n this._bottomAxis.tickFormatFunc(fn);\n\n return this;\n }\n\n tooltipHTML(callback) {\n this._tooltipHTML = callback;\n this.tooltip().tooltipHTML(this._tooltipHTML);\n return this;\n }\n\n parseAxisValue(v) {\n const parsedTime = parseTime(v);\n\n const formatTime = d3TimeFormat(this.timePattern());\n return formatTime(parsedTime);\n }\n\n onzoom(transform) {\n\n const w = this.width();\n const low = this._gantt._minStart;\n const high = this._gantt._maxEnd;\n const range = high - low;\n const wpp = range / w;\n const nextLow = Math.floor(low - (wpp * (transform.x / transform.k)));\n const nextHigh = Math.ceil((range / transform.k) + nextLow);\n\n this._topAxis\n .low(this.parseAxisValue(nextLow))\n .high(this.parseAxisValue(nextHigh))\n .render()\n ;\n this._bottomAxis\n .low(this.parseAxisValue(nextLow))\n .high(this.parseAxisValue(nextHigh))\n .render()\n ;\n }\n\n _tooltipHTML: (_) => string;\n}\nReactTimelineSeries.prototype._class += \" timeline_ReactTimelineSeries\";\n\nexport interface ReactTimelineSeries {\n timePattern(): string;\n timePattern(_: string): this;\n timePattern_exists(): boolean;\n tooltipTimeFormat(): string;\n tooltipTimeFormat(_: string): this;\n tickFormatFunc(fn: (d: any) => string): this;\n tickFormatFunc(): ((d: any) => string) | undefined;\n}\nReactTimelineSeries.prototype.publish(\"timePattern\", \"%Y-%m-%d\", \"string\", \"Time pattern used for parsing datetime strings on each data row\", null, { optional: true });\nReactTimelineSeries.prototype.publish(\"tooltipTimeFormat\", \"%Y-%m-%d\", \"string\", \"Time format used in the default html tooltip\");\n\n"],"names":["_MiniGantt","SVGWidget","tlAxis","brAxis","verticalBands","_zoom","gUpperContent","gUpperAxis","gMiddleContent","gLowerAxis","gLowerContent","localRect","d3Local","localEntityPin","tooltipFormatter","_dateCache","rootExtent","_title_idx","_startDate_idx","_endDate_idx","_icon_idx","_color_idx","_yoffset_idx","constructor","super","ITooltip","call","this","Utility","SimpleSelectionMixin","_drawStartPos","tooltipHTML","d","parse","Axis","type","d3ScaleBand","paddingOuter","paddingInner","isHorizontal","orientation","fullExtent","data","map","filter","d3Extent","extent","centerOnMostRecent","parser","d3TimeParse","timePattern","formatter","d3TimeFormat","date1","date2","Date","setFullYear","getFullYear","time1","getTime","timeDiff","dataStartPos","pos","scalePos","dataEndPos","dataWidth","transform","resetZoom","element","d3ZoomIdentity","translate","height","zoomed","d3Event","render","background","enter","domNode","d3Zoom","scaleExtent","maxZoom","on","append","attr","stopPropagation","target","node","tickFormat","guideTarget","shrinkToFit","overlapMode","tickFormat_exists","extend","_selection","widgetElement","_prevIsHorizontal","update","titleColumn","columns","indexOf","startDateColumn","endDateColumn","iconColumn","colorColumn","yOffsetColumn","tooltipTimeFormat","width","x","reverse","low","high","updateScale","y","hi","parseInvert","invert","invertX","invertY","sort","l","r","retVal","localeCompare","events","ranges","brAxisBBox","getBBox","upperContentHeight","updateEntityPins","lowerAxisHeight","lowerHeight","minYOffset","Math","min","apply","row","isNaN","length","visible","y_offset","upperContentYOffset","lowerAxisYOffset","halfMinYOffset","tlAxisBBox","bucketData","bucketIndex","range","i","bucket","endPos","overlapTolerence","push","vbLower","vbHigher","domain","_d","updateEventRanges","event_height","context","entityPins","selectAll","eventFontColor_idx","eventFontColorColumn","eventBorderColor_idx","eventBorderColorColumn","eventBackgroundColor_idx","eventBackgroundColorColumn","title_counts","title_types","Object","keys","title_group_offset","eventGroupOffset","entityPinsEnter","d3Select","raise","each","entityPin","EntityPin","icon","iconOnlyShowOnHover","hideIconWhenCollapsed","titleOnlyShowOnHover","hideTitleWhenCollapsed","descriptionOnlyShowOnHover","hideDescriptionWhenCollapsed","annotationOnlyShowOnHover","hideAnnotationsWhenCollapsed","iconDiameter","iconPaddingPercent","titleFontSize","descriptionColor","descriptionFontSize","iconColor","titleColor","backgroundShape","backgroundColorFill","backgroundColorStroke","cornerRadius","arrowHeight","arrowWidth","set","merge","get","_title","title","x_offset","eventGroupMod","description","parsed_start_time","formatted_start_time","animationFrameRender","move","calc_height","calcHeight","style","exit","remove","event_offset","abs","eventRangeHeight","lines","buckets","bind","entityRect","EntityRect","rangeFontColor","enterEntityRect","click","rowToObj","selected","dblclick","tooltip","hide","show","textBox","bandwidth","rectWidth","max","rectHeight","paddingSize","fontSize","iconSize","fixedHeight","fixedWidth","padding","updateEntityRect","col","sel","textbox","__name","MiniGantt","prototype","_class","implements","mixin","publish","optional","_ReactGantt","SVGZoomWidget","Selection","_buckets","_interpolateX","_interpolateY","_bucketsBySeries","_dataBySeries","_origIdxMap","_seriesBackgrounds","_maxFontSize","_tooltip","_minStart","_maxEnd","_series_idx","_bucket_idx","_maxX","_maxY","_rangeOptions","rangePadding","fontFamily","fill","stroke","textFill","strokeWidth","drawStartPosition","showToolbar_default","HTMLTooltip","followCursor","selection","_","arguments","_rangeRenderer","LabelledRect","rangeRenderer","clear","zoomExtent","seriesColumn","bucketColumn","w","x1","d3ScaleLinear","a","b","forEach","dataRow","origIdx","seriesKey","gutter","bucketOffset","seriesKeys","calcBuckets","n","bucketHeight","maxBucket","_renderElement","key","join","props","hidden","oddSeriesBackground","evenSeriesBackground","interpedStart","zoomTo","setRangeOptions","_maxFontScale","measureDataText","itemSelection","borderOffset1","borderOffset2","_id","id","isSelected","selectionChanged","classed","__lparam","highlightItem","mousein","d3evt","_triggerElement","_cursorLoc","clientX","clientY","fitContent","mouseover","mouseout","that","endX","bucketMap","interpolateY","_i","text","renderRangeElement","x2","xScale","transformEach","options","_transform","k","setAttribute","bucketScale","truncateText","renderMode","_zoomScale","_zoomTranslate","_zoomG","zoomedHook","startKey","endKey","bucketKey","bucketKeyMap","tol","end","i2","_textWidths","_characterWidths","_prevFontFamily","_prevFontSize","forceMeasure","textWidths","characterWidths","textSize","split","char","scale","ret","sum","_width","resize","_size","fitWidthToContent","fitHeightToContent","_element","_col","ReactGantt","_ReactAxisGantt","_topAxis","_gantt","_bottomAxis","_topAxisElement","_contentElement","_bottomAxisElement","_topRect","_contentRect","_bottomRect","resizeWrappers","h","axisHeight","contentHeight","onzoom","wpp","nextLow","floor","nextHigh","ceil","axisFontFamily","axisFontSize","tickLength","axisTickLength","ganttData","Number","ReactAxisGantt","publishProxy","_ReactAxisGanttSeries","Border2","centerOverflowX_default","centerOverflowY_default","bottomHeight","_topWA","_centerWA","_bottomWA","top","bottom","center","lazyRender","d3Min","d3Max","ReactAxisGanttSeries","_ReactTimeline","_axisLabelFormatter","startTime","endTime","timePattern_exists","minTimestamp","Infinity","maxTimestamp","lowDateStr","highDateStr","start","axisTickFormat","tickFormat_reset","callback","_tooltipHTML","parseAxisValue","v","parsedTime","parseTime","formatTime","ReactTimeline","_ReactTimelineSeries","tickFormatFunc","fn","ReactTimelineSeries"],"mappings":"ysBAAO,MCUMA,EAAN,MAAMA,mBAAkBC,EAAAA,UACjBC,OACAC,OACAC,cACAC,MACAC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