import React from 'react';
import { TimelineHistogram } from '@bryntum/calendar';
import { createWidget, shouldComponentUpdate, processWidgetContent } from './WrapperHelper.js';
export class BryntumTimelineHistogram extends React.Component {
    constructor() {
        super(...arguments);
        this.processWidgetContent = processWidgetContent;
        this.portalContainerClass = 'b-react-portal-container';
        this.state = {
            portals: new Map(),
            generation: 0
        };
        this.projectStores = false;
        this.dataStores = {
            'originalStore': 'originals'
        };
    }
    componentDidMount() {
        this.instance = createWidget(this);
    }
    componentWillUnmount() {
        var _a, _b;
        (_b = (_a = this.instance) === null || _a === void 0 ? void 0 : _a.destroy) === null || _b === void 0 ? void 0 : _b.call(_a);
    }
    shouldComponentUpdate(nextProps, nextState) {
        return shouldComponentUpdate(this, nextProps, nextState);
    }
    render() {
        const className = `b-react-timeline-histogram-container`;
        return (React.createElement(React.Fragment, null,
            React.createElement("div", { className: className, ref: (element) => (this.element = element) }, Array.from(this.state.portals).map((item) => item[1])),
            React.createElement("div", { ref: el => (this.portalsCache = el), className: "b-react-portals-cache", style: { display: 'none' } })));
    }
}
BryntumTimelineHistogram.instanceClass = TimelineHistogram;
BryntumTimelineHistogram.instanceName = 'TimelineHistogram';
BryntumTimelineHistogram.isView = true;
BryntumTimelineHistogram.featureNames = [
    'aiFilterFeature',
    'cellCopyPasteFeature',
    'cellEditFeature',
    'cellMenuFeature',
    'cellTooltipFeature',
    'chartsFeature',
    'columnAutoWidthFeature',
    'columnDragToolbarFeature',
    'columnLinesFeature',
    'columnPickerFeature',
    'columnRenameFeature',
    'columnReorderFeature',
    'columnResizeFeature',
    'excelExporterFeature',
    'fileDropFeature',
    'fillHandleFeature',
    'filterFeature',
    'filterBarFeature',
    'groupFeature',
    'groupSummaryFeature',
    'headerMenuFeature',
    'headerZoomFeature',
    'lockRowsFeature',
    'mergeCellsFeature',
    'nonWorkingTimeFeature',
    'panFeature',
    'pdfExportFeature',
    'pinColumnsFeature',
    'printFeature',
    'quickFindFeature',
    'regionResizeFeature',
    'resourceMenuFeature',
    'resourceTimeRangesFeature',
    'rowCopyPasteFeature',
    'rowEditFeature',
    'rowExpanderFeature',
    'rowReorderFeature',
    'rowResizeFeature',
    'scheduleTooltipFeature',
    'searchFeature',
    'sortFeature',
    'splitFeature',
    'stickyCellsFeature',
    'stripeFeature',
    'summaryFeature',
    'timeAxisHeaderMenuFeature',
    'timeRangesFeature',
    'treeFeature',
    'treeGroupFeature'
];
BryntumTimelineHistogram.configNames = [
    'adopt',
    'aggregateDataEntry',
    'aggregateHistogramDataForGroups',
    'animateFilterRemovals',
    'animateRemovingRows',
    'ariaDescription',
    'ariaLabel',
    'autoAdjustTimeAxis',
    'autoHeight',
    'barTooltipTemplate',
    'bbar',
    'bodyCls',
    'bubbleEvents',
    'bufferCoef',
    'bufferThreshold',
    'collapsible',
    'color',
    'config',
    'contentElementCls',
    'contextMenuTriggerEvent',
    'dataField',
    'dataModelField',
    'defaultRegion',
    'destroyStore',
    'detectCSSCompatibilityIssues',
    'disableGridColumnIdWarning',
    'disableGridRowModelWarning',
    'dock',
    'drawer',
    'durationDisplayPrecision',
    'elementAttributes',
    'enableRecurringEvents',
    'enableSticky',
    'enableTextSelection',
    'fillLastColumn',
    'fixedRowHeight',
    'footer',
    'formulaProviders',
    'fullRowRefresh',
    'getBarClass',
    'getBarDOMConfig',
    'getBarText',
    'getBarTextDOMConfig',
    'getDataEntryForAggregating',
    'getOutlineClass',
    'getOutlineDOMConfig',
    'getRecordData',
    'getRowHeight',
    'hardRefreshOnTimeAxisReconfigure',
    'header',
    'hideHorizontalScrollbar',
    'histogramWidgetClass',
    'hoverCls',
    'icon',
    'ignoreDomEventsWhileScrolling',
    'ignoreParentReadOnly',
    'initAggregatedDataEntry',
    'listeners',
    'loadMask',
    'loadMaskDefaults',
    'loadMaskError',
    'localizable',
    'managedEventSizing',
    'maskDefaults',
    'masked',
    'maxDate',
    'maxTimeAxisUnit',
    'minDate',
    'monitorResize',
    'owner',
    'partner',
    'plugins',
    'preserveFocusOnDatasetChange',
    'preserveScrollOnDatasetChange',
    'preventTooltipOnTouch',
    'relayStoreEvents',
    'resizable',
    'resizeToFitIncludesHeader',
    'resourceTimeRangeRenderer',
    'responsiveLevels',
    'ripple',
    'rootElement',
    'scaleColumn',
    'scrollerClass',
    'scrollManager',
    'series',
    'showBarTipWhenNavigatingTimeAxis',
    'showDirty',
    'snapRelativeToEventStartDate',
    'stateful',
    'statefulEvents',
    'stateId',
    'stateProvider',
    'stickyHeaders',
    'strips',
    'subGridConfigs',
    'syncMask',
    'tab',
    'tabBarItems',
    'tbar',
    'timeAxis',
    'type',
    'ui',
    'visibleZoomFactor',
    'weekStartDay',
    'weight',
    'zoomKeepsOriginalTimespan',
    'zoomOnMouseWheel',
    'zoomOnTimeAxisDoubleClick'
];
BryntumTimelineHistogram.propertyConfigNames = [
    'alignSelf',
    'animateTreeNodeToggle',
    'appendTo',
    'barMargin',
    'callOnFunctions',
    'catchEventHandlerExceptions',
    'cellEllipsis',
    'cls',
    'collapsed',
    'column',
    'columnLines',
    'columns',
    'data',
    'dataset',
    'disabled',
    'displayDateFormat',
    'emptyText',
    'enableEventAnimations',
    'enableUndoRedoKeys',
    'endDate',
    'eventColor',
    'eventStyle',
    'extraData',
    'fillTicks',
    'flex',
    'forceFit',
    'height',
    'hidden',
    'hideFooters',
    'hideHeaders',
    'hideRowHover',
    'histogramWidget',
    'id',
    'infiniteScroll',
    'inputFieldAlign',
    'insertBefore',
    'insertFirst',
    'keyMap',
    'labelPosition',
    'longPressTime',
    'margin',
    'maxHeight',
    'maxWidth',
    'maxZoomLevel',
    'minHeight',
    'minWidth',
    'minZoomLevel',
    'onBeforeAssignmentDelete',
    'onBeforeCancelCellEdit',
    'onBeforeCancelRowEdit',
    'onBeforeCellEditStart',
    'onBeforeCellRangeDelete',
    'onBeforeCellRangeEdit',
    'onBeforeColumnDragStart',
    'onBeforeColumnDropFinalize',
    'onBeforeColumnResize',
    'onBeforeCopy',
    'onBeforeCSVExport',
    'onBeforeDestroy',
    'onBeforeEventDelete',
    'onBeforeExcelExport',
    'onBeforeFillHandleDragStart',
    'onBeforeFinishCellEdit',
    'onBeforeFinishRowEdit',
    'onBeforeHide',
    'onBeforeHistogramDataCacheSet',
    'onBeforePan',
    'onBeforePaste',
    'onBeforePdfExport',
    'onBeforePresetChange',
    'onBeforeRenderHistogramRow',
    'onBeforeRenderRecordHistogram',
    'onBeforeRenderRow',
    'onBeforeRenderRows',
    'onBeforeRowCollapse',
    'onBeforeRowExpand',
    'onBeforeSelectionChange',
    'onBeforeSetRecord',
    'onBeforeShow',
    'onBeforeStartRowEdit',
    'onBeforeStateApply',
    'onBeforeStateSave',
    'onBeforeToggleGroup',
    'onBeforeToggleNode',
    'onCancelCellEdit',
    'onCatchAll',
    'onCellClick',
    'onCellContextMenu',
    'onCellDblClick',
    'onCellMenuBeforeShow',
    'onCellMenuItem',
    'onCellMenuShow',
    'onCellMenuToggleItem',
    'onCellMouseEnter',
    'onCellMouseLeave',
    'onCellMouseOut',
    'onCellMouseOver',
    'onCollapse',
    'onCollapseNode',
    'onColumnDrag',
    'onColumnDragStart',
    'onColumnDrop',
    'onColumnResize',
    'onColumnResizeStart',
    'onContextMenuItem',
    'onContextMenuToggleItem',
    'onCopy',
    'onCurrentTimelineUpdate',
    'onDataChange',
    'onDateRangeChange',
    'onDestroy',
    'onDirtyStateChange',
    'onDragSelecting',
    'onElementCreated',
    'onExpand',
    'onExpandNode',
    'onFileDrop',
    'onFillHandleBeforeDragFinalize',
    'onFillHandleDrag',
    'onFillHandleDragAbort',
    'onFillHandleDragEnd',
    'onFillHandleDragStart',
    'onFinishCellEdit',
    'onFinishRowEdit',
    'onFocusIn',
    'onFocusOut',
    'onGridRowBeforeDragStart',
    'onGridRowBeforeDropFinalize',
    'onGridRowDrag',
    'onGridRowDragAbort',
    'onGridRowDragStart',
    'onGridRowDrop',
    'onHeaderClick',
    'onHeaderMenuBeforeShow',
    'onHeaderMenuItem',
    'onHeaderMenuShow',
    'onHeaderMenuToggleItem',
    'onHide',
    'onHistogramDataCacheSet',
    'onLockRows',
    'onMouseOut',
    'onMouseOver',
    'onNoZoomChange',
    'onPaint',
    'onPaste',
    'onPdfExport',
    'onPresetChange',
    'onReadOnly',
    'onRecompose',
    'onRenderRow',
    'onRenderRows',
    'onResize',
    'onResourceMenuBeforeShow',
    'onResourceMenuItem',
    'onResourceMenuShow',
    'onResourceMenuToggleItem',
    'onResourceTimeRangeClick',
    'onResourceTimeRangeContextMenu',
    'onResourceTimeRangeDblClick',
    'onResourceTimeRangeMouseDown',
    'onResourceTimeRangeMouseOut',
    'onResourceTimeRangeMouseOver',
    'onResourceTimeRangeMouseUp',
    'onResponsive',
    'onRowCollapse',
    'onRowExpand',
    'onRowMouseEnter',
    'onRowMouseLeave',
    'onScroll',
    'onSelectionChange',
    'onSelectionModeChange',
    'onShow',
    'onSplit',
    'onSplitterCollapseClick',
    'onSplitterDragEnd',
    'onSplitterDragStart',
    'onSplitterExpandClick',
    'onStartCellEdit',
    'onStartRowEdit',
    'onSubGridCollapse',
    'onSubGridExpand',
    'onTickSizeChange',
    'onTimeAxisChange',
    'onTimeAxisHeaderClick',
    'onTimeAxisHeaderContextMenu',
    'onTimeAxisHeaderDblClick',
    'onTimeAxisHeaderMenuBeforeShow',
    'onTimeAxisHeaderMenuItem',
    'onTimeAxisHeaderMenuShow',
    'onTimelineContextChange',
    'onTimelineViewportResize',
    'onTimeRangeHeaderClick',
    'onTimeRangeHeaderContextMenu',
    'onTimeRangeHeaderDblClick',
    'onToggleGroup',
    'onToggleNode',
    'onToolClick',
    'onUnlockRows',
    'onUnsplit',
    'onVisibleDateRangeChange',
    'preserveScroll',
    'presets',
    'readOnly',
    'recurrenceConfirmationPopup',
    'rendition',
    'rowHeight',
    'rowLines',
    'rtl',
    'scalePoints',
    'scrollable',
    'selectionMode',
    'showBarTip',
    'snap',
    'span',
    'startDate',
    'stateSettings',
    'store',
    'suppressFit',
    'tickSize',
    'timeResolution',
    'timeZone',
    'title',
    'tools',
    'transition',
    'transitionDuration',
    'viewPreset',
    'visibleDate',
    'width',
    'workingTime'
];
BryntumTimelineHistogram.propertyNames = [
    'focusVisible',
    'hasChanges',
    'originalStore',
    'parent',
    'scrollLeft',
    'scrollTop',
    'scrollX',
    'selectedCell',
    'selectedCells',
    'selectedRecord',
    'selectedRecords',
    'selectedRows',
    'state',
    'tooltip',
    'zoomLevel'
];
//# sourceMappingURL=BryntumTimelineHistogram.js.map