d2coreui 23.0.36 → 23.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"rangeSelector.js","sourceRoot":"","sources":["../../../../../components/grid/cell/rangeSelector.js"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,SAAS,EACT,OAAO,EACP,oBAAoB,EACpB,0BAA0B,EAC1B,YAAY,EACZ,YAAY,EACZ,yBAAyB,EACzB,WAAW,EACX,uBAAuB,EACvB,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,2BAA2B,EAC3B,KAAK,EACL,SAAS,EACT,QAAQ,EACR,KAAK,EACL,cAAc,EACd,oBAAoB,GACvB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,MAAM,aAAa,GAAG;IAClB,MAAM,EAAE,CAAC;IACT,WAAW,EAAE,CAAC;CACjB,CAAC;AAEF,MAAM,OAAO,aAAc,SAAQ,QAAQ;IAGvC;QACI,KAAK,EAAE,CAAC;QAHZ,aAAQ,GAAG,UAAU,CAAC;QAKlB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvD,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACnC,CAAC;IAED,SAAS,CAAC,KAAK;QACX,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;Q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r\n _exists,\r\n _getAbsoluteRowIndex,\r\n _getCellCtrlForEventTarget,\r\n _getRowAbove,\r\n _getRowBelow,\r\n _getRowCtrlForEventTarget,\r\n _getRowNode,\r\n _getSuppressMultiRanges,\r\n _isDomLayout,\r\n _isRowBefore,\r\n _isSameRow,\r\n _isUsingNewCellSelectionAPI,\r\n _last,\r\n _makeNull,\r\n _missing,\r\n _warn,\r\n isRowNumberCol,\r\n _getRowSelectionMode,\r\n} from 'ag-grid-community';\r\n\r\nimport {DragListenerFeature} from './dragListenerFeature';\r\n\r\nconst SelectionMode = {\r\n NORMAL: 0,\r\n ALL_COLUMNS: 1,\r\n};\r\n\r\nexport class RangeSelector extends BeanStub {\r\n beanName = 'rangeSvc';\r\n\r\n constructor() {\r\n super();\r\n\r\n this.bodyScrollListener = this.onBodyScroll.bind(this);\r\n this.cellRanges = [];\r\n this.dragging = false;\r\n this.intersectionRange = false;\r\n }\r\n\r\n wireBeans(beans) {\r\n this.rowModel = beans.rowModel;\r\n this.dragSvc = beans.dragSvc;\r\n this.colModel = beans.colModel;\r\n this.visibleCols = beans.visibleCols;\r\n this.cellNavigation = beans.cellNavigation;\r\n this.ctrlsSvc = beans.ctrlsSvc;\r\n this.valueSvc = beans.valueSvc;\r\n this.gridApi = beans.gridApi;\r\n }\r\n\r\n postConstruct() {\r\n const onColumnsChanged = this.onColumnsChanged.bind(this);\r\n const removeAllCellRanges = () => this.removeAllCellRanges();\r\n const refreshLastRangeStart = this.refreshLastRangeStart.bind(this);\r\n this.addManagedEventListeners({\r\n newColumnsLoaded: onColumnsChanged,\r\n columnVisible: onColumnsChanged,\r\n columnValueChanged: onColumnsChanged,\r\n columnPivotModeChanged: removeAllCellRanges,\r\n columnRowGroupChanged: removeAllCellRanges,\r\n columnPivotChanged: removeAllCellRanges,\r\n columnGroupOpened: refreshLastRangeStart,\r\n columnMoved: refreshLastRangeStart,\r\n columnPinned: refreshLastRangeStart,\r\n });\r\n\r\n this.ctrlsSvc.whenReady(this, (p) => {\r\n const gridBodyCtrl = p.gridBodyCtrl;\r\n this.autoScrollService = new AutoScrollService({\r\n scrollContainer: gridBodyCtrl.eBodyViewport,\r\n scrollAxis: 'xy',\r\n getVerticalPosition: () => gridBodyCtrl.scrollFeature.getVScrollPosition().top,\r\n setVerticalPosition: (position) => gridBodyCtrl.scrollFeature.setVerticalScrollPosition(position),\r\n getHorizontalPosition: () => gridBodyCtrl.scrollFeature.getHScrollPosition().left,\r\n setHorizontalPosition: (position) => gridBodyCtrl.scrollFeature.setHorizontalScrollPosition(position),\r\n shouldSkipVerticalScroll: () => !_isDomLayout(this.gos, 'normal'),\r\n shouldSkipHorizontalScroll: () => !gridBodyCtrl.scrollFeature.isHorizontalScrollShowing(),\r\n });\r\n });\r\n }\r\n\r\n // Drag And Drop Target Methods\r\n onDragStart(mouseEvent) {\r\n const gos = this.gos;\r\n if (\r\n _getRowCtrlForEventTarget(gos, mouseEvent.target)?.isSuppressMouseEvent(mouseEvent)\r\n ) {\r\n return;\r\n }\r\n\r\n const {ctrlKey, metaKey, shiftKey} = mouseEvent;\r\n\r\n // ctrlKey for windows, metaKey for Apple\r\n const isMultiKey = ctrlKey || metaKey;\r\n const allowMulti = !_getSuppressMultiRanges(gos);\r\n const isMultiSelect = allowMulti ? isMultiKey : false;\r\n const extendRange = shiftKey && !!this.cellRanges?.length;\r\n\r\n if (!isMultiSelect && (!extendRange || _exists(_last(this.cellRanges).type))) {\r\n this.removeAllCellRanges(true);\r\n }\r\n\r\n // The browser changes the Event target of cached events when working with the ShadowDOM\r\n // so we need to retrieve the initial DragStartTarget.\r\n const startTarget = this.dragSvc.startTarget;\r\n\r\n if (startTarget) {\r\n this.updateValuesOnMove(startTarget);\r\n }\r\n\r\n if (!this.lastCellHovered) {\r\n return;\r\n }\r\n\r\n this.dragging = true;\r\n this.lastMouseEvent = mouseEvent;\r\n this.intersectionRange = isMultiSelect && this.getCellRangeCount(this.lastCellHovered) > 1;\r\n\r\n if (!extendRange) {\r\n this.setNewestRangeStartCell(this.lastCellHovered);\r\n }\r\n\r\n // if we didn't clear the ranges, then dragging means the user clicked, and when the\r\n // user clicks it means a range of one cell was created. we need to extend this range\r\n // rather than creating another range. otherwise we end up with two distinct ranges\r\n // from a drag operation (one from click, and one from drag).\r\n if (this.cellRanges.length > 0) {\r\n this.draggingRange = _last(this.cellRanges);\r\n } else {\r\n const mouseRowPosition = {\r\n rowIndex: this.lastCellHovered.rowIndex,\r\n rowPinned: this.lastCellHovered.rowPinned,\r\n };\r\n\r\n const columns = this.getColumnsFromModel([this.lastCellHovered.column]);\r\n\r\n if (!columns?.length) {\r\n return;\r\n }\r\n\r\n this.draggingRange = {\r\n startRow: mouseRowPosition,\r\n endRow: mouseRowPosition,\r\n columns,\r\n startColumn: this.newestRangeStartCell.column,\r\n };\r\n\r\n this.cellRanges.push(this.draggingRange);\r\n }\r\n\r\n this.ctrlsSvc\r\n .getGridBodyCtrl()\r\n .eBodyViewport.addEventListener('scroll', this.bodyScrollListener, {passive: true});\r\n\r\n this.dispatchChangedEvent(true, false, this.draggingRange.id);\r\n }\r\n\r\n onDragging(mouseEvent) {\r\n const {dragging, lastCellHovered, newestRangeStartCell, autoScrollService, cellHasChanged} = this;\r\n if (!dragging || !mouseEvent) {\r\n return;\r\n }\r\n\r\n this.updateValuesOnMove(mouseEvent.target);\r\n\r\n this.lastMouseEvent = mouseEvent;\r\n\r\n const isMouseAndStartInPinned = (position) =>\r\n lastCellHovered && lastCellHovered.rowPinned === position && newestRangeStartCell.rowPinned === position;\r\n\r\n const skipVerticalScroll = isMouseAndStartInPinned('top') || isMouseAndStartInPinned('bottom');\r\n\r\n autoScrollService.check(mouseEvent, skipVerticalScroll);\r\n\r\n if (!cellHasChanged || !lastCellHovered) {\r\n return;\r\n }\r\n\r\n const startColumn = newestRangeStartCell?.column;\r\n const currentColumn = lastCellHovered?.column;\r\n\r\n const columns = this.calculateColumnsBetween(startColumn, currentColumn);\r\n\r\n if (!columns) {\r\n return;\r\n }\r\n\r\n const {rowIndex, rowPinned} = lastCellHovered;\r\n\r\n this.draggingRange.endRow = {\r\n rowIndex,\r\n rowPinned,\r\n };\r\n\r\n this.draggingRange.columns = columns;\r\n this.dispatchChangedEvent(false, false, this.draggingRange.id);\r\n }\r\n\r\n onDragStop() {\r\n if (!this.dragging) {\r\n return;\r\n }\r\n\r\n const {id} = this.draggingRange;\r\n\r\n this.autoScrollService.ensureCleared();\r\n\r\n this.ctrlsSvc.getGridBodyCtrl().eBodyViewport.removeEventListener('scroll', this.bodyScrollListener);\r\n this.lastMouseEvent = null;\r\n this.dragging = false;\r\n this.draggingRange = undefined;\r\n this.lastCellHovered = undefined;\r\n\r\n if (this.intersectionRange) {\r\n this.intersectionRange = false;\r\n this.intersectLastRange();\r\n }\r\n\r\n this.dispatchChangedEvent(false, true, id);\r\n }\r\n\r\n // Called for both columns loaded & column visibility events\r\n onColumnsChanged() {\r\n // first move start column in last cell range (i.e. series chart range)\r\n this.refreshLastRangeStart();\r\n\r\n const allColumns = this.visibleCols.allCols;\r\n\r\n // check that the columns in each range still exist and are visible\r\n for (const cellRange of this.cellRanges) {\r\n const beforeCols = cellRange.columns;\r\n\r\n // remove hidden or removed cols from cell range\r\n cellRange.columns = cellRange.columns.filter(\r\n (col) => col.isVisible() && allColumns.indexOf(col) !== -1\r\n );\r\n\r\n const colsInRangeChanged = !_areEqual(beforeCols, cellRange.columns);\r\n\r\n if (colsInRangeChanged) {\r\n // notify users and other parts of grid (i.e. status panel) that range has changed\r\n this.dispatchChangedEvent(false, true, cellRange.id);\r\n }\r\n }\r\n // Remove empty cell ranges\r\n const countBefore = this.cellRanges.length;\r\n this.cellRanges = this.cellRanges.filter((range) => range.columns.length > 0);\r\n if (countBefore > this.cellRanges.length) {\r\n this.dispatchChangedEvent(false, true);\r\n }\r\n }\r\n\r\n refreshLastRangeStart() {\r\n const lastRange = _last(this.cellRanges);\r\n\r\n if (!lastRange) {\r\n return;\r\n }\r\n\r\n this.refreshRangeStart(lastRange);\r\n }\r\n\r\n isContiguousRange(cellRange) {\r\n const rangeColumns = cellRange.columns;\r\n\r\n if (!rangeColumns.length) {\r\n return false;\r\n }\r\n\r\n const allColumns = this.visibleCols.allCols;\r\n const allPositions = rangeColumns.map((c) => allColumns.indexOf(c)).sort((a, b) => a - b);\r\n\r\n return _last(allPositions) - allPositions[0] + 1 === rangeColumns.length;\r\n }\r\n\r\n getRangeStartRow(cellRange) {\r\n if (cellRange.startRow && cellRange.endRow) {\r\n return _isRowBefore(cellRange.startRow, cellRange.endRow) ? cellRange.startRow : cellRange.endRow;\r\n }\r\n\r\n const pinnedTopRowCount = this.beans.pinnedRowModel?.getPinnedTopRowCount() ?? 0;\r\n const rowPinned = pinnedTopRowCount > 0 ? 'top' : null;\r\n\r\n return {rowIndex: 0, rowPinned};\r\n }\r\n\r\n getRangeEndRow(cellRange) {\r\n if (cellRange.startRow && cellRange.endRow) {\r\n return _isRowBefore(cellRange.startRow, cellRange.endRow) ? cellRange.endRow : cellRange.startRow;\r\n }\r\n\r\n const pinnedBottomRowCount = this.beans.pinnedRowModel?.getPinnedBottomRowCount() ?? 0;\r\n const pinnedBottom = pinnedBottomRowCount > 0;\r\n\r\n if (pinnedBottom) {\r\n return {\r\n rowIndex: pinnedBottomRowCount - 1,\r\n rowPinned: 'bottom',\r\n };\r\n }\r\n\r\n return {\r\n rowIndex: this.rowModel.getRowCount() - 1,\r\n rowPinned: null,\r\n };\r\n }\r\n\r\n getRangeRowCount(cellRange) {\r\n const beans = this.beans;\r\n const start = this.getRangeStartRow(cellRange);\r\n const end = this.getRangeEndRow(cellRange);\r\n\r\n const startIndex = _getAbsoluteRowIndex(beans, start);\r\n const endIndex = _getAbsoluteRowIndex(beans, end);\r\n\r\n return endIndex - startIndex + 1;\r\n }\r\n\r\n setRangeToCell(cell, appendRange = false) {\r\n const {gos} = this;\r\n\r\n const isRowNumbersEnabled = gos.get('rowNumbers');\r\n const allColumnsRange = isRowNumberCol(cell.column);\r\n if (isRowNumbersEnabled) {\r\n this.setSelectionMode(allColumnsRange);\r\n }\r\n\r\n const columns = this.calculateColumnsBetween(cell.column, cell.column);\r\n\r\n if (!columns) {\r\n return;\r\n }\r\n\r\n const suppressMultiRangeSelections = _getSuppressMultiRanges(this.gos);\r\n\r\n // if not appending, then clear previous range selections\r\n if (suppressMultiRangeSelections || !appendRange || _missing(this.cellRanges)) {\r\n this.removeAllCellRanges(true);\r\n }\r\n\r\n const rowForCell = {\r\n rowIndex: cell.rowIndex,\r\n rowPinned: cell.rowPinned,\r\n };\r\n\r\n const cellRange = {\r\n startRow: rowForCell,\r\n endRow: rowForCell,\r\n columns,\r\n startColumn: cell.column,\r\n };\r\n\r\n this.cellRanges.push(cellRange);\r\n\r\n this.setNewestRangeStartCell(cell);\r\n this.onDragStop();\r\n this.dispatchChangedEvent(true, true);\r\n }\r\n\r\n getRangeLastColumn(cellRange) {\r\n const firstCol = cellRange.columns[0];\r\n const lastCol = _last(cellRange.columns);\r\n\r\n return (this.newestRangeStartCell?.column === firstCol ? lastCol : firstCol);\r\n }\r\n\r\n extendRangeRowCountBy(cellRange, targetCount) {\r\n const {beans} = this;\r\n const {startRow, endRow} = cellRange;\r\n\r\n if (!startRow || !endRow) {\r\n return;\r\n }\r\n\r\n let stepsMoved = 0;\r\n let currentRow;\r\n\r\n const isBottomUp = _isRowBefore(endRow, startRow);\r\n if (isBottomUp) {\r\n currentRow = startRow;\r\n } else {\r\n currentRow = endRow;\r\n }\r\n\r\n const stepFn = targetCount > 0 ? _getRowBelow : _getRowAbove;\r\n const stepCount = Math.abs(targetCount);\r\n\r\n while (stepsMoved < stepCount) {\r\n const nextRow = stepFn(beans, currentRow);\r\n if (!nextRow) {\r\n break;\r\n }\r\n currentRow = nextRow;\r\n stepsMoved++;\r\n }\r\n\r\n if (stepsMoved !== stepCount) {\r\n return; // Could not move the desired number of rows\r\n }\r\n\r\n const cellPosition = {\r\n ...currentRow,\r\n column: this.getRangeLastColumn(cellRange),\r\n };\r\n\r\n this.updateRangeRowBoundary({cellRange, boundary: isBottomUp ? 'start' : 'end', cellPosition});\r\n }\r\n\r\n extendRangeColumnCountBy(cellRange, delta) {\r\n const {columns, startColumn} = cellRange;\r\n\r\n if (delta === 0) {\r\n return;\r\n }\r\n\r\n const allColumns = this.getColumnsFromModel(); // ordered visible columns\r\n\r\n if (!allColumns) {\r\n return;\r\n }\r\n\r\n const lastColumn = _last(columns);\r\n const endColumn = startColumn === columns[0] ? lastColumn : columns[0];\r\n\r\n if (!lastColumn || !endColumn) {\r\n return;\r\n }\r\n\r\n let startIdx = allColumns.indexOf(startColumn);\r\n const endIdx = allColumns.indexOf(endColumn);\r\n const isRtlRange = endIdx < startIdx;\r\n\r\n if (isRtlRange) {\r\n // if we are anchoring to the left and the range is rtl\r\n // then we need to flip the start and end indices\r\n startIdx = endIdx;\r\n }\r\n\r\n const currentLength = columns.length;\r\n const targetLength = currentLength + delta;\r\n\r\n if (targetLength <= 0) {\r\n return; // can't shrink to 0 or less\r\n }\r\n\r\n const newColumns = [];\r\n\r\n for (let i = startIdx; i < startIdx + targetLength; i++) {\r\n const col = allColumns[i];\r\n if (!col) {\r\n break;\r\n }\r\n newColumns.push(col);\r\n }\r\n\r\n // Only update if length actually changed\r\n if (newColumns.length === targetLength) {\r\n if (isRtlRange) {\r\n // before we add changes to the range, the\r\n // new range start should receive focus\r\n const newColumnToFocus = _last(newColumns);\r\n cellRange.startColumn = newColumnToFocus;\r\n this.focusCellOnNewColumn(cellRange, newColumnToFocus);\r\n }\r\n cellRange.columns = newColumns;\r\n this.dispatchChangedEvent(true, true, cellRange.id);\r\n }\r\n }\r\n\r\n extendLatestRangeToCell(cellPosition) {\r\n if (this.isEmpty() || !this.newestRangeStartCell) {\r\n return;\r\n }\r\n\r\n const cellRange = _last(this.cellRanges);\r\n\r\n this.setSelectionMode(isRowNumberCol(cellPosition.column));\r\n this.updateRangeRowBoundary({cellRange, boundary: 'end', cellPosition});\r\n }\r\n\r\n updateRangeRowBoundary(params) {\r\n const {cellRange, boundary, cellPosition, silent = false} = params;\r\n const endColumn = cellPosition.column;\r\n const colsToAdd = this.calculateColumnsBetween(cellRange.startColumn, endColumn);\r\n\r\n if (!colsToAdd || this.isLastCellOfRange(cellRange, cellPosition)) {\r\n return;\r\n }\r\n\r\n if (boundary === 'start') {\r\n this.focusCellOnNewRow(cellRange, cellPosition);\r\n }\r\n\r\n cellRange.columns = colsToAdd;\r\n cellRange[boundary === 'start' ? 'startRow' : 'endRow'] = {\r\n rowIndex: cellPosition.rowIndex,\r\n rowPinned: cellPosition.rowPinned,\r\n };\r\n\r\n if (!silent) {\r\n this.dispatchChangedEvent(true, true, cellRange.id);\r\n }\r\n }\r\n\r\n getRangeEdgeColumns(cellRange) {\r\n const allColumns = this.visibleCols.allCols;\r\n const allIndices = cellRange.columns\r\n .map((c) => allColumns.indexOf(c))\r\n .filter((i) => i > -1)\r\n .sort((a, b) => a - b);\r\n\r\n return {\r\n left: allColumns[allIndices[0]],\r\n right: allColumns[_last(allIndices)],\r\n };\r\n }\r\n\r\n // returns true if successful, false if not successful\r\n extendLatestRangeInDirection(event) {\r\n if (this.isEmpty() || !this.newestRangeStartCell) {\r\n return;\r\n }\r\n\r\n const key = event.key;\r\n const ctrlKey = event.ctrlKey || event.metaKey;\r\n\r\n const lastRange = _last(this.cellRanges);\r\n const startCell = this.newestRangeStartCell;\r\n\r\n // find the cell that is at the furthest away corner from the starting cell\r\n const endCellIndex = lastRange.endRow.rowIndex;\r\n const endCellFloating = lastRange.endRow.rowPinned;\r\n const endCellColumn = this.getRangeLastColumn(lastRange);\r\n\r\n const endCell = {column: endCellColumn, rowIndex: endCellIndex, rowPinned: endCellFloating};\r\n const newEndCell = this.cellNavigation.getNextCellToFocus(key, endCell, ctrlKey);\r\n\r\n // if user is at end of grid, so no cell to extend to, we return false\r\n if (!newEndCell) {\r\n return;\r\n }\r\n\r\n this.setCellRange({\r\n rowStartIndex: startCell.rowIndex,\r\n rowStartPinned: startCell.rowPinned,\r\n rowEndIndex: newEndCell.rowIndex,\r\n rowEndPinned: newEndCell.rowPinned,\r\n columnStart: startCell.column,\r\n columnEnd: newEndCell.column,\r\n });\r\n\r\n return newEndCell;\r\n }\r\n\r\n setCellRange(params) {\r\n this.removeAllCellRanges(true);\r\n this.addCellRange(params);\r\n }\r\n\r\n setCellRanges(cellRanges) {\r\n if (_areEqual(this.cellRanges, cellRanges)) {\r\n return;\r\n }\r\n\r\n if (!this.verifyCellRanges(this.gos)) {\r\n return;\r\n }\r\n\r\n this.removeAllCellRanges(true);\r\n\r\n for (const cellRange of cellRanges) {\r\n if (cellRange.columns && cellRange.startRow) {\r\n const columns = this.getColumnsFromModel(cellRange.columns);\r\n if (!columns || columns.length === 0) {\r\n continue;\r\n }\r\n\r\n cellRange.columns = columns;\r\n\r\n const {startRow} = cellRange;\r\n\r\n this.setNewestRangeStartCell({\r\n rowIndex: startRow.rowIndex,\r\n rowPinned: startRow.rowPinned,\r\n column: cellRange.columns[0],\r\n });\r\n }\r\n\r\n this.cellRanges.push(cellRange);\r\n }\r\n\r\n this.dispatchChangedEvent(false, true);\r\n }\r\n\r\n clearCellRangeCellValues(params) {\r\n const {beans, valueSvc, eventSvc} = this;\r\n const {cellEventSource = 'rangeSvc', dispatchWrapperEvents, wrapperEventSource = 'deleteKey'} = params;\r\n\r\n let {cellRanges} = params;\r\n\r\n if (dispatchWrapperEvents) {\r\n eventSvc.dispatchEvent({\r\n type: 'cellSelectionDeleteStart',\r\n source: wrapperEventSource,\r\n });\r\n eventSvc.dispatchEvent({\r\n type: 'rangeDeleteStart',\r\n source: wrapperEventSource,\r\n });\r\n }\r\n\r\n if (!cellRanges) {\r\n cellRanges = this.cellRanges;\r\n }\r\n\r\n for (const cellRange of cellRanges) {\r\n this.forEachRowInRange(cellRange, (rowPosition) => {\r\n const rowNode = _getRowNode(beans, rowPosition);\r\n if (!rowNode) {\r\n return;\r\n }\r\n for (let i = 0; i < cellRange.columns.length; i++) {\r\n const column = this.getColumnFromModel(cellRange.columns[i]);\r\n if (!column?.isCellEditable(rowNode)) {\r\n continue;\r\n }\r\n const emptyValue = valueSvc.getDeleteValue(column, rowNode);\r\n rowNode.setDataValue(column, emptyValue, cellEventSource);\r\n }\r\n });\r\n }\r\n\r\n if (dispatchWrapperEvents) {\r\n eventSvc.dispatchEvent({\r\n type: 'cellSelectionDeleteEnd',\r\n source: wrapperEventSource,\r\n });\r\n eventSvc.dispatchEvent({\r\n type: 'rangeDeleteEnd',\r\n source: wrapperEventSource,\r\n });\r\n }\r\n }\r\n\r\n createCellRangeFromCellRangeParams(params) {\r\n return this.createPartialCellRangeFromRangeParams(params, false);\r\n }\r\n\r\n // Range service can't normally support a range without columns, but charts can\r\n createPartialCellRangeFromRangeParams(\r\n params,\r\n allowEmptyColumns\r\n ) {\r\n const {\r\n columns: paramColumns,\r\n columnStart,\r\n columnEnd,\r\n rowStartIndex,\r\n rowStartPinned,\r\n rowEndIndex,\r\n rowEndPinned,\r\n } = params;\r\n const columnInfo = this.getColumnsFromParams(\r\n paramColumns,\r\n columnStart,\r\n columnEnd\r\n );\r\n\r\n if (!columnInfo || (!allowEmptyColumns && columnInfo.columns.length === 0)) {\r\n return;\r\n }\r\n\r\n const {columns, startsOnTheRight} = columnInfo;\r\n\r\n const startRow = this.createRowPosition(rowStartIndex, rowStartPinned);\r\n const endRow = this.createRowPosition(rowEndIndex, rowEndPinned);\r\n\r\n return {\r\n startRow,\r\n endRow,\r\n columns,\r\n startColumn:\r\n this.getColumnFromModel(columnStart) ?? (startsOnTheRight ? _last(columns) : columns[0]),\r\n };\r\n }\r\n\r\n addCellRange(params) {\r\n const gos = this.gos;\r\n if (!this.verifyCellRanges(gos)) {\r\n return;\r\n }\r\n\r\n // when creating a new range via API we should reset the selection mode\r\n this.setSelectionMode(false);\r\n const newRange = this.createCellRangeFromCellRangeParams(params);\r\n\r\n if (newRange) {\r\n if (newRange.startRow) {\r\n this.setNewestRangeStartCell({\r\n rowIndex: newRange.startRow.rowIndex,\r\n rowPinned: newRange.startRow.rowPinned,\r\n column: newRange.startColumn,\r\n });\r\n }\r\n\r\n this.cellRanges.push(newRange);\r\n this.dispatchChangedEvent(false, true, newRange.id);\r\n }\r\n }\r\n\r\n getCellRanges() {\r\n return this.cellRanges;\r\n }\r\n\r\n isEmpty() {\r\n return this.cellRanges.length === 0;\r\n }\r\n\r\n isMoreThanOneCell() {\r\n const len = this.cellRanges.length;\r\n\r\n if (len === 0) {\r\n return false;\r\n }\r\n if (len > 1) {\r\n return true; // Assumes a cell range must contain at least one cell\r\n }\r\n\r\n // only one range, return true if range has more than one\r\n const range = this.cellRanges[0];\r\n const startRow = this.getRangeStartRow(range);\r\n const endRow = this.getRangeEndRow(range);\r\n\r\n return (\r\n startRow.rowPinned !== endRow.rowPinned ||\r\n startRow.rowIndex !== endRow.rowIndex ||\r\n range.columns.length !== 1\r\n );\r\n }\r\n\r\n areAllRangesAbleToMerge() {\r\n const rowToColumnMap = new Map();\r\n const len = this.cellRanges.length;\r\n\r\n if (len <= 1) {\r\n return true;\r\n }\r\n\r\n for (const range of this.cellRanges) {\r\n this.forEachRowInRange(range, (row) => {\r\n const rowName = `${row.rowPinned || 'normal'}_${row.rowIndex}`;\r\n const columns = rowToColumnMap.get(rowName);\r\n const currentRangeColIds = range.columns.map((col) => col.getId());\r\n if (columns) {\r\n const filteredColumns = currentRangeColIds.filter((col) => columns.indexOf(col) === -1);\r\n columns.push(...filteredColumns);\r\n } else {\r\n rowToColumnMap.set(rowName, currentRangeColIds);\r\n }\r\n });\r\n }\r\n\r\n let columnsString;\r\n\r\n for (const val of rowToColumnMap.values()) {\r\n const currentValString = val.sort().join();\r\n if (columnsString === undefined) {\r\n columnsString = currentValString;\r\n continue;\r\n }\r\n if (columnsString !== currentValString) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n removeAllCellRanges(silent) {\r\n if (this.isEmpty()) {\r\n return;\r\n }\r\n\r\n this.onDragStop();\r\n this.cellRanges.length = 0;\r\n\r\n if (!silent) {\r\n this.dispatchChangedEvent(false, true);\r\n }\r\n }\r\n\r\n isCellInAnyRange(cell) {\r\n return this.getCellRangeCount(cell) > 0;\r\n }\r\n\r\n isCellInSpecificRange(cell, range) {\r\n const columnInRange = range.columns?.includes(cell.column);\r\n const rowInRange = this.isRowInRange(cell.rowIndex, cell.rowPinned, range);\r\n\r\n return columnInRange && rowInRange;\r\n }\r\n\r\n isBottomRightCell(cellRange, cell) {\r\n const allColumns = this.visibleCols.allCols;\r\n const allPositions = cellRange.columns.map((c) => allColumns.indexOf(c)).sort((a, b) => a - b);\r\n const {startRow, endRow} = cellRange;\r\n const lastRow = _isRowBefore(startRow, endRow) ? endRow : startRow;\r\n\r\n const isRightColumn = allColumns.indexOf(cell.column) === _last(allPositions);\r\n const isLastRow =\r\n cell.rowIndex === lastRow.rowIndex && _makeNull(cell.rowPinned) === _makeNull(lastRow.rowPinned);\r\n\r\n return isRightColumn && isLastRow;\r\n }\r\n\r\n // returns the number of ranges this cell is in\r\n getCellRangeCount(cell) {\r\n if (this.isEmpty()) {\r\n return 0;\r\n }\r\n\r\n return this.cellRanges.filter((cellRange) => this.isCellInSpecificRange(cell, cellRange)).length;\r\n }\r\n\r\n isRowInRange(rowIndex, rowPinned, cellRange) {\r\n const firstRow = this.getRangeStartRow(cellRange);\r\n const lastRow = this.getRangeEndRow(cellRange);\r\n const thisRow = {rowIndex, rowPinned: rowPinned || null};\r\n\r\n // compare rowPinned with == instead of === because it can be `null` or `undefined`\r\n const equalsFirstRow = thisRow.rowIndex === firstRow.rowIndex && thisRow.rowPinned == firstRow.rowPinned;\r\n const equalsLastRow = thisRow.rowIndex === lastRow.rowIndex && thisRow.rowPinned == lastRow.rowPinned;\r\n\r\n if (equalsFirstRow || equalsLastRow) {\r\n return true;\r\n }\r\n\r\n const afterFirstRow = !_isRowBefore(thisRow, firstRow);\r\n const beforeLastRow = _isRowBefore(thisRow, lastRow);\r\n\r\n return afterFirstRow && beforeLastRow;\r\n }\r\n\r\n intersectLastRange(fromMouseClick) {\r\n // when ranges are created due to a mouse click without drag (happens in cellMouseListener)\r\n // this method will be called with `fromMouseClick=true`.\r\n if (fromMouseClick && this.dragging) {\r\n return;\r\n }\r\n if (_getSuppressMultiRanges(this.gos)) {\r\n return;\r\n }\r\n if (this.isEmpty()) {\r\n return;\r\n }\r\n const lastRange = _last(this.cellRanges);\r\n const intersectionStartRow = this.getRangeStartRow(lastRange);\r\n const intersectionEndRow = this.getRangeEndRow(lastRange);\r\n\r\n const newRanges = [];\r\n\r\n for (const range of this.cellRanges.slice(0, -1)) {\r\n const startRow = this.getRangeStartRow(range);\r\n const endRow = this.getRangeEndRow(range);\r\n const cols = range.columns;\r\n const intersectCols = cols.filter((col) => lastRange.columns.indexOf(col) === -1);\r\n if (intersectCols.length === cols.length) {\r\n // No overlapping columns, retain previous range\r\n newRanges.push(range);\r\n continue;\r\n }\r\n if (_isRowBefore(intersectionEndRow, startRow) || _isRowBefore(endRow, intersectionStartRow)) {\r\n // No overlapping rows, retain previous range\r\n newRanges.push(range);\r\n continue;\r\n }\r\n const rangeCountBefore = newRanges.length;\r\n // Top\r\n if (_isRowBefore(startRow, intersectionStartRow)) {\r\n const top = {\r\n columns: [...cols],\r\n startColumn: lastRange.startColumn,\r\n startRow: {...startRow},\r\n endRow: _getRowAbove(this.beans, intersectionStartRow),\r\n };\r\n newRanges.push(top);\r\n }\r\n // Left & Right (not contiguous with columns)\r\n if (intersectCols.length > 0) {\r\n const middle = {\r\n columns: intersectCols,\r\n startColumn: intersectCols.includes(lastRange.startColumn)\r\n ? lastRange.startColumn\r\n : intersectCols[0],\r\n startRow: this.rowMax([{...intersectionStartRow}, {...startRow}]),\r\n endRow: this.rowMin([{...intersectionEndRow}, {...endRow}]),\r\n };\r\n newRanges.push(middle);\r\n }\r\n // Bottom\r\n if (_isRowBefore(intersectionEndRow, endRow)) {\r\n newRanges.push({\r\n columns: [...cols],\r\n startColumn: lastRange.startColumn,\r\n startRow: _getRowBelow(this.beans, intersectionEndRow),\r\n endRow: {...endRow},\r\n });\r\n }\r\n if (newRanges.length - rangeCountBefore === 1) {\r\n // Only one range result from the intersection.\r\n // Copy the source range's id, since essentially we just reduced it's size\r\n newRanges[newRanges.length - 1].id = range.id;\r\n }\r\n }\r\n this.cellRanges = newRanges;\r\n\r\n // when this is called because of a clickEvent and the ranges were changed\r\n // we need to force a dragEnd event to update the UI.\r\n if (fromMouseClick) {\r\n this.dispatchChangedEvent(false, true);\r\n }\r\n }\r\n\r\n createRangeHighlightFeature(compBean, column, headerComp) {\r\n }\r\n\r\n setSelectionMode(allColumns) {\r\n this.selectionMode = SelectionMode.ALL_COLUMNS;\r\n }\r\n\r\n refreshRangeStart(cellRange) {\r\n const {startColumn, columns} = cellRange;\r\n\r\n const moveColInCellRange = (colToMove, moveToFront) => {\r\n const otherCols = cellRange.columns.filter((col) => col !== colToMove);\r\n\r\n if (colToMove) {\r\n cellRange.startColumn = colToMove;\r\n cellRange.columns = moveToFront ? [colToMove, ...otherCols] : [...otherCols, colToMove];\r\n } else {\r\n cellRange.columns = otherCols;\r\n }\r\n };\r\n\r\n const {left, right} = this.getRangeEdgeColumns(cellRange);\r\n const shouldMoveLeftCol = startColumn === columns[0] && startColumn !== left;\r\n\r\n if (shouldMoveLeftCol) {\r\n moveColInCellRange(left, true);\r\n return;\r\n }\r\n\r\n const shouldMoveRightCol = startColumn === _last(columns) && startColumn === right;\r\n\r\n if (shouldMoveRightCol) {\r\n moveColInCellRange(right, false);\r\n }\r\n }\r\n\r\n setNewestRangeStartCell(position) {\r\n this.newestRangeStartCell = position;\r\n }\r\n\r\n getColumnsFromParams(\r\n columns,\r\n columnA,\r\n columnB\r\n ) {\r\n const noColsInfo = !columns && !columnA && !columnB;\r\n let processedColumns;\r\n let startsOnTheRight = false;\r\n\r\n if (noColsInfo || columns) {\r\n processedColumns = this.getColumnsFromModel(noColsInfo ? undefined : columns);\r\n } else if (columnA && columnB) {\r\n processedColumns = this.calculateColumnsBetween(columnA, columnB);\r\n\r\n if (processedColumns?.length) {\r\n startsOnTheRight = processedColumns[0] !== this.getColumnFromModel(columnA);\r\n }\r\n }\r\n\r\n return processedColumns\r\n ? {\r\n columns: processedColumns,\r\n startsOnTheRight,\r\n }\r\n : undefined;\r\n }\r\n\r\n createRowPosition(rowIndex, rowPinned) {\r\n return rowIndex != null ? {rowIndex, rowPinned} : undefined;\r\n }\r\n\r\n verifyCellRanges(gos) {\r\n const invalid = _isUsingNewCellSelectionAPI(gos) && _getSuppressMultiRanges(gos) && this.cellRanges.length > 1;\r\n if (invalid) {\r\n _warn(93);\r\n }\r\n\r\n return !invalid;\r\n }\r\n\r\n forEachRowInRange(cellRange, callback) {\r\n const topRow = this.getRangeStartRow(cellRange);\r\n const bottomRow = this.getRangeEndRow(cellRange);\r\n let currentRow = topRow;\r\n\r\n while (currentRow) {\r\n callback(currentRow);\r\n\r\n if (_isSameRow(currentRow, bottomRow)) {\r\n break;\r\n }\r\n currentRow = _getRowBelow(this.beans, currentRow);\r\n }\r\n }\r\n\r\n // as the user is dragging outside of the panel, the div starts to scroll, which in turn\r\n // means we are selection more (or less) cells, but the mouse isn't moving, so we recalculate\r\n // the selection my mimicking a new mouse event\r\n onBodyScroll() {\r\n if (this.dragging && this.lastMouseEvent) {\r\n this.onDragging(this.lastMouseEvent);\r\n }\r\n }\r\n\r\n isLastCellOfRange(cellRange, cell) {\r\n const {startRow, endRow} = cellRange;\r\n const lastRow = _isRowBefore(startRow, endRow) ? endRow : startRow;\r\n const isLastRow = cell.rowIndex === lastRow.rowIndex && cell.rowPinned === lastRow.rowPinned;\r\n const rangeFirstIndexColumn = cellRange.columns[0];\r\n const rangeLastIndexColumn = _last(cellRange.columns);\r\n const lastRangeColumn =\r\n cellRange.startColumn === rangeFirstIndexColumn ? rangeLastIndexColumn : rangeFirstIndexColumn;\r\n const isLastColumn = cell.column === lastRangeColumn;\r\n\r\n return isLastColumn && isLastRow;\r\n }\r\n\r\n rowMax(rows) {\r\n let max;\r\n for (const row of rows) {\r\n if (max === undefined || _isRowBefore(max, row)) {\r\n max = row;\r\n }\r\n }\r\n return max;\r\n }\r\n\r\n rowMin(rows) {\r\n let min;\r\n for (const row of rows) {\r\n if (min === undefined || _isRowBefore(row, min)) {\r\n min = row;\r\n }\r\n }\r\n return min;\r\n }\r\n\r\n updateValuesOnMove(eventTarget) {\r\n const cellCtrl = _getCellCtrlForEventTarget(this.gos, eventTarget);\r\n const cell = cellCtrl?.cellPosition;\r\n\r\n this.cellHasChanged = false;\r\n\r\n if (!cell || (this.lastCellHovered && _areCellsEqual(cell, this.lastCellHovered))) {\r\n return;\r\n }\r\n\r\n const editing = this.beans.editSvc?.isEditing(cellCtrl, {\r\n withOpenEditor: true,\r\n });\r\n\r\n if (editing) {\r\n this.dragSvc.cancelDrag(eventTarget);\r\n return;\r\n }\r\n\r\n if (this.lastCellHovered) {\r\n this.cellHasChanged = true;\r\n }\r\n\r\n this.lastCellHovered = cell;\r\n }\r\n\r\n shouldSkipCurrentColumn(currentColumn) {\r\n return isRowNumberCol(currentColumn);\r\n }\r\n\r\n dispatchChangedEvent(started, finished, id) {\r\n this.cellRanges.map((cellRange) => {\r\n let currentRow = this.getRangeStartRow(cellRange);\r\n const lastRow = this.getRangeEndRow(cellRange);\r\n const nodesToBeSelected = [];\r\n while (true) {\r\n const finishedAllRows = _missing(currentRow) || !currentRow || this.before(lastRow, currentRow);\r\n if (finishedAllRows || !currentRow || !cellRange.columns) {\r\n break;\r\n }\r\n const rowNode = _getRowNode(this.beans, currentRow);\r\n if (!rowNode) {\r\n break;\r\n }\r\n if (!rowNode.isSelected()) {\r\n rowNode.setSelected(true);\r\n }\r\n nodesToBeSelected.push(rowNode.data);\r\n currentRow = _getRowBelow(this.beans, currentRow);\r\n }\r\n this.gridApi.getSelectedNodes().forEach((node) => {\r\n if (!nodesToBeSelected.some(nodeToBeSelected => node.data === nodeToBeSelected)) {\r\n node.setSelected(false);\r\n }\r\n });\r\n });\r\n this.eventSvc.dispatchEvent({\r\n type: 'cellSelectionChanged',\r\n started,\r\n finished,\r\n id,\r\n });\r\n this.eventSvc.dispatchEvent({\r\n type: 'rangeSelectionChanged',\r\n started,\r\n finished,\r\n id,\r\n });\r\n }\r\n\r\n getColumnFromModel(col) {\r\n return typeof col === 'string' ? this.colModel.getCol(col) : col;\r\n }\r\n\r\n getColumnsFromModel(cols) {\r\n const {gos, visibleCols} = this;\r\n const isRowHeaderActive = gos.get('rowNumbers');\r\n\r\n cols = visibleCols.allCols;\r\n\r\n const columns = [];\r\n\r\n for (const col of cols) {\r\n const column = this.getColumnFromModel(col);\r\n if (!column || (isRowHeaderActive && this.shouldSkipCurrentColumn(column))) {\r\n continue;\r\n }\r\n columns.push(column);\r\n }\r\n\r\n return columns.length ? columns : undefined;\r\n }\r\n\r\n calculateColumnsBetween(columnA, columnB) {\r\n const allColumns = this.visibleCols.allCols;\r\n\r\n const fromColumn = this.getColumnFromModel(columnA);\r\n const toColumn = this.getColumnFromModel(columnB);\r\n\r\n const isSameColumn = fromColumn === toColumn;\r\n const fromIndex = allColumns.indexOf(fromColumn);\r\n\r\n if (fromIndex < 0) {\r\n _warn(178, {colId: fromColumn.getId()});\r\n return;\r\n }\r\n\r\n const toIndex = isSameColumn ? fromIndex : allColumns.indexOf(toColumn);\r\n\r\n if (toIndex < 0) {\r\n _warn(178, {colId: toColumn.getId()});\r\n return;\r\n }\r\n\r\n if (isSameColumn) {\r\n return this.getColumnsFromModel([fromColumn]);\r\n }\r\n\r\n const firstIndex = Math.min(fromIndex, toIndex);\r\n const lastIndex = firstIndex === fromIndex ? toIndex : fromIndex;\r\n const columns = [];\r\n\r\n for (let i = firstIndex; i <= lastIndex; i++) {\r\n columns.push(allColumns[i]);\r\n }\r\n\r\n return this.getColumnsFromModel(columns);\r\n }\r\n\r\n focusCellOnNewColumn(currentRange, column) {\r\n const {focusSvc} = this.beans;\r\n const focusedCell = focusSvc.getFocusedCell();\r\n\r\n if (!focusedCell) {\r\n return;\r\n }\r\n\r\n if (this.isCellInSpecificRange(focusedCell, currentRange)) {\r\n focusSvc.setFocusedCell({\r\n ...focusedCell,\r\n column,\r\n forceBrowserFocus: true,\r\n preventScrollOnBrowserFocus: true,\r\n });\r\n }\r\n }\r\n\r\n focusCellOnNewRow(currentRange, row) {\r\n const {focusSvc} = this.beans;\r\n const focusedCell = focusSvc.getFocusedCell();\r\n\r\n if (!focusedCell) {\r\n return;\r\n }\r\n\r\n if (this.isCellInSpecificRange(focusedCell, currentRange)) {\r\n focusSvc.setFocusedCell({\r\n ...row,\r\n column: focusedCell.column,\r\n forceBrowserFocus: true,\r\n preventScrollOnBrowserFocus: true,\r\n });\r\n }\r\n }\r\n\r\n // tests if this row selection is before the other row selection\r\n before(rowA, rowB) {\r\n switch (rowA.rowPinned) {\r\n case 'top':\r\n // we we are floating top, and other isn't, then we are always before\r\n if (rowB.rowPinned !== 'top') {\r\n return true;\r\n }\r\n break;\r\n case 'bottom':\r\n // if we are floating bottom, and the other isn't, then we are never before\r\n if (rowB.rowPinned !== 'bottom') {\r\n return false;\r\n }\r\n break;\r\n default:\r\n // if we are not floating, but the other one is floating...\r\n if (_exists(rowB.rowPinned)) {\r\n return rowB.rowPinned !== 'top';\r\n }\r\n break;\r\n }\r\n return rowA.rowIndex < rowB.rowIndex;\r\n }\r\n\r\n createDragListenerFeature(eContainer) {\r\n return new DragListenerFeature(eContainer);\r\n }\r\n\r\n createCellRangeFeature(beans, ctrl) {\r\n // return new CellRangeFeature(beans, ctrl);\r\n }\r\n}"]}
1
+ {"version":3,"file":"rangeSelector.js","sourceRoot":"","sources":["../../../../../components/grid/cell/rangeSelector.js"],"names":[],"mappings":"AAAA,OAAO,EACH,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,SAAS,EACT,OAAO,EACP,oBAAoB,EACpB,0BAA0B,EAC1B,YAAY,EACZ,YAAY,EACZ,yBAAyB,EACzB,WAAW,EACX,uBAAuB,EACvB,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,2BAA2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AG,KACN,MAAM,EAAE,WAAW,CAAC,MAAM,EAC1B,iBAAiB,EAAE,IAAI,EACvB,2BAA2B,EAAE,IAAI,IACnC,CAAC;QACP,CAAC;IACL,CAAC;IAGD,MAAM,CAAC,IAAI,EAAE,IAAI;QACb,QAAQ,IAAI,CAAC,SAAS,EAAE,CAAC;YACrB,KAAK,KAAK;gBAEN,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE,CAAC;oBAC3B,OAAO,IAAI,CAAC;gBAChB,CAAC;gBACD,MAAM;YACV,KAAK,QAAQ;gBAET,IAAI,IAAI,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;oBAC9B,OAAO,KAAK,CAAC;gBACjB,CAAC;gBACD,MAAM;YACV;gBAEI,IAAI,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;oBAC1B,OAAO,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC;gBACpC,CAAC;gBACD,MAAM;QACd,CAAC;QACD,OAAO,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IACzC,CAAC;IAED,yBAAyB,CAAC,UAAU;QAChC,OAAO,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC/C,CAAC;IAED,sBAAsB,CAAC,KAAK,EAAE,IAAI;IAElC,CAAC;CACJ","sourcesContent":["import {\r\n AutoScrollService,\r\n BeanStub,\r\n _areCellsEqual,\r\n _areEqual,\r\n _exists,\r\n _getAbsoluteRowIndex,\r\n _getCellCtrlForEventTarget,\r\n _getRowAbove,\r\n _getRowBelow,\r\n _getRowCtrlForEventTarget,\r\n _getRowNode,\r\n _getSuppressMultiRanges,\r\n _isDomLayout,\r\n _isRowBefore,\r\n _isSameRow,\r\n _isUsingNewCellSelectionAPI,\r\n _last,\r\n _makeNull,\r\n _missing,\r\n _warn,\r\n isRowNumberCol,\r\n _getRowSelectionMode,\r\n} from 'ag-grid-community';\r\n\r\nimport {DragListenerFeature} from './dragListenerFeature';\r\n\r\nconst SelectionMode = {\r\n NORMAL: 0,\r\n ALL_COLUMNS: 1,\r\n};\r\n\r\nexport class RangeSelector extends BeanStub {\r\n beanName = 'rangeSvc';\r\n\r\n constructor() {\r\n super();\r\n\r\n this.bodyScrollListener = this.onBodyScroll.bind(this);\r\n this.cellRanges = [];\r\n this.dragging = false;\r\n this.intersectionRange = false;\r\n }\r\n\r\n wireBeans(beans) {\r\n this.rowModel = beans.rowModel;\r\n this.dragSvc = beans.dragSvc;\r\n this.colModel = beans.colModel;\r\n this.visibleCols = beans.visibleCols;\r\n this.cellNavigation = beans.cellNavigation;\r\n this.ctrlsSvc = beans.ctrlsSvc;\r\n this.valueSvc = beans.valueSvc;\r\n this.gridApi = beans.gridApi;\r\n }\r\n\r\n postConstruct() {\r\n const onColumnsChanged = this.onColumnsChanged.bind(this);\r\n const removeAllCellRanges = () => this.removeAllCellRanges();\r\n const refreshLastRangeStart = this.refreshLastRangeStart.bind(this);\r\n this.addManagedEventListeners({\r\n newColumnsLoaded: onColumnsChanged,\r\n columnVisible: onColumnsChanged,\r\n columnValueChanged: onColumnsChanged,\r\n columnPivotModeChanged: removeAllCellRanges,\r\n columnRowGroupChanged: removeAllCellRanges,\r\n columnPivotChanged: removeAllCellRanges,\r\n columnGroupOpened: refreshLastRangeStart,\r\n columnMoved: refreshLastRangeStart,\r\n columnPinned: refreshLastRangeStart,\r\n });\r\n\r\n this.ctrlsSvc.whenReady(this, (p) => {\r\n const gridBodyCtrl = p.gridBodyCtrl;\r\n this.autoScrollService = new AutoScrollService({\r\n scrollContainer: gridBodyCtrl.eBodyViewport,\r\n scrollAxis: 'xy',\r\n getVerticalPosition: () => gridBodyCtrl.scrollFeature.getVScrollPosition().top,\r\n setVerticalPosition: (position) => gridBodyCtrl.scrollFeature.setVerticalScrollPosition(position),\r\n getHorizontalPosition: () => gridBodyCtrl.scrollFeature.getHScrollPosition().left,\r\n setHorizontalPosition: (position) => gridBodyCtrl.scrollFeature.setHorizontalScrollPosition(position),\r\n shouldSkipVerticalScroll: () => !_isDomLayout(this.gos, 'normal'),\r\n shouldSkipHorizontalScroll: () => !gridBodyCtrl.scrollFeature.isHorizontalScrollShowing(),\r\n });\r\n });\r\n }\r\n\r\n // Drag And Drop Target Methods\r\n onDragStart(mouseEvent) {\r\n const gos = this.gos;\r\n if (\r\n _getRowCtrlForEventTarget(gos, mouseEvent.target)?.isSuppressMouseEvent(mouseEvent)\r\n ) {\r\n return;\r\n }\r\n\r\n const {ctrlKey, metaKey, shiftKey} = mouseEvent;\r\n\r\n // ctrlKey for windows, metaKey for Apple\r\n const isMultiKey = ctrlKey || metaKey;\r\n const allowMulti = !_getSuppressMultiRanges(gos);\r\n const isMultiSelect = allowMulti ? isMultiKey : false;\r\n const extendRange = shiftKey && !!this.cellRanges?.length;\r\n\r\n if (!isMultiSelect && (!extendRange || _exists(_last(this.cellRanges).type))) {\r\n this.removeAllCellRanges(true);\r\n }\r\n\r\n // The browser changes the Event target of cached events when working with the ShadowDOM\r\n // so we need to retrieve the initial DragStartTarget.\r\n const startTarget = this.dragSvc.startTarget;\r\n\r\n if (startTarget) {\r\n this.updateValuesOnMove(startTarget);\r\n }\r\n\r\n if (!this.lastCellHovered) {\r\n return;\r\n }\r\n\r\n this.dragging = true;\r\n this.lastMouseEvent = mouseEvent;\r\n this.intersectionRange = isMultiSelect && this.getCellRangeCount(this.lastCellHovered) > 1;\r\n\r\n if (!extendRange) {\r\n this.setNewestRangeStartCell(this.lastCellHovered);\r\n }\r\n\r\n // if we didn't clear the ranges, then dragging means the user clicked, and when the\r\n // user clicks it means a range of one cell was created. we need to extend this range\r\n // rather than creating another range. otherwise we end up with two distinct ranges\r\n // from a drag operation (one from click, and one from drag).\r\n if (this.cellRanges.length > 0) {\r\n this.draggingRange = _last(this.cellRanges);\r\n } else {\r\n const mouseRowPosition = {\r\n rowIndex: this.lastCellHovered.rowIndex,\r\n rowPinned: this.lastCellHovered.rowPinned,\r\n };\r\n\r\n const columns = this.getColumnsFromModel([this.lastCellHovered.column]);\r\n\r\n if (!columns?.length) {\r\n return;\r\n }\r\n\r\n this.draggingRange = {\r\n startRow: mouseRowPosition,\r\n endRow: mouseRowPosition,\r\n columns,\r\n startColumn: this.newestRangeStartCell.column,\r\n };\r\n\r\n this.cellRanges.push(this.draggingRange);\r\n }\r\n\r\n this.ctrlsSvc\r\n .getGridBodyCtrl()\r\n .eBodyViewport.addEventListener('scroll', this.bodyScrollListener, {passive: true});\r\n\r\n this.dispatchChangedEvent(true, false, this.draggingRange.id);\r\n }\r\n\r\n onDragging(mouseEvent) {\r\n const {dragging, lastCellHovered, newestRangeStartCell, autoScrollService, cellHasChanged} = this;\r\n if (!dragging || !mouseEvent) {\r\n return;\r\n }\r\n\r\n this.updateValuesOnMove(mouseEvent.target);\r\n\r\n this.lastMouseEvent = mouseEvent;\r\n\r\n const isMouseAndStartInPinned = (position) =>\r\n lastCellHovered && lastCellHovered.rowPinned === position && newestRangeStartCell.rowPinned === position;\r\n\r\n const skipVerticalScroll = isMouseAndStartInPinned('top') || isMouseAndStartInPinned('bottom');\r\n\r\n autoScrollService.check(mouseEvent, skipVerticalScroll);\r\n\r\n if (!cellHasChanged || !lastCellHovered) {\r\n return;\r\n }\r\n\r\n const startColumn = newestRangeStartCell?.column;\r\n const currentColumn = lastCellHovered?.column;\r\n\r\n const columns = this.calculateColumnsBetween(startColumn, currentColumn);\r\n\r\n if (!columns) {\r\n return;\r\n }\r\n\r\n const {rowIndex, rowPinned} = lastCellHovered;\r\n\r\n this.draggingRange.endRow = {\r\n rowIndex,\r\n rowPinned,\r\n };\r\n\r\n this.draggingRange.columns = columns;\r\n this.dispatchChangedEvent(false, false, this.draggingRange.id);\r\n }\r\n\r\n onDragStop() {\r\n if (!this.dragging) {\r\n return;\r\n }\r\n\r\n const {id} = this.draggingRange;\r\n\r\n this.autoScrollService.ensureCleared();\r\n\r\n this.ctrlsSvc.getGridBodyCtrl().eBodyViewport.removeEventListener('scroll', this.bodyScrollListener);\r\n this.lastMouseEvent = null;\r\n this.dragging = false;\r\n this.draggingRange = undefined;\r\n this.lastCellHovered = undefined;\r\n\r\n if (this.intersectionRange) {\r\n this.intersectionRange = false;\r\n this.intersectLastRange();\r\n }\r\n\r\n this.dispatchChangedEvent(false, true, id);\r\n }\r\n\r\n // Called for both columns loaded & column visibility events\r\n onColumnsChanged() {\r\n // first move start column in last cell range (i.e. series chart range)\r\n this.refreshLastRangeStart();\r\n\r\n const allColumns = this.visibleCols.allCols;\r\n\r\n // check that the columns in each range still exist and are visible\r\n for (const cellRange of this.cellRanges) {\r\n const beforeCols = cellRange.columns;\r\n\r\n // remove hidden or removed cols from cell range\r\n cellRange.columns = cellRange.columns.filter(\r\n (col) => col.isVisible() && allColumns.indexOf(col) !== -1\r\n );\r\n\r\n const colsInRangeChanged = !_areEqual(beforeCols, cellRange.columns);\r\n\r\n if (colsInRangeChanged) {\r\n // notify users and other parts of grid (i.e. status panel) that range has changed\r\n this.dispatchChangedEvent(false, true, cellRange.id);\r\n }\r\n }\r\n // Remove empty cell ranges\r\n const countBefore = this.cellRanges.length;\r\n this.cellRanges = this.cellRanges.filter((range) => range.columns.length > 0);\r\n if (countBefore > this.cellRanges.length) {\r\n this.dispatchChangedEvent(false, true);\r\n }\r\n }\r\n\r\n refreshLastRangeStart() {\r\n const lastRange = _last(this.cellRanges);\r\n\r\n if (!lastRange) {\r\n return;\r\n }\r\n\r\n this.refreshRangeStart(lastRange);\r\n }\r\n\r\n isContiguousRange(cellRange) {\r\n const rangeColumns = cellRange.columns;\r\n\r\n if (!rangeColumns.length) {\r\n return false;\r\n }\r\n\r\n const allColumns = this.visibleCols.allCols;\r\n const allPositions = rangeColumns.map((c) => allColumns.indexOf(c)).sort((a, b) => a - b);\r\n\r\n return _last(allPositions) - allPositions[0] + 1 === rangeColumns.length;\r\n }\r\n\r\n getRangeStartRow(cellRange) {\r\n if (cellRange.startRow && cellRange.endRow) {\r\n return _isRowBefore(cellRange.startRow, cellRange.endRow) ? cellRange.startRow : cellRange.endRow;\r\n }\r\n\r\n const pinnedTopRowCount = this.beans.pinnedRowModel?.getPinnedTopRowCount() ?? 0;\r\n const rowPinned = pinnedTopRowCount > 0 ? 'top' : null;\r\n\r\n return {rowIndex: 0, rowPinned};\r\n }\r\n\r\n getRangeEndRow(cellRange) {\r\n if (cellRange.startRow && cellRange.endRow) {\r\n return _isRowBefore(cellRange.startRow, cellRange.endRow) ? cellRange.endRow : cellRange.startRow;\r\n }\r\n\r\n const pinnedBottomRowCount = this.beans.pinnedRowModel?.getPinnedBottomRowCount() ?? 0;\r\n const pinnedBottom = pinnedBottomRowCount > 0;\r\n\r\n if (pinnedBottom) {\r\n return {\r\n rowIndex: pinnedBottomRowCount - 1,\r\n rowPinned: 'bottom',\r\n };\r\n }\r\n\r\n return {\r\n rowIndex: this.rowModel.getRowCount() - 1,\r\n rowPinned: null,\r\n };\r\n }\r\n\r\n getRangeRowCount(cellRange) {\r\n const beans = this.beans;\r\n const start = this.getRangeStartRow(cellRange);\r\n const end = this.getRangeEndRow(cellRange);\r\n\r\n const startIndex = _getAbsoluteRowIndex(beans, start);\r\n const endIndex = _getAbsoluteRowIndex(beans, end);\r\n\r\n return endIndex - startIndex + 1;\r\n }\r\n\r\n setRangeToCell(cell, appendRange = false) {\r\n const {gos} = this;\r\n\r\n const isRowNumbersEnabled = gos.get('rowNumbers');\r\n const allColumnsRange = isRowNumberCol(cell.column);\r\n if (isRowNumbersEnabled) {\r\n this.setSelectionMode(allColumnsRange);\r\n }\r\n\r\n const columns = this.calculateColumnsBetween(cell.column, cell.column);\r\n\r\n if (!columns) {\r\n return;\r\n }\r\n\r\n const suppressMultiRangeSelections = _getSuppressMultiRanges(this.gos);\r\n\r\n // if not appending, then clear previous range selections\r\n if (suppressMultiRangeSelections || !appendRange || _missing(this.cellRanges)) {\r\n this.removeAllCellRanges(true);\r\n }\r\n\r\n const rowForCell = {\r\n rowIndex: cell.rowIndex,\r\n rowPinned: cell.rowPinned,\r\n };\r\n\r\n const cellRange = {\r\n startRow: rowForCell,\r\n endRow: rowForCell,\r\n columns,\r\n startColumn: cell.column,\r\n };\r\n\r\n this.cellRanges.push(cellRange);\r\n\r\n this.setNewestRangeStartCell(cell);\r\n this.onDragStop();\r\n this.dispatchChangedEvent(true, true);\r\n }\r\n\r\n getRangeLastColumn(cellRange) {\r\n const firstCol = cellRange.columns[0];\r\n const lastCol = _last(cellRange.columns);\r\n\r\n return (this.newestRangeStartCell?.column === firstCol ? lastCol : firstCol);\r\n }\r\n\r\n extendRangeRowCountBy(cellRange, targetCount) {\r\n const {beans} = this;\r\n const {startRow, endRow} = cellRange;\r\n\r\n if (!startRow || !endRow) {\r\n return;\r\n }\r\n\r\n let stepsMoved = 0;\r\n let currentRow;\r\n\r\n const isBottomUp = _isRowBefore(endRow, startRow);\r\n if (isBottomUp) {\r\n currentRow = startRow;\r\n } else {\r\n currentRow = endRow;\r\n }\r\n\r\n const stepFn = targetCount > 0 ? _getRowBelow : _getRowAbove;\r\n const stepCount = Math.abs(targetCount);\r\n\r\n while (stepsMoved < stepCount) {\r\n const nextRow = stepFn(beans, currentRow);\r\n if (!nextRow) {\r\n break;\r\n }\r\n currentRow = nextRow;\r\n stepsMoved++;\r\n }\r\n\r\n if (stepsMoved !== stepCount) {\r\n return; // Could not move the desired number of rows\r\n }\r\n\r\n const cellPosition = {\r\n ...currentRow,\r\n column: this.getRangeLastColumn(cellRange),\r\n };\r\n\r\n this.updateRangeRowBoundary({cellRange, boundary: isBottomUp ? 'start' : 'end', cellPosition});\r\n }\r\n\r\n extendRangeColumnCountBy(cellRange, delta) {\r\n const {columns, startColumn} = cellRange;\r\n\r\n if (delta === 0) {\r\n return;\r\n }\r\n\r\n const allColumns = this.getColumnsFromModel(); // ordered visible columns\r\n\r\n if (!allColumns) {\r\n return;\r\n }\r\n\r\n const lastColumn = _last(columns);\r\n const endColumn = startColumn === columns[0] ? lastColumn : columns[0];\r\n\r\n if (!lastColumn || !endColumn) {\r\n return;\r\n }\r\n\r\n let startIdx = allColumns.indexOf(startColumn);\r\n const endIdx = allColumns.indexOf(endColumn);\r\n const isRtlRange = endIdx < startIdx;\r\n\r\n if (isRtlRange) {\r\n // if we are anchoring to the left and the range is rtl\r\n // then we need to flip the start and end indices\r\n startIdx = endIdx;\r\n }\r\n\r\n const currentLength = columns.length;\r\n const targetLength = currentLength + delta;\r\n\r\n if (targetLength <= 0) {\r\n return; // can't shrink to 0 or less\r\n }\r\n\r\n const newColumns = [];\r\n\r\n for (let i = startIdx; i < startIdx + targetLength; i++) {\r\n const col = allColumns[i];\r\n if (!col) {\r\n break;\r\n }\r\n newColumns.push(col);\r\n }\r\n\r\n // Only update if length actually changed\r\n if (newColumns.length === targetLength) {\r\n if (isRtlRange) {\r\n // before we add changes to the range, the\r\n // new range start should receive focus\r\n const newColumnToFocus = _last(newColumns);\r\n cellRange.startColumn = newColumnToFocus;\r\n this.focusCellOnNewColumn(cellRange, newColumnToFocus);\r\n }\r\n cellRange.columns = newColumns;\r\n this.dispatchChangedEvent(true, true, cellRange.id);\r\n }\r\n }\r\n\r\n extendLatestRangeToCell(cellPosition) {\r\n if (this.isEmpty() || !this.newestRangeStartCell) {\r\n return;\r\n }\r\n\r\n const cellRange = _last(this.cellRanges);\r\n\r\n this.setSelectionMode(isRowNumberCol(cellPosition.column));\r\n this.updateRangeRowBoundary({cellRange, boundary: 'end', cellPosition});\r\n }\r\n\r\n updateRangeRowBoundary(params) {\r\n const {cellRange, boundary, cellPosition, silent = false} = params;\r\n const endColumn = cellPosition.column;\r\n const colsToAdd = this.calculateColumnsBetween(cellRange.startColumn, endColumn);\r\n\r\n if (!colsToAdd || this.isLastCellOfRange(cellRange, cellPosition)) {\r\n return;\r\n }\r\n\r\n if (boundary === 'start') {\r\n this.focusCellOnNewRow(cellRange, cellPosition);\r\n }\r\n\r\n cellRange.columns = colsToAdd;\r\n cellRange[boundary === 'start' ? 'startRow' : 'endRow'] = {\r\n rowIndex: cellPosition.rowIndex,\r\n rowPinned: cellPosition.rowPinned,\r\n };\r\n\r\n if (!silent) {\r\n this.dispatchChangedEvent(true, true, cellRange.id);\r\n }\r\n }\r\n\r\n getRangeEdgeColumns(cellRange) {\r\n const allColumns = this.visibleCols.allCols;\r\n const allIndices = cellRange.columns\r\n .map((c) => allColumns.indexOf(c))\r\n .filter((i) => i > -1)\r\n .sort((a, b) => a - b);\r\n\r\n return {\r\n left: allColumns[allIndices[0]],\r\n right: allColumns[_last(allIndices)],\r\n };\r\n }\r\n\r\n // returns true if successful, false if not successful\r\n extendLatestRangeInDirection(event) {\r\n if (this.isEmpty() || !this.newestRangeStartCell) {\r\n return;\r\n }\r\n\r\n const key = event.key;\r\n const ctrlKey = event.ctrlKey || event.metaKey;\r\n\r\n const lastRange = _last(this.cellRanges);\r\n const startCell = this.newestRangeStartCell;\r\n\r\n // find the cell that is at the furthest away corner from the starting cell\r\n const endCellIndex = lastRange.endRow.rowIndex;\r\n const endCellFloating = lastRange.endRow.rowPinned;\r\n const endCellColumn = this.getRangeLastColumn(lastRange);\r\n\r\n const endCell = {column: endCellColumn, rowIndex: endCellIndex, rowPinned: endCellFloating};\r\n const newEndCell = this.cellNavigation.getNextCellToFocus(key, endCell, ctrlKey);\r\n\r\n // if user is at end of grid, so no cell to extend to, we return false\r\n if (!newEndCell) {\r\n return;\r\n }\r\n\r\n this.setCellRange({\r\n rowStartIndex: startCell.rowIndex,\r\n rowStartPinned: startCell.rowPinned,\r\n rowEndIndex: newEndCell.rowIndex,\r\n rowEndPinned: newEndCell.rowPinned,\r\n columnStart: startCell.column,\r\n columnEnd: newEndCell.column,\r\n });\r\n\r\n return newEndCell;\r\n }\r\n\r\n setCellRange(params) {\r\n this.removeAllCellRanges(true);\r\n this.addCellRange(params);\r\n }\r\n\r\n setCellRanges(cellRanges) {\r\n if (_areEqual(this.cellRanges, cellRanges)) {\r\n return;\r\n }\r\n\r\n if (!this.verifyCellRanges(this.gos)) {\r\n return;\r\n }\r\n\r\n this.removeAllCellRanges(true);\r\n\r\n for (const cellRange of cellRanges) {\r\n if (cellRange.columns && cellRange.startRow) {\r\n const columns = this.getColumnsFromModel(cellRange.columns);\r\n if (!columns || columns.length === 0) {\r\n continue;\r\n }\r\n\r\n cellRange.columns = columns;\r\n\r\n const {startRow} = cellRange;\r\n\r\n this.setNewestRangeStartCell({\r\n rowIndex: startRow.rowIndex,\r\n rowPinned: startRow.rowPinned,\r\n column: cellRange.columns[0],\r\n });\r\n }\r\n\r\n this.cellRanges.push(cellRange);\r\n }\r\n\r\n this.dispatchChangedEvent(false, true);\r\n }\r\n\r\n clearCellRangeCellValues(params) {\r\n const {beans, valueSvc, eventSvc} = this;\r\n const {cellEventSource = 'rangeSvc', dispatchWrapperEvents, wrapperEventSource = 'deleteKey'} = params;\r\n\r\n let {cellRanges} = params;\r\n\r\n if (dispatchWrapperEvents) {\r\n eventSvc.dispatchEvent({\r\n type: 'cellSelectionDeleteStart',\r\n source: wrapperEventSource,\r\n });\r\n eventSvc.dispatchEvent({\r\n type: 'rangeDeleteStart',\r\n source: wrapperEventSource,\r\n });\r\n }\r\n\r\n if (!cellRanges) {\r\n cellRanges = this.cellRanges;\r\n }\r\n\r\n for (const cellRange of cellRanges) {\r\n this.forEachRowInRange(cellRange, (rowPosition) => {\r\n const rowNode = _getRowNode(beans, rowPosition);\r\n if (!rowNode) {\r\n return;\r\n }\r\n for (let i = 0; i < cellRange.columns.length; i++) {\r\n const column = this.getColumnFromModel(cellRange.columns[i]);\r\n if (!column?.isCellEditable(rowNode)) {\r\n continue;\r\n }\r\n const emptyValue = valueSvc.getDeleteValue(column, rowNode);\r\n rowNode.setDataValue(column, emptyValue, cellEventSource);\r\n }\r\n });\r\n }\r\n\r\n if (dispatchWrapperEvents) {\r\n eventSvc.dispatchEvent({\r\n type: 'cellSelectionDeleteEnd',\r\n source: wrapperEventSource,\r\n });\r\n eventSvc.dispatchEvent({\r\n type: 'rangeDeleteEnd',\r\n source: wrapperEventSource,\r\n });\r\n }\r\n }\r\n\r\n createCellRangeFromCellRangeParams(params) {\r\n return this.createPartialCellRangeFromRangeParams(params, false);\r\n }\r\n\r\n // Range service can't normally support a range without columns, but charts can\r\n createPartialCellRangeFromRangeParams(\r\n params,\r\n allowEmptyColumns\r\n ) {\r\n const {\r\n columns: paramColumns,\r\n columnStart,\r\n columnEnd,\r\n rowStartIndex,\r\n rowStartPinned,\r\n rowEndIndex,\r\n rowEndPinned,\r\n } = params;\r\n const columnInfo = this.getColumnsFromParams(\r\n paramColumns,\r\n columnStart,\r\n columnEnd\r\n );\r\n\r\n if (!columnInfo || (!allowEmptyColumns && columnInfo.columns.length === 0)) {\r\n return;\r\n }\r\n\r\n const {columns, startsOnTheRight} = columnInfo;\r\n\r\n const startRow = this.createRowPosition(rowStartIndex, rowStartPinned);\r\n const endRow = this.createRowPosition(rowEndIndex, rowEndPinned);\r\n\r\n return {\r\n startRow,\r\n endRow,\r\n columns,\r\n startColumn:\r\n this.getColumnFromModel(columnStart) ?? (startsOnTheRight ? _last(columns) : columns[0]),\r\n };\r\n }\r\n\r\n addCellRange(params) {\r\n const gos = this.gos;\r\n if (!this.verifyCellRanges(gos)) {\r\n return;\r\n }\r\n\r\n // when creating a new range via API we should reset the selection mode\r\n this.setSelectionMode(false);\r\n const newRange = this.createCellRangeFromCellRangeParams(params);\r\n\r\n if (newRange) {\r\n if (newRange.startRow) {\r\n this.setNewestRangeStartCell({\r\n rowIndex: newRange.startRow.rowIndex,\r\n rowPinned: newRange.startRow.rowPinned,\r\n column: newRange.startColumn,\r\n });\r\n }\r\n\r\n this.cellRanges.push(newRange);\r\n this.dispatchChangedEvent(false, true, newRange.id);\r\n }\r\n }\r\n\r\n getCellRanges() {\r\n return this.cellRanges;\r\n }\r\n\r\n isEmpty() {\r\n return this.cellRanges.length === 0;\r\n }\r\n\r\n isMoreThanOneCell() {\r\n const len = this.cellRanges.length;\r\n\r\n if (len === 0) {\r\n return false;\r\n }\r\n if (len > 1) {\r\n return true; // Assumes a cell range must contain at least one cell\r\n }\r\n\r\n // only one range, return true if range has more than one\r\n const range = this.cellRanges[0];\r\n const startRow = this.getRangeStartRow(range);\r\n const endRow = this.getRangeEndRow(range);\r\n\r\n return (\r\n startRow.rowPinned !== endRow.rowPinned ||\r\n startRow.rowIndex !== endRow.rowIndex ||\r\n range.columns.length !== 1\r\n );\r\n }\r\n\r\n areAllRangesAbleToMerge() {\r\n const rowToColumnMap = new Map();\r\n const len = this.cellRanges.length;\r\n\r\n if (len <= 1) {\r\n return true;\r\n }\r\n\r\n for (const range of this.cellRanges) {\r\n this.forEachRowInRange(range, (row) => {\r\n const rowName = `${row.rowPinned || 'normal'}_${row.rowIndex}`;\r\n const columns = rowToColumnMap.get(rowName);\r\n const currentRangeColIds = range.columns.map((col) => col.getId());\r\n if (columns) {\r\n const filteredColumns = currentRangeColIds.filter((col) => columns.indexOf(col) === -1);\r\n columns.push(...filteredColumns);\r\n } else {\r\n rowToColumnMap.set(rowName, currentRangeColIds);\r\n }\r\n });\r\n }\r\n\r\n let columnsString;\r\n\r\n for (const val of rowToColumnMap.values()) {\r\n const currentValString = val.sort().join();\r\n if (columnsString === undefined) {\r\n columnsString = currentValString;\r\n continue;\r\n }\r\n if (columnsString !== currentValString) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n removeAllCellRanges(silent) {\r\n if (this.isEmpty()) {\r\n return;\r\n }\r\n\r\n this.onDragStop();\r\n this.cellRanges.length = 0;\r\n\r\n if (!silent) {\r\n this.dispatchChangedEvent(false, true);\r\n }\r\n }\r\n\r\n isCellInAnyRange(cell) {\r\n return this.getCellRangeCount(cell) > 0;\r\n }\r\n\r\n isCellInSpecificRange(cell, range) {\r\n const columnInRange = range.columns?.includes(cell.column);\r\n const rowInRange = this.isRowInRange(cell.rowIndex, cell.rowPinned, range);\r\n\r\n return columnInRange && rowInRange;\r\n }\r\n\r\n isBottomRightCell(cellRange, cell) {\r\n const allColumns = this.visibleCols.allCols;\r\n const allPositions = cellRange.columns.map((c) => allColumns.indexOf(c)).sort((a, b) => a - b);\r\n const {startRow, endRow} = cellRange;\r\n const lastRow = _isRowBefore(startRow, endRow) ? endRow : startRow;\r\n\r\n const isRightColumn = allColumns.indexOf(cell.column) === _last(allPositions);\r\n const isLastRow =\r\n cell.rowIndex === lastRow.rowIndex && _makeNull(cell.rowPinned) === _makeNull(lastRow.rowPinned);\r\n\r\n return isRightColumn && isLastRow;\r\n }\r\n\r\n // returns the number of ranges this cell is in\r\n getCellRangeCount(cell) {\r\n if (this.isEmpty()) {\r\n return 0;\r\n }\r\n\r\n return this.cellRanges.filter((cellRange) => this.isCellInSpecificRange(cell, cellRange)).length;\r\n }\r\n\r\n isRowInRange(rowIndex, rowPinned, cellRange) {\r\n const firstRow = this.getRangeStartRow(cellRange);\r\n const lastRow = this.getRangeEndRow(cellRange);\r\n const thisRow = {rowIndex, rowPinned: rowPinned || null};\r\n\r\n // compare rowPinned with == instead of === because it can be `null` or `undefined`\r\n const equalsFirstRow = thisRow.rowIndex === firstRow.rowIndex && thisRow.rowPinned == firstRow.rowPinned;\r\n const equalsLastRow = thisRow.rowIndex === lastRow.rowIndex && thisRow.rowPinned == lastRow.rowPinned;\r\n\r\n if (equalsFirstRow || equalsLastRow) {\r\n return true;\r\n }\r\n\r\n const afterFirstRow = !_isRowBefore(thisRow, firstRow);\r\n const beforeLastRow = _isRowBefore(thisRow, lastRow);\r\n\r\n return afterFirstRow && beforeLastRow;\r\n }\r\n\r\n intersectLastRange(fromMouseClick) {\r\n // when ranges are created due to a mouse click without drag (happens in cellMouseListener)\r\n // this method will be called with `fromMouseClick=true`.\r\n if (fromMouseClick && this.dragging) {\r\n return;\r\n }\r\n if (_getSuppressMultiRanges(this.gos)) {\r\n return;\r\n }\r\n if (this.isEmpty()) {\r\n return;\r\n }\r\n const lastRange = _last(this.cellRanges);\r\n const intersectionStartRow = this.getRangeStartRow(lastRange);\r\n const intersectionEndRow = this.getRangeEndRow(lastRange);\r\n\r\n const newRanges = [];\r\n\r\n for (const range of this.cellRanges.slice(0, -1)) {\r\n const startRow = this.getRangeStartRow(range);\r\n const endRow = this.getRangeEndRow(range);\r\n const cols = range.columns;\r\n const intersectCols = cols.filter((col) => lastRange.columns.indexOf(col) === -1);\r\n if (intersectCols.length === cols.length) {\r\n // No overlapping columns, retain previous range\r\n newRanges.push(range);\r\n continue;\r\n }\r\n if (_isRowBefore(intersectionEndRow, startRow) || _isRowBefore(endRow, intersectionStartRow)) {\r\n // No overlapping rows, retain previous range\r\n newRanges.push(range);\r\n continue;\r\n }\r\n const rangeCountBefore = newRanges.length;\r\n // Top\r\n if (_isRowBefore(startRow, intersectionStartRow)) {\r\n const top = {\r\n columns: [...cols],\r\n startColumn: lastRange.startColumn,\r\n startRow: {...startRow},\r\n endRow: _getRowAbove(this.beans, intersectionStartRow),\r\n };\r\n newRanges.push(top);\r\n }\r\n // Left & Right (not contiguous with columns)\r\n if (intersectCols.length > 0) {\r\n const middle = {\r\n columns: intersectCols,\r\n startColumn: intersectCols.includes(lastRange.startColumn)\r\n ? lastRange.startColumn\r\n : intersectCols[0],\r\n startRow: this.rowMax([{...intersectionStartRow}, {...startRow}]),\r\n endRow: this.rowMin([{...intersectionEndRow}, {...endRow}]),\r\n };\r\n newRanges.push(middle);\r\n }\r\n // Bottom\r\n if (_isRowBefore(intersectionEndRow, endRow)) {\r\n newRanges.push({\r\n columns: [...cols],\r\n startColumn: lastRange.startColumn,\r\n startRow: _getRowBelow(this.beans, intersectionEndRow),\r\n endRow: {...endRow},\r\n });\r\n }\r\n if (newRanges.length - rangeCountBefore === 1) {\r\n // Only one range result from the intersection.\r\n // Copy the source range's id, since essentially we just reduced it's size\r\n newRanges[newRanges.length - 1].id = range.id;\r\n }\r\n }\r\n this.cellRanges = newRanges;\r\n\r\n // when this is called because of a clickEvent and the ranges were changed\r\n // we need to force a dragEnd event to update the UI.\r\n if (fromMouseClick) {\r\n this.dispatchChangedEvent(false, true);\r\n }\r\n }\r\n\r\n createRangeHighlightFeature(compBean, column, headerComp) {\r\n }\r\n\r\n setSelectionMode(allColumns) {\r\n this.selectionMode = SelectionMode.ALL_COLUMNS;\r\n }\r\n\r\n refreshRangeStart(cellRange) {\r\n const {startColumn, columns} = cellRange;\r\n\r\n const moveColInCellRange = (colToMove, moveToFront) => {\r\n const otherCols = cellRange.columns.filter((col) => col !== colToMove);\r\n\r\n if (colToMove) {\r\n cellRange.startColumn = colToMove;\r\n cellRange.columns = moveToFront ? [colToMove, ...otherCols] : [...otherCols, colToMove];\r\n } else {\r\n cellRange.columns = otherCols;\r\n }\r\n };\r\n\r\n const {left, right} = this.getRangeEdgeColumns(cellRange);\r\n const shouldMoveLeftCol = startColumn === columns[0] && startColumn !== left;\r\n\r\n if (shouldMoveLeftCol) {\r\n moveColInCellRange(left, true);\r\n return;\r\n }\r\n\r\n const shouldMoveRightCol = startColumn === _last(columns) && startColumn === right;\r\n\r\n if (shouldMoveRightCol) {\r\n moveColInCellRange(right, false);\r\n }\r\n }\r\n\r\n setNewestRangeStartCell(position) {\r\n this.newestRangeStartCell = position;\r\n }\r\n\r\n getColumnsFromParams(\r\n columns,\r\n columnA,\r\n columnB\r\n ) {\r\n const noColsInfo = !columns && !columnA && !columnB;\r\n let processedColumns;\r\n let startsOnTheRight = false;\r\n\r\n if (noColsInfo || columns) {\r\n processedColumns = this.getColumnsFromModel(noColsInfo ? undefined : columns);\r\n } else if (columnA && columnB) {\r\n processedColumns = this.calculateColumnsBetween(columnA, columnB);\r\n\r\n if (processedColumns?.length) {\r\n startsOnTheRight = processedColumns[0] !== this.getColumnFromModel(columnA);\r\n }\r\n }\r\n\r\n return processedColumns\r\n ? {\r\n columns: processedColumns,\r\n startsOnTheRight,\r\n }\r\n : undefined;\r\n }\r\n\r\n createRowPosition(rowIndex, rowPinned) {\r\n return rowIndex != null ? {rowIndex, rowPinned} : undefined;\r\n }\r\n\r\n verifyCellRanges(gos) {\r\n const invalid = _isUsingNewCellSelectionAPI(gos) && _getSuppressMultiRanges(gos) && this.cellRanges.length > 1;\r\n if (invalid) {\r\n _warn(93);\r\n }\r\n\r\n return !invalid;\r\n }\r\n\r\n forEachRowInRange(cellRange, callback) {\r\n const topRow = this.getRangeStartRow(cellRange);\r\n const bottomRow = this.getRangeEndRow(cellRange);\r\n let currentRow = topRow;\r\n\r\n while (currentRow) {\r\n callback(currentRow);\r\n\r\n if (_isSameRow(currentRow, bottomRow)) {\r\n break;\r\n }\r\n currentRow = _getRowBelow(this.beans, currentRow);\r\n }\r\n }\r\n\r\n // as the user is dragging outside of the panel, the div starts to scroll, which in turn\r\n // means we are selection more (or less) cells, but the mouse isn't moving, so we recalculate\r\n // the selection my mimicking a new mouse event\r\n onBodyScroll() {\r\n if (this.dragging && this.lastMouseEvent) {\r\n this.onDragging(this.lastMouseEvent);\r\n }\r\n }\r\n\r\n isLastCellOfRange(cellRange, cell) {\r\n const {startRow, endRow} = cellRange;\r\n const lastRow = _isRowBefore(startRow, endRow) ? endRow : startRow;\r\n const isLastRow = cell.rowIndex === lastRow.rowIndex && cell.rowPinned === lastRow.rowPinned;\r\n const rangeFirstIndexColumn = cellRange.columns[0];\r\n const rangeLastIndexColumn = _last(cellRange.columns);\r\n const lastRangeColumn =\r\n cellRange.startColumn === rangeFirstIndexColumn ? rangeLastIndexColumn : rangeFirstIndexColumn;\r\n const isLastColumn = cell.column === lastRangeColumn;\r\n\r\n return isLastColumn && isLastRow;\r\n }\r\n\r\n rowMax(rows) {\r\n let max;\r\n for (const row of rows) {\r\n if (max === undefined || _isRowBefore(max, row)) {\r\n max = row;\r\n }\r\n }\r\n return max;\r\n }\r\n\r\n rowMin(rows) {\r\n let min;\r\n for (const row of rows) {\r\n if (min === undefined || _isRowBefore(row, min)) {\r\n min = row;\r\n }\r\n }\r\n return min;\r\n }\r\n\r\n updateValuesOnMove(eventTarget) {\r\n const cellCtrl = _getCellCtrlForEventTarget(this.gos, eventTarget);\r\n const cell = cellCtrl?.cellPosition;\r\n\r\n this.cellHasChanged = false;\r\n\r\n if (!cell || (this.lastCellHovered && _areCellsEqual(cell, this.lastCellHovered))) {\r\n return;\r\n }\r\n\r\n const editing = this.beans.editSvc?.isEditing(cellCtrl, {\r\n withOpenEditor: true,\r\n });\r\n\r\n if (editing) {\r\n this.dragSvc.cancelDrag(eventTarget);\r\n return;\r\n }\r\n\r\n if (this.lastCellHovered) {\r\n this.cellHasChanged = true;\r\n }\r\n\r\n this.lastCellHovered = cell;\r\n }\r\n\r\n shouldSkipCurrentColumn(currentColumn) {\r\n return isRowNumberCol(currentColumn);\r\n }\r\n\r\n dispatchChangedEvent(started, finished, id) {\r\n const allNodesToBeSelected = []; // 1. Move OUTSIDE the loop\r\n\r\n this.cellRanges.map((cellRange) => {\r\n let currentRow = this.getRangeStartRow(cellRange);\r\n const lastRow = this.getRangeEndRow(cellRange);\r\n\r\n while (true) {\r\n const finishedAllRows = _missing(currentRow) || !currentRow || this.before(lastRow, currentRow);\r\n if (finishedAllRows || !currentRow || !cellRange.columns) {\r\n break;\r\n }\r\n const rowNode = _getRowNode(this.beans, currentRow);\r\n if (!rowNode) {\r\n currentRow = _getRowBelow(this.beans, currentRow);\r\n break;\r\n }\r\n if (!rowNode.isSelected()) {\r\n rowNode.setSelected(true);\r\n }\r\n allNodesToBeSelected.push(rowNode.data);\r\n currentRow = _getRowBelow(this.beans, currentRow);\r\n }\r\n });\r\n this.gridApi.getSelectedNodes().forEach((node) => {\r\n if (!allNodesToBeSelected.some((nodeToBeSelected) => node.data === nodeToBeSelected)) {\r\n node.setSelected(false);\r\n }\r\n });\r\n this.eventSvc.dispatchEvent({\r\n type: 'cellSelectionChanged',\r\n started,\r\n finished,\r\n id,\r\n });\r\n this.eventSvc.dispatchEvent({\r\n type: 'rangeSelectionChanged',\r\n started,\r\n finished,\r\n id,\r\n });\r\n }\r\n\r\n getColumnFromModel(col) {\r\n return typeof col === 'string' ? this.colModel.getCol(col) : col;\r\n }\r\n\r\n getColumnsFromModel(cols) {\r\n const {gos, visibleCols} = this;\r\n const isRowHeaderActive = gos.get('rowNumbers');\r\n\r\n cols = visibleCols.allCols;\r\n\r\n const columns = [];\r\n\r\n for (const col of cols) {\r\n const column = this.getColumnFromModel(col);\r\n if (!column || (isRowHeaderActive && this.shouldSkipCurrentColumn(column))) {\r\n continue;\r\n }\r\n columns.push(column);\r\n }\r\n\r\n return columns.length ? columns : undefined;\r\n }\r\n\r\n calculateColumnsBetween(columnA, columnB) {\r\n const allColumns = this.visibleCols.allCols;\r\n\r\n const fromColumn = this.getColumnFromModel(columnA);\r\n const toColumn = this.getColumnFromModel(columnB);\r\n\r\n const isSameColumn = fromColumn === toColumn;\r\n const fromIndex = allColumns.indexOf(fromColumn);\r\n\r\n if (fromIndex < 0) {\r\n _warn(178, {colId: fromColumn.getId()});\r\n return;\r\n }\r\n\r\n const toIndex = isSameColumn ? fromIndex : allColumns.indexOf(toColumn);\r\n\r\n if (toIndex < 0) {\r\n _warn(178, {colId: toColumn.getId()});\r\n return;\r\n }\r\n\r\n if (isSameColumn) {\r\n return this.getColumnsFromModel([fromColumn]);\r\n }\r\n\r\n const firstIndex = Math.min(fromIndex, toIndex);\r\n const lastIndex = firstIndex === fromIndex ? toIndex : fromIndex;\r\n const columns = [];\r\n\r\n for (let i = firstIndex; i <= lastIndex; i++) {\r\n columns.push(allColumns[i]);\r\n }\r\n\r\n return this.getColumnsFromModel(columns);\r\n }\r\n\r\n focusCellOnNewColumn(currentRange, column) {\r\n const {focusSvc} = this.beans;\r\n const focusedCell = focusSvc.getFocusedCell();\r\n\r\n if (!focusedCell) {\r\n return;\r\n }\r\n\r\n if (this.isCellInSpecificRange(focusedCell, currentRange)) {\r\n focusSvc.setFocusedCell({\r\n ...focusedCell,\r\n column,\r\n forceBrowserFocus: true,\r\n preventScrollOnBrowserFocus: true,\r\n });\r\n }\r\n }\r\n\r\n focusCellOnNewRow(currentRange, row) {\r\n const {focusSvc} = this.beans;\r\n const focusedCell = focusSvc.getFocusedCell();\r\n\r\n if (!focusedCell) {\r\n return;\r\n }\r\n\r\n if (this.isCellInSpecificRange(focusedCell, currentRange)) {\r\n focusSvc.setFocusedCell({\r\n ...row,\r\n column: focusedCell.column,\r\n forceBrowserFocus: true,\r\n preventScrollOnBrowserFocus: true,\r\n });\r\n }\r\n }\r\n\r\n // tests if this row selection is before the other row selection\r\n before(rowA, rowB) {\r\n switch (rowA.rowPinned) {\r\n case 'top':\r\n // we we are floating top, and other isn't, then we are always before\r\n if (rowB.rowPinned !== 'top') {\r\n return true;\r\n }\r\n break;\r\n case 'bottom':\r\n // if we are floating bottom, and the other isn't, then we are never before\r\n if (rowB.rowPinned !== 'bottom') {\r\n return false;\r\n }\r\n break;\r\n default:\r\n // if we are not floating, but the other one is floating...\r\n if (_exists(rowB.rowPinned)) {\r\n return rowB.rowPinned !== 'top';\r\n }\r\n break;\r\n }\r\n return rowA.rowIndex < rowB.rowIndex;\r\n }\r\n\r\n createDragListenerFeature(eContainer) {\r\n return new DragListenerFeature(eContainer);\r\n }\r\n\r\n createCellRangeFeature(beans, ctrl) {\r\n // return new CellRangeFeature(beans, ctrl);\r\n }\r\n}"]}
@@ -164,6 +164,7 @@ class DataGrid extends React.Component {
164
164
  this.getDefaultColDefinition = memoizeOne(this.getDefaultColDefinition.bind(this));
165
165
  this.getAdaptedColumnDefs = memoizeOne(this.getAdaptedColumnDefs.bind(this));
166
166
  this.getCustomComponents = memoizeOne(this.getCustomComponents.bind(this));
167
+ this.getTheme = memoizeOne(getAgGridThemeFromAntd, agThemeEquals);
167
168
  this.table_context = {
168
169
  loadingOverlayRenderer: this.loadingOverlayRenderer,
169
170
  noRecordsOverlayRenderer: this.noRecordsOverlayRenderer,
@@ -416,7 +417,6 @@ class DataGrid extends React.Component {
416
417
  },
417
418
  "alignRight": {}
418
419
  };
419
- this.getTheme = memoizeOne(getAgGridThemeFromAntd);
420
420
  }
421
421
  static getCellValue(props) {
422
422
  if (props) {
@@ -1658,8 +1658,7 @@ class DataGrid extends React.Component {
1658
1658
  }
1659
1659
  ;
1660
1660
  render() {
1661
- var _a, _b;
1662
- const _c = this.props, { onGridReady, columnDefs, disableColumnDefsPreprocessing, onColumnsChanged, paging, onPaginationChanged, onViewportChanged, selectedIds, search, toolbar, filter, onFilterChanged, onFilterModified, onCellFocused, onSortChanged, components, tableConfigVisible, onTableConfigVisible, noRecordsOverlayRenderer, loadingOverlayRenderer, onRowDataUpdated, rowStyleRules, onChangeRowStyleRules, defaultShowMilliseconds, onShowMilliseconds, defaultHideYear, onShowYear, suppressLoadingOverlay, defaultColDef, headerHeight, rowData, rowDataManualMode, gridRef, quickFilterParser, quickFilterMatcher, rowSelection, contextMenu, settingsMenu, exportMenu, panelStyle, tablePanelStyle, onColumnDefsAdapted, tableOverlayRenderer, onKeyPressed, theme } = _c, passedProperties = __rest(_c, ["onGridReady", "columnDefs", "disableColumnDefsPreprocessing", "onColumnsChanged", "paging", "onPaginationChanged", "onViewportChanged", "selectedIds", "search", "toolbar", "filter", "onFilterChanged", "onFilterModified", "onCellFocused", "onSortChanged", "components", "tableConfigVisible", "onTableConfigVisible", "noRecordsOverlayRenderer", "loadingOverlayRenderer", "onRowDataUpdated", "rowStyleRules", "onChangeRowStyleRules", "defaultShowMilliseconds", "onShowMilliseconds", "defaultHideYear", "onShowYear", "suppressLoadingOverlay", "defaultColDef", "headerHeight", "rowData", "rowDataManualMode", "gridRef", "quickFilterParser", "quickFilterMatcher", "rowSelection", "contextMenu", "settingsMenu", "exportMenu", "panelStyle", "tablePanelStyle", "onColumnDefsAdapted", "tableOverlayRenderer", "onKeyPressed", "theme"]);
1661
+ const _a = this.props, { onGridReady, columnDefs, disableColumnDefsPreprocessing, onColumnsChanged, paging, onPaginationChanged, onViewportChanged, selectedIds, search, toolbar, filter, onFilterChanged, onFilterModified, onCellFocused, onSortChanged, components, tableConfigVisible, onTableConfigVisible, noRecordsOverlayRenderer, loadingOverlayRenderer, onRowDataUpdated, rowStyleRules, onChangeRowStyleRules, defaultShowMilliseconds, onShowMilliseconds, defaultHideYear, onShowYear, suppressLoadingOverlay, defaultColDef, headerHeight, rowData, rowDataManualMode, gridRef, quickFilterParser, quickFilterMatcher, rowSelection, contextMenu, settingsMenu, exportMenu, panelStyle, tablePanelStyle, onColumnDefsAdapted, tableOverlayRenderer, onKeyPressed, theme } = _a, passedProperties = __rest(_a, ["onGridReady", "columnDefs", "disableColumnDefsPreprocessing", "onColumnsChanged", "paging", "onPaginationChanged", "onViewportChanged", "selectedIds", "search", "toolbar", "filter", "onFilterChanged", "onFilterModified", "onCellFocused", "onSortChanged", "components", "tableConfigVisible", "onTableConfigVisible", "noRecordsOverlayRenderer", "loadingOverlayRenderer", "onRowDataUpdated", "rowStyleRules", "onChangeRowStyleRules", "defaultShowMilliseconds", "onShowMilliseconds", "defaultHideYear", "onShowYear", "suppressLoadingOverlay", "defaultColDef", "headerHeight", "rowData", "rowDataManualMode", "gridRef", "quickFilterParser", "quickFilterMatcher", "rowSelection", "contextMenu", "settingsMenu", "exportMenu", "panelStyle", "tablePanelStyle", "onColumnDefsAdapted", "tableOverlayRenderer", "onKeyPressed", "theme"]);
1663
1662
  let key;
1664
1663
  let paginationPageSize = undefined;
1665
1664
  if (paging.pageSize > 0) {
@@ -1699,30 +1698,30 @@ class DataGrid extends React.Component {
1699
1698
  React.createElement(Card, { size: "small", variant: "borderless", style: { height: "100%" }, styles: { body: bodyStyle } },
1700
1699
  React.createElement("div", { style: { display: "flex" } }, this.renderNavigationPanel()),
1701
1700
  React.createElement("div", { style: tPanelStyle },
1702
- React.createElement(Dropdown, { trigger: ["contextMenu"], getPopupContainer: () => {
1703
- var _a, _b;
1704
- const parentNode = ((_b = (_a = ReactDOM.findDOMNode(this)) === null || _a === void 0 ? void 0 : _a.parentNode) !== null && _b !== void 0 ? _b : document.body);
1705
- return parentNode;
1706
- }, menu: getContextMenu({
1707
- onlySelectedNodes: true,
1708
- showMilliseconds: !!this.props.showMilliseconds,
1709
- showYear: !this.props.hideYear,
1710
- renderer: (_a = this.props.contextMenu) === null || _a === void 0 ? void 0 : _a.renderer,
1711
- onClick: (_b = this.props.contextMenu) === null || _b === void 0 ? void 0 : _b.onClick,
1712
- getExportContent: this.getExportContent,
1713
- hideNotificationOnClipboardCopy: true,
1714
- pageOrientation: this.state.pageOrientation,
1715
- exporting: this.state.exporting,
1716
- onPageOrientationChange: this.onPageOrientationChange,
1717
- onExport: this.onExport
1718
- }), open: this.state.contextMenuVisible, onOpenChange: (visible) => {
1719
- if (!visible) {
1720
- this.setState({ contextMenuVisible: false });
1721
- }
1722
- } },
1723
- React.createElement(WithCss, { useStyles: useStyles }, (styles) => {
1724
- var _a, _b;
1725
- return React.createElement("div", { className: "ag-theme-balham " + styles.styles.baseLayout, style: { width: "100%", height: "100%" } },
1701
+ React.createElement(WithCss, { useStyles: useStyles }, (styles) => {
1702
+ var _a, _b, _c, _d;
1703
+ return React.createElement(Dropdown, { trigger: ["contextMenu"], getPopupContainer: () => {
1704
+ var _a, _b;
1705
+ const parentNode = ((_b = (_a = ReactDOM.findDOMNode(this)) === null || _a === void 0 ? void 0 : _a.parentNode) !== null && _b !== void 0 ? _b : document.body);
1706
+ return parentNode;
1707
+ }, menu: getContextMenu({
1708
+ onlySelectedNodes: true,
1709
+ showMilliseconds: !!this.props.showMilliseconds,
1710
+ showYear: !this.props.hideYear,
1711
+ renderer: (_a = this.props.contextMenu) === null || _a === void 0 ? void 0 : _a.renderer,
1712
+ onClick: (_b = this.props.contextMenu) === null || _b === void 0 ? void 0 : _b.onClick,
1713
+ getExportContent: this.getExportContent,
1714
+ hideNotificationOnClipboardCopy: true,
1715
+ pageOrientation: this.state.pageOrientation,
1716
+ exporting: this.state.exporting,
1717
+ onPageOrientationChange: this.onPageOrientationChange,
1718
+ onExport: this.onExport
1719
+ }), open: this.state.contextMenuVisible, onOpenChange: (visible) => {
1720
+ if (!visible) {
1721
+ this.setState({ contextMenuVisible: false });
1722
+ }
1723
+ } },
1724
+ React.createElement("div", { className: "ag-theme-balham " + styles.styles.baseLayout, style: { width: "100%", height: "100%" } },
1726
1725
  React.createElement(ConfigProvider.ConfigContext.Consumer, null, (context) => {
1727
1726
  var _a;
1728
1727
  const defaultTheme = theme !== null && theme !== void 0 ? theme : this.getTheme((_a = context.theme) === null || _a === void 0 ? void 0 : _a.algorithm, styles.theme);
@@ -1732,8 +1731,8 @@ class DataGrid extends React.Component {
1732
1731
  React.createElement("div", { className: "ag-overlay", "aria-hidden": "true" },
1733
1732
  React.createElement("div", { className: "ag-overlay-panel" },
1734
1733
  React.createElement("div", { className: "ag-overlay-wrapper ag-layout-normal ag-overlay-loading-wrapper" },
1735
- React.createElement("div", { className: "ag-react-container" }, (_b = (_a = this.props).loadingOverlayRenderer) === null || _b === void 0 ? void 0 : _b.call(_a))))));
1736
- })), tableOverlayRenderer === null || tableOverlayRenderer === void 0 ? void 0 :
1734
+ React.createElement("div", { className: "ag-react-container" }, (_d = (_c = this.props).loadingOverlayRenderer) === null || _d === void 0 ? void 0 : _d.call(_c)))))));
1735
+ }), tableOverlayRenderer === null || tableOverlayRenderer === void 0 ? void 0 :
1737
1736
  tableOverlayRenderer())),
1738
1737
  !!this.gridApi && !!this.gridApi && this.state.pageSize !== null &&
1739
1738
  React.createElement(DataGridEditor, { dataGrid: this, gridApi: this.gridApi, columnDefinitions: columnDefs, columnModel: this.state.columnModel, visible: !!this.props.tableConfigVisible, onTableConfigVisible: this.showTableConfiguration, paginationPageSize: paging.pageSize, paginationDefaultPageSize: paging.defaultPageSize, currentPageSize: this.state.pageSize, showMilliseconds: !!this.props.showMilliseconds, defaultShowMilliseconds: !!this.props.defaultShowMilliseconds, showYear: !this.props.hideYear, defaultShowYear: !this.props.defaultHideYear, rowStyleRules: this.props.rowStyleRules, defaultRowStyleRules: this.props.defaultRowStyleRules, onChangeRowStyleRules: onChangeRowStyleRules }),
@@ -1780,4 +1779,17 @@ function getAgGridThemeFromAntd(algorithm, token) {
1780
1779
  headerBackgroundColor: token.colorFillAlter,
1781
1780
  });
1782
1781
  }
1782
+ function agThemeEquals(newArgs, lastArgs) {
1783
+ const [newAlgo, newToken] = newArgs;
1784
+ const [lastAlgo, lastToken] = lastArgs;
1785
+ if (newAlgo !== lastAlgo)
1786
+ return false;
1787
+ return (newToken.colorPrimary === lastToken.colorPrimary &&
1788
+ newToken.colorBgContainer === lastToken.colorBgContainer &&
1789
+ newToken.colorText === lastToken.colorText &&
1790
+ newToken.controlItemBgActive === lastToken.controlItemBgActive &&
1791
+ newToken.controlItemBgHover === lastToken.controlItemBgHover &&
1792
+ newToken.colorBorder === lastToken.colorBorder &&
1793
+ newToken.colorFillAlter === lastToken.colorFillAlter);
1794
+ }
1783
1795
  //# sourceMappingURL=dataGrid.js.map