{"version":3,"file":"index.umd.cjs","names":[],"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 _prevZoomState: { visibleStart: number; visibleEnd: number } | null = null;\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]} -&gt; ${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\n        if (!this.preserveZoom() || !this._prevZoomState) {\n            const interpedStart = this._interpolateX(this._minStart);\n            this.zoomTo(\n                [interpedStart, 0],\n                1\n            );\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        // restore zoom state after all rendering is set up\n        if (this.preserveZoom() && this._prevZoomState && this._interpolateX) {\n            const width = this.width();\n            if (width > 0) {\n                const visibleStart = this._minStart;\n                const visibleEnd = this._maxEnd;\n                const clampedStart = Math.max(visibleStart, Math.min(visibleEnd, this._prevZoomState.visibleStart));\n                let clampedEnd = Math.max(visibleStart, Math.min(visibleEnd, this._prevZoomState.visibleEnd));\n                if (clampedEnd <= clampedStart) {\n                    const visibleWidth = visibleEnd - visibleStart;\n                    const epsilon = visibleWidth * 1e-6 || 1e-6;\n                    clampedEnd = Math.min(visibleEnd, clampedStart + epsilon);\n                }\n                const startPixel = this._interpolateX(clampedStart);\n                const endPixel = this._interpolateX(clampedEnd);\n                const span = endPixel - startPixel;\n                if (isFinite(span) && Math.abs(span) > 1e-9) {\n                    const rawScale = width / span;\n                    const minScale = 0.05; // must match zoomExtent minimum set at start of update()\n                    const maxScale = this.maxZoom();\n                    const targetScale = Math.max(minScale, Math.min(maxScale, rawScale));\n\n                    if (targetScale > 0 && isFinite(targetScale)) {\n                        const centerPixel = (startPixel + endPixel) / 2;\n                        const halfViewport = width / (2 * targetScale);\n                        const x0 = this._interpolateX(visibleStart);\n                        const x1 = this._interpolateX(visibleEnd);\n\n                        let clampedCenter = centerPixel;\n                        if (clampedCenter - halfViewport < x0) {\n                            clampedCenter = x0 + halfViewport;\n                        }\n                        if (clampedCenter + halfViewport > x1) {\n                            clampedCenter = x1 - halfViewport;\n                        }\n\n                        const translateX = (width / 2) - (targetScale * clampedCenter);\n                        if (isFinite(translateX)) {\n                            this.zoomTo([translateX, 0], targetScale);\n                        }\n                    }\n                }\n            }\n        }\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        // store current visible range for zoom preservation\n        if (this._interpolateX && typeof this._interpolateX.invert === \"function\") {\n            const width = this.width();\n            if (width > 0 && isFinite(transform.k) && transform.k !== 0) {\n                const startPixel = (0 - transform.x) / transform.k;\n                const endPixel = (width - transform.x) / transform.k;\n                let visibleStart = this._interpolateX.invert(startPixel);\n                let visibleEnd = this._interpolateX.invert(endPixel);\n                if (isFinite(visibleStart) && isFinite(visibleEnd)) {\n                    if (visibleStart > visibleEnd) {\n                        const tmp = visibleStart;\n                        visibleStart = visibleEnd;\n                        visibleEnd = tmp;\n                    }\n                    this._prevZoomState = {\n                        visibleStart,\n                        visibleEnd\n                    };\n                }\n            }\n        }\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: Math.max(this._maxY ?? 0, _size?.height ?? 0)\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    preserveZoom(): boolean;\n    preserveZoom(_: 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(\"preserveZoom\", false, \"boolean\", \"If true, maintain zoom level when data is updated\");\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    preserveZoom(): boolean;\n    preserveZoom(_: boolean): 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(\"preserveZoom\", \"_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)} -&gt; ${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)} -&gt; ${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"],"mappings":"mqBAAa,EAAW,oBACX,EAAc,QACd,EAAgB,SCQhB,UAAb,cAA+B,EAAA,SAAU,CACrC,OACA,OACA,cACA,MACA,cACA,WACA,eACA,WACA,cACA,WAAA,EAAA,EAAA,OAAwC,EACxC,gBAAA,EAAA,EAAA,OAA4C,EAC5C,iBACA,WAEA,WACA,WAAuB,EACvB,eAA2B,EAC3B,aAAyB,EACzB,UAAsB,GACtB,WAAuB,GACvB,aAAyB,GAEzB,aAAc,CACV,MAAM,EACN,EAAA,SAAS,KAAK,IAAI,EAClB,EAAA,QAAQ,qBAAqB,KAAK,IAAI,EAEtC,KAAK,cAAgB,SACrB,KAAK,YAAa,GAAW,WAAW,EAAE,KAAK,YAAY,eAAe,KAAK,iBAAiB,KAAK,OAAO,MAAM,EAAE,KAAK,eAAe,CAAC,EAAE,MAAM,KAAK,iBAAiB,KAAK,OAAO,MAAM,EAAE,KAAK,aAAa,CAAC,GAAG,EAEjN,KAAK,OAAS,IAAI,EAAA,KAAK,EAClB,KAAK,MAAM,EAEhB,KAAK,OAAS,IAAI,EAAA,KAAK,EAClB,KAAK,MAAM,EAEhB,KAAK,eAAA,EAAA,EAAA,WAA4B,EAC5B,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