@itwin/components-react 3.2.0-dev.8 → 3.3.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/lib/cjs/components-react/common/ImageRenderer.d.ts.map +1 -1
  3. package/lib/cjs/components-react/common/ImageRenderer.js +2 -1
  4. package/lib/cjs/components-react/common/ImageRenderer.js.map +1 -1
  5. package/lib/cjs/components-react/common/showhide/ShowHideDialog.d.ts +4 -4
  6. package/lib/cjs/components-react/common/showhide/ShowHideDialog.d.ts.map +1 -1
  7. package/lib/cjs/components-react/common/showhide/ShowHideDialog.js +3 -2
  8. package/lib/cjs/components-react/common/showhide/ShowHideDialog.js.map +1 -1
  9. package/lib/cjs/components-react/common/showhide/ShowHideItem.d.ts +3 -3
  10. package/lib/cjs/components-react/common/showhide/ShowHideItem.d.ts.map +1 -1
  11. package/lib/cjs/components-react/common/showhide/ShowHideItem.js.map +1 -1
  12. package/lib/cjs/components-react/common/showhide/ShowHideMenu.d.ts +2 -2
  13. package/lib/cjs/components-react/common/showhide/ShowHideMenu.d.ts.map +1 -1
  14. package/lib/cjs/components-react/common/showhide/ShowHideMenu.js +2 -1
  15. package/lib/cjs/components-react/common/showhide/ShowHideMenu.js.map +1 -1
  16. package/lib/cjs/components-react/editors/EnumButtonGroupEditor.js +1 -1
  17. package/lib/cjs/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
  18. package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.d.ts.map +1 -1
  19. package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.js +1 -1
  20. package/lib/cjs/components-react/properties/renderers/value/DoublePropertyValueRenderer.js.map +1 -1
  21. package/lib/cjs/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.d.ts.map +1 -1
  22. package/lib/cjs/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js +1 -3
  23. package/lib/cjs/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js.map +1 -1
  24. package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.d.ts.map +1 -1
  25. package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js +1 -1
  26. package/lib/cjs/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js.map +1 -1
  27. package/lib/cjs/components-react/properties/renderers/value/UrlPropertyValueRenderer.js +1 -1
  28. package/lib/cjs/components-react/properties/renderers/value/UrlPropertyValueRenderer.js.map +1 -1
  29. package/lib/cjs/components-react/table/component/Table.js +1 -1
  30. package/lib/cjs/components-react/table/component/Table.js.map +1 -1
  31. package/lib/cjs/components-react/toolbar/Item.js +1 -1
  32. package/lib/cjs/components-react/toolbar/Item.js.map +1 -1
  33. package/lib/cjs/components-react/toolbar/PopupItem.js +1 -1
  34. package/lib/cjs/components-react/toolbar/PopupItem.js.map +1 -1
  35. package/lib/cjs/components-react/toolbar/PopupItemWithDrag.js +1 -1
  36. package/lib/cjs/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
  37. package/lib/cjs/components-react/toolbar/Toolbar.js +2 -2
  38. package/lib/cjs/components-react/toolbar/Toolbar.js.map +1 -1
  39. package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.js +2 -2
  40. package/lib/cjs/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
  41. package/lib/cjs/components-react/toolbar/groupPanel/tool/Tool.js +1 -1
  42. package/lib/cjs/components-react/toolbar/groupPanel/tool/Tool.js.map +1 -1
  43. package/lib/esm/components-react/common/ImageRenderer.d.ts.map +1 -1
  44. package/lib/esm/components-react/common/ImageRenderer.js +4 -3
  45. package/lib/esm/components-react/common/ImageRenderer.js.map +1 -1
  46. package/lib/esm/components-react/common/showhide/ShowHideDialog.d.ts +4 -4
  47. package/lib/esm/components-react/common/showhide/ShowHideDialog.d.ts.map +1 -1
  48. package/lib/esm/components-react/common/showhide/ShowHideDialog.js +3 -2
  49. package/lib/esm/components-react/common/showhide/ShowHideDialog.js.map +1 -1
  50. package/lib/esm/components-react/common/showhide/ShowHideItem.d.ts +3 -3
  51. package/lib/esm/components-react/common/showhide/ShowHideItem.d.ts.map +1 -1
  52. package/lib/esm/components-react/common/showhide/ShowHideItem.js.map +1 -1
  53. package/lib/esm/components-react/common/showhide/ShowHideMenu.d.ts +2 -2
  54. package/lib/esm/components-react/common/showhide/ShowHideMenu.d.ts.map +1 -1
  55. package/lib/esm/components-react/common/showhide/ShowHideMenu.js +2 -1
  56. package/lib/esm/components-react/common/showhide/ShowHideMenu.js.map +1 -1
  57. package/lib/esm/components-react/editors/EnumButtonGroupEditor.js +1 -1
  58. package/lib/esm/components-react/editors/EnumButtonGroupEditor.js.map +1 -1
  59. package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.d.ts.map +1 -1
  60. package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.js +2 -2
  61. package/lib/esm/components-react/properties/renderers/value/DoublePropertyValueRenderer.js.map +1 -1
  62. package/lib/esm/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.d.ts.map +1 -1
  63. package/lib/esm/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js +1 -3
  64. package/lib/esm/components-react/properties/renderers/value/MultilineTextPropertyValueRenderer.js.map +1 -1
  65. package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.d.ts.map +1 -1
  66. package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js +2 -2
  67. package/lib/esm/components-react/properties/renderers/value/NavigationPropertyValueRenderer.js.map +1 -1
  68. package/lib/esm/components-react/properties/renderers/value/UrlPropertyValueRenderer.js +1 -1
  69. package/lib/esm/components-react/properties/renderers/value/UrlPropertyValueRenderer.js.map +1 -1
  70. package/lib/esm/components-react/table/component/Table.js +1 -1
  71. package/lib/esm/components-react/table/component/Table.js.map +1 -1
  72. package/lib/esm/components-react/toolbar/Item.js +1 -1
  73. package/lib/esm/components-react/toolbar/Item.js.map +1 -1
  74. package/lib/esm/components-react/toolbar/PopupItem.js +1 -1
  75. package/lib/esm/components-react/toolbar/PopupItem.js.map +1 -1
  76. package/lib/esm/components-react/toolbar/PopupItemWithDrag.js +1 -1
  77. package/lib/esm/components-react/toolbar/PopupItemWithDrag.js.map +1 -1
  78. package/lib/esm/components-react/toolbar/Toolbar.js +2 -2
  79. package/lib/esm/components-react/toolbar/Toolbar.js.map +1 -1
  80. package/lib/esm/components-react/toolbar/ToolbarWithOverflow.js +2 -2
  81. package/lib/esm/components-react/toolbar/ToolbarWithOverflow.js.map +1 -1
  82. package/lib/esm/components-react/toolbar/groupPanel/tool/Tool.js +1 -1
  83. package/lib/esm/components-react/toolbar/groupPanel/tool/Tool.js.map +1 -1
  84. package/package.json +16 -14
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../../../src/components-react/table/component/Table.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,wBAAsB;AACtB,mDAAiD;AACjD,4DAAoC;AACpC,+DAAiD;AACjD,mCAAiC;AACjC,6CAA+B;AAC/B,sEAA4C;AAC5C,sDAAuE;AACvE,0DAA4D;AAC5D,kDAG2B;AAC3B,8EAEiD;AACjD,0EAAsE;AACtE,qEAAkE;AAClE,gFAA6E;AAE7E,0DAAmE;AACnE,gFAA0G;AAC1G,wEAA2H;AAC3H,6FAA0F;AAC1F,qFAAkF;AAClF,+FAA4F;AAC5F,kFAAoG;AACpG,6FAA0F;AAC1F,wGAAqG;AACrG,4DAA+G;AAC/G,6DAA0D;AAC1D,2CAAgF;AAChF,+CAAiE;AAEjE,uDAAuD;AAEvD,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC;;;GAGG;AACH,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,6DAAG,CAAA;IACH,+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I,CAAC,KAAK,CAAC;QACnD,OAAO,CACL,oBAAC,yBAAa,CAAC,GAAG,OAAK,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,GAAI,CACrE,CAAC;IACJ,CAAC;CACF;AATD,4BASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport \"./Table.scss\";\r\nimport \"../columnfiltering/ColumnFiltering.scss\";\r\nimport classnames from \"classnames\";\r\nimport classnamesDedupe from \"classnames/dedupe\";\r\nimport { memoize } from \"lodash\";\r\nimport * as React from \"react\";\r\nimport ReactDataGrid from \"react-data-grid\";\r\nimport { DisposableList, Guid, GuidString } from \"@itwin/core-bentley\";\r\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\r\nimport {\r\n CommonProps, Dialog, ElementResizeObserver, isNavigationKey, ItemKeyboardNavigator, LocalStateStorage, Orientation, SortDirection, Timer,\r\n UiStateStorage, UiStateStorageStatus,\r\n} from \"@itwin/core-react\";\r\nimport {\r\n MultiSelectionHandler, OnItemsDeselectedCallback, OnItemsSelectedCallback, SelectionHandler, SingleSelectionHandler,\r\n} from \"../../common/selection/SelectionHandler\";\r\nimport { SelectionMode } from \"../../common/selection/SelectionModes\";\r\nimport { ShowHideMenu } from \"../../common/showhide/ShowHideMenu\";\r\nimport { TypeConverterManager } from \"../../converters/TypeConverterManager\";\r\nimport { PropertyUpdatedArgs } from \"../../editors/EditorContainer\";\r\nimport { TableRowStyleProvider } from \"../../properties/ItemStyle\";\r\nimport { PropertyDialogState, PropertyValueRendererManager } from \"../../properties/ValueRendererManager\";\r\nimport { CompositeFilterDescriptorCollection, FilterCompositionLogicalOperator } from \"../columnfiltering/ColumnFiltering\";\r\nimport { MultiSelectFilter } from \"../columnfiltering/data-grid-addons/MultiSelectFilter\";\r\nimport { NumericFilter } from \"../columnfiltering/data-grid-addons/NumericFilter\";\r\nimport { SingleSelectFilter } from \"../columnfiltering/data-grid-addons/SingleSelectFilter\";\r\nimport { DataGridFilterParser, ReactDataGridFilter } from \"../columnfiltering/DataGridFilterParser\";\r\nimport { MultiValueFilter } from \"../columnfiltering/multi-value-filter/MultiValueFilter\";\r\nimport { TableFilterDescriptorCollection } from \"../columnfiltering/TableFilterDescriptorCollection\";\r\nimport { CellItem, ColumnDescription, FilterRenderer, RowItem, TableDataProvider } from \"../TableDataProvider\";\r\nimport { DragDropHeaderCell } from \"./DragDropHeaderCell\";\r\nimport { TableCell, TableCellContent, TableIconCellContent } from \"./TableCell\";\r\nimport { ReactDataGridColumn, TableColumn } from \"./TableColumn\";\r\n\r\n// cspell:ignore Overscan columnfiltering Dedupe popout\r\n\r\nconst TABLE_ROW_HEIGHT = 27;\r\nconst TABLE_FILTER_ROW_HEIGHT = 32;\r\n\r\n/**\r\n * Specifies table selection target.\r\n * @public @deprecated\r\n */\r\nexport enum TableSelectionTarget {\r\n Row,\r\n Cell,\r\n}\r\n\r\n/** Scroll Direction */\r\nenum SCROLL_DIRECTION {\r\n UP = \"upwards\",\r\n DOWN = \"downwards\",\r\n LEFT = \"left\",\r\n RIGHT = \"right\",\r\n NONE = \"none\",\r\n}\r\n\r\n/** Scroll State */\r\ninterface ScrollState {\r\n height: number;\r\n scrollTop: number;\r\n scrollLeft: number;\r\n rowVisibleStartIdx: number;\r\n rowVisibleEndIdx: number;\r\n rowOverscanStartIdx: number;\r\n rowOverscanEndIdx: number;\r\n colVisibleStartIdx: number;\r\n colVisibleEndIdx: number;\r\n colOverscanStartIdx: number;\r\n colOverscanEndIdx: number;\r\n scrollDirection: SCROLL_DIRECTION;\r\n lastFrozenColumnIndex: number;\r\n isScrolling: boolean;\r\n}\r\n\r\n/** Properties for the Table React component\r\n * @public @deprecated Use the Table component in @itwin/itwinui-react\r\n */\r\nexport interface TableProps extends CommonProps {\r\n /** Data provider for the Table */\r\n dataProvider: TableDataProvider;\r\n /** Amount of rows per page. The default is 100. */\r\n pageAmount?: number;\r\n\r\n /** Called when rows are loaded */\r\n onRowsLoaded?: (firstRowIndex: number, lastRowIndex: number) => void;\r\n\r\n /** Callback for determining if row is selected */\r\n isRowSelected?: (row: RowItem) => boolean;\r\n /** Callback for when rows are selected */\r\n onRowsSelected?: (rowIterator: AsyncIterableIterator<RowItem>, replace: boolean) => Promise<boolean>;\r\n /** Callback for when rows are deselected */\r\n onRowsDeselected?: (rowIterator: AsyncIterableIterator<RowItem>) => Promise<boolean>;\r\n\r\n /** Callback for determining if cell is selected */\r\n isCellSelected?: (rowIndex: number, cell: CellItem) => boolean;\r\n /** Callback for when cells are selected */\r\n onCellsSelected?: (cellIterator: AsyncIterableIterator<[RowItem, CellItem]>, replace: boolean) => Promise<boolean>;\r\n /** Callback for when cells are deselected */\r\n onCellsDeselected?: (cellIterator: AsyncIterableIterator<[RowItem, CellItem]>) => Promise<boolean>;\r\n\r\n /** Specifies the selection target. The default is Row. */\r\n tableSelectionTarget?: TableSelectionTarget;\r\n /** Specifies the selection mode. The default is Single. */\r\n selectionMode?: SelectionMode;\r\n\r\n /** Callback for when properties are being edited */\r\n onPropertyEditing?: (args: TableCellEditorState) => void;\r\n /** Callback for when properties are updated */\r\n onPropertyUpdated?: (propertyArgs: PropertyUpdatedArgs, cellArgs: TableCellUpdatedArgs) => Promise<boolean>;\r\n\r\n /** @internal */\r\n renderRow?: (item: RowItem, props: TableRowProps) => React.ReactNode;\r\n /** Enables context menu to show/hide columns */\r\n showHideColumns?: boolean;\r\n /** Indicates whether the Table columns are reorderable */\r\n reorderableColumns?: boolean;\r\n /** Optional parameter for persistent UI settings. Used for column reordering and show persistency. */\r\n settingsStorage?: UiStateStorage;\r\n /** Optional parameter for persistent UI settings. Used for column reordering and show persistency.\r\n * @deprecated use settingsStorage property */\r\n uiStateStorage?: UiStateStorage;\r\n /** Identifying string used for persistent state. */\r\n settingsIdentifier?: string;\r\n /** Custom property value renderer manager */\r\n propertyValueRendererManager?: PropertyValueRendererManager;\r\n /**\r\n * Gets called when rendering is finished. Should be used while testing to know when asynchronous rendering has finished.\r\n * @internal\r\n */\r\n onRender?: () => void;\r\n\r\n /** Hide the header */\r\n hideHeader?: boolean;\r\n /** Alternate the background of odd and even rows */\r\n stripedRows?: boolean;\r\n /** Specifies a row index to scroll to */\r\n scrollToRow?: number;\r\n /** @internal */\r\n onScrollToRow?: (rowIndex: number) => void;\r\n /** @internal */\r\n onApplyFilter?: () => void;\r\n\r\n /** Called to show a context menu when a cell is right-clicked. */\r\n onCellContextMenu?: (args: TableCellContextMenuArgs) => void;\r\n /** Maximum number of distinct values for filtering */\r\n maximumDistinctValues?: number;\r\n}\r\n\r\n/** Properties for a Table cell\r\n * @public @deprecated Use the Table component in @iTwin/@iTwinUI-react\r\n */\r\nexport interface CellProps {\r\n item: CellItem;\r\n displayValue: string;\r\n render: React.ComponentType<{ isSelected: boolean }>;\r\n}\r\n\r\n/** Properties for a Table row\r\n * @public @deprecated Use the Table component in @itwin/itwinui-react\r\n */\r\nexport interface RowProps {\r\n index: number;\r\n item: RowItem;\r\n cells: { [key: string]: CellProps };\r\n render?: () => React.ReactNode;\r\n style?: React.CSSProperties;\r\n}\r\n\r\ninterface RowsLoadResult {\r\n rows: RowProps[];\r\n selectedRowIndices: number[];\r\n selectedCellKeys: CellKey[];\r\n}\r\n\r\ninterface ReactDataGridColumnEventArgs {\r\n rowIdx: number;\r\n idx: number;\r\n name: string;\r\n}\r\n\r\n/** Cell/Property Editor state\r\n * @public @deprecated Use the Table component in @itwin/itwinui-react\r\n */\r\nexport interface TableCellEditorState {\r\n active: boolean;\r\n rowIndex?: number;\r\n colIndex?: number;\r\n cellKey?: string;\r\n}\r\n\r\n/** Cell/Property Updated Args\r\n * @public @deprecated Use the Table component in @iTwin/@iTwinUI-react\r\n */\r\nexport interface TableCellUpdatedArgs {\r\n rowIndex: number;\r\n colIndex: number;\r\n cellKey: string;\r\n}\r\n\r\n/** Arguments for `TableProps.onCellContextMenu` callback\r\n * @public @deprecated Use the Table component in @itwin/itwinui-react\r\n */\r\nexport interface TableCellContextMenuArgs {\r\n /** Index of the row clicked */\r\n rowIndex: number;\r\n /** Index of the column clicked */\r\n colIndex: number;\r\n /** Key of the cell clicked */\r\n cellKey: string;\r\n /** An event which caused the context menu callback */\r\n event: React.MouseEvent;\r\n /** CellItem of the cell clicked */\r\n cellItem?: CellItem;\r\n}\r\n\r\n/** @internal */\r\ninterface TableState {\r\n columns: TableColumn[];\r\n hiddenColumns: string[];\r\n rows: RowProps[];\r\n rowsCount: number;\r\n menuVisible: boolean;\r\n menuX: number;\r\n menuY: number;\r\n cellEditorState: TableCellEditorState;\r\n dialog?: PropertyDialogState;\r\n keyboardEditorCellKey?: string;\r\n // TODO: Enable, when table gets refactored\r\n // popup?: PropertyPopupState;\r\n gridContainer: HTMLDivElement | null;\r\n}\r\n\r\nconst initialState: TableState = {\r\n columns: [],\r\n hiddenColumns: [],\r\n rows: [],\r\n rowsCount: 0,\r\n cellEditorState: { active: false },\r\n menuVisible: false,\r\n menuX: 0,\r\n menuY: 0,\r\n gridContainer: null,\r\n};\r\n\r\ninterface CellKey {\r\n rowIndex: number;\r\n columnKey: string;\r\n}\r\n\r\n/** TableRowRenderer props. */\r\ninterface TableRowRendererProps {\r\n rowRendererCreator: () => any;\r\n}\r\n\r\n/** ReactDataGrid requires a class component for the RowRenderer because it sets a ref to it. */\r\nclass TableRowRenderer extends React.Component<TableRowRendererProps> {\r\n public override render() {\r\n const creatorFn = this.props.rowRendererCreator();\r\n return creatorFn(this.props);\r\n }\r\n}\r\n\r\nconst enum TableUpdate { // eslint-disable-line no-restricted-syntax\r\n None = 0,\r\n Rows = 1,\r\n Complete = 2,\r\n}\r\n\r\nconst enum UpdateStatus { // eslint-disable-line no-restricted-syntax\r\n Continue,\r\n Abort,\r\n}\r\n\r\n/**\r\n * Table React component that displays rows and columns in a grid along with a header\r\n * @public @deprecated Use the Table component in @iTwin/@iTwinUI-react\r\n */\r\nexport class Table extends React.Component<TableProps, TableState> {\r\n private _pageAmount = 100;\r\n private _disposableListeners = new DisposableList();\r\n private _isMounted = false;\r\n private _currentUpdate = TableUpdate.None;\r\n private _pendingUpdate = TableUpdate.None;\r\n private _rowLoadGuid = Guid.createValue();\r\n private _rowSelectionHandler: SelectionHandler<number>;\r\n private _cellSelectionHandler: SelectionHandler<CellKey>;\r\n private _selectedRowIndices: Set<number> = new Set<number>();\r\n private _selectedCellKeys: Map<string, Set<number>> = new Map<string, Set<number>>(); // column keys -> rowIndices\r\n private _rowItemSelectionHandlers?: Array<SingleSelectionHandler<number>>;\r\n private _cellItemSelectionHandlers?: Array<Array<SingleSelectionHandler<CellKey>>>;\r\n private _pressedItemSelected: boolean = false;\r\n private _tableRef = React.createRef<HTMLDivElement>();\r\n private _gridRef = React.createRef<ReactDataGrid<any>>();\r\n private _gridContainerRef = React.createRef<HTMLDivElement>();\r\n private _filterDescriptors?: TableFilterDescriptorCollection;\r\n private _filterRowShown = false;\r\n private _topRowIndex = 0;\r\n private _pokeScrollTimer = new Timer(100);\r\n\r\n /** @internal */\r\n public override readonly state = initialState;\r\n\r\n /** @internal */\r\n constructor(props: TableProps) {\r\n super(props);\r\n\r\n if (props.pageAmount)\r\n this._pageAmount = props.pageAmount;\r\n\r\n this._disposableListeners.add(props.dataProvider.onColumnsChanged.addListener(this._onColumnsChanged));\r\n this._disposableListeners.add(props.dataProvider.onRowsChanged.addListener(this._onRowsChanged));\r\n this._rowSelectionHandler = new SelectionHandler(props.selectionMode ? props.selectionMode : SelectionMode.Single);\r\n this._cellSelectionHandler = new SelectionHandler(props.selectionMode ? props.selectionMode : SelectionMode.Single);\r\n this._rowSelectionHandler.onItemsSelectedCallback = this._onRowsSelected;\r\n this._rowSelectionHandler.onItemsDeselectedCallback = this._onRowsDeselected;\r\n this._cellSelectionHandler.onItemsSelectedCallback = this._onCellsSelected;\r\n this._cellSelectionHandler.onItemsDeselectedCallback = this._onCellsDeselected;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n private get rowItemSelectionHandlers(): Array<SingleSelectionHandler<number>> {\r\n // istanbul ignore else\r\n if (!this._rowItemSelectionHandlers) {\r\n this._rowItemSelectionHandlers = [];\r\n for (let i = 0; i < this.state.rowsCount; i++)\r\n this._rowItemSelectionHandlers.push(this.createRowItemSelectionHandler(i));\r\n }\r\n return this._rowItemSelectionHandlers;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n private get cellItemSelectionHandlers(): Array<Array<SingleSelectionHandler<CellKey>>> {\r\n // istanbul ignore else\r\n if (!this._cellItemSelectionHandlers) {\r\n this._cellItemSelectionHandlers = [];\r\n for (let rowIndex = 0; rowIndex < this.state.rowsCount; rowIndex++) {\r\n this._cellItemSelectionHandlers[rowIndex] = [];\r\n for (const column of this.state.columns) {\r\n this._cellItemSelectionHandlers[rowIndex].push(this.createCellItemSelectionHandler({ rowIndex, columnKey: column.key }));\r\n }\r\n }\r\n }\r\n return this._cellItemSelectionHandlers;\r\n }\r\n\r\n private async * createRowIterator(rowIndices: number[]): AsyncIterableIterator<RowItem> {\r\n for (const index of rowIndices)\r\n yield await this.props.dataProvider.getRow(index);\r\n }\r\n\r\n private async * createCellIterator(cellKeys: CellKey[]): AsyncIterableIterator<[RowItem, CellItem]> {\r\n for (const key of cellKeys) {\r\n const row = await this.props.dataProvider.getRow(key.rowIndex);\r\n yield [row, this._getCellItem(row, key.columnKey)];\r\n }\r\n }\r\n\r\n private _onRowsSelected: OnItemsSelectedCallback<number> = (rowIndices: number[], replace: boolean) => {\r\n if (this.props.onRowsSelected)\r\n this.props.onRowsSelected(this.createRowIterator(rowIndices), replace); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n };\r\n\r\n private _onRowsDeselected: OnItemsDeselectedCallback<number> = (rowIndices: number[]) => {\r\n if (this.props.onRowsDeselected)\r\n this.props.onRowsDeselected(this.createRowIterator(rowIndices)); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n };\r\n\r\n private _onCellsSelected: OnItemsSelectedCallback<CellKey> = (cellKeys: CellKey[], replace: boolean) => {\r\n if (this.props.onCellsSelected)\r\n this.props.onCellsSelected(this.createCellIterator(cellKeys), replace); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n };\r\n\r\n private _onCellsDeselected: OnItemsDeselectedCallback<CellKey> = (cellKeys: CellKey[]) => {\r\n if (this.props.onCellsDeselected)\r\n this.props.onCellsDeselected(this.createCellIterator(cellKeys)); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n };\r\n\r\n private get _tableSelectionTarget(): TableSelectionTarget {\r\n return this.props.tableSelectionTarget ? this.props.tableSelectionTarget : TableSelectionTarget.Row;\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate(previousProps: TableProps, previousState: TableState) {\r\n this._rowSelectionHandler.selectionMode = this.props.selectionMode ? this.props.selectionMode : SelectionMode.Single;\r\n this._cellSelectionHandler.selectionMode = this.props.selectionMode ? this.props.selectionMode : SelectionMode.Single;\r\n\r\n if (previousProps.dataProvider !== this.props.dataProvider) {\r\n this._disposableListeners.dispose();\r\n this._disposableListeners.add(this.props.dataProvider.onColumnsChanged.addListener(this._onColumnsChanged));\r\n this._disposableListeners.add(this.props.dataProvider.onRowsChanged.addListener(this._onRowsChanged));\r\n }\r\n\r\n if (this.props.dataProvider !== previousProps.dataProvider) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.update();\r\n return;\r\n }\r\n\r\n // When hiddenColumns length is changed, we need to re-render component so that cell widths would be calculated appropriately.\r\n if (previousState.hiddenColumns.length !== this.state.hiddenColumns.length)\r\n this.forceUpdate();\r\n\r\n if (this.props.isCellSelected !== previousProps.isCellSelected\r\n || this.props.isRowSelected !== previousProps.isRowSelected\r\n || this.props.tableSelectionTarget !== previousProps.tableSelectionTarget) {\r\n this.updateSelectedRows();\r\n this.updateSelectedCells();\r\n }\r\n\r\n if (this.props.scrollToRow !== previousProps.scrollToRow) {\r\n // istanbul ignore else\r\n if (this.props.scrollToRow !== undefined)\r\n this.scrollToRow(this.props.scrollToRow);\r\n }\r\n\r\n /* istanbul ignore next */\r\n if (this.props.onRender)\r\n this.props.onRender();\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n let gridContainer: HTMLDivElement | null = null;\r\n\r\n this._isMounted = true;\r\n\r\n // The previously used ReactResizeDetector, which does not work in popout/child windows, used deprecated React.findDomNode\r\n // which is now deprecated so, so new ElementResizeObserver requires you to pass the element to observe. So get the\r\n // same HTMLDivElement from grid as was used previously by ReactResizeDetector.\r\n if (this._gridRef.current) {\r\n const grid = this._gridRef.current as any;\r\n gridContainer = grid.getDataGridDOMNode();\r\n }\r\n this.setState({ gridContainer }, () => {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.update();\r\n });\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n this._isMounted = false;\r\n this._disposableListeners.dispose();\r\n this._unsetPokeScrollTimeout();\r\n }\r\n\r\n private scrollToRow(rowIndex: number) {\r\n // istanbul ignore else\r\n if (this._gridRef.current) {\r\n const grid = this._gridRef.current as any;\r\n // istanbul ignore else\r\n if (grid.getRowOffsetHeight && grid.getDataGridDOMNode) {\r\n const top = TABLE_ROW_HEIGHT * rowIndex;\r\n const gridCanvas = grid.getDataGridDOMNode().querySelector(\".react-grid-Canvas\");\r\n gridCanvas.scrollTop = top;\r\n this._topRowIndex = rowIndex;\r\n\r\n // istanbul ignore else\r\n if (this.props.onScrollToRow)\r\n this.props.onScrollToRow(rowIndex);\r\n }\r\n }\r\n }\r\n\r\n private setFocusToSelected() {\r\n // istanbul ignore next\r\n if (this._gridRef.current) {\r\n const grid = this._gridRef.current as any;\r\n // istanbul ignore else\r\n if (grid.getDataGridDOMNode) {\r\n const gridSelected = grid.getDataGridDOMNode().querySelector(\".rdg-selected\");\r\n // istanbul ignore else\r\n if (gridSelected) {\r\n gridSelected.focus();\r\n }\r\n }\r\n }\r\n }\r\n\r\n private async handlePendingUpdate(): Promise<UpdateStatus> {\r\n const update = this._pendingUpdate;\r\n this._pendingUpdate = TableUpdate.None;\r\n\r\n let status = UpdateStatus.Continue;\r\n if (update === TableUpdate.Complete)\r\n status = await this.updateColumns();\r\n // istanbul ignore else\r\n if (status === UpdateStatus.Continue && update > TableUpdate.None)\r\n status = await this.updateRows();\r\n return status;\r\n }\r\n\r\n private async updateColumns(): Promise<UpdateStatus> {\r\n if (this._currentUpdate !== TableUpdate.None) {\r\n this._pendingUpdate = TableUpdate.Complete;\r\n return UpdateStatus.Abort;\r\n }\r\n\r\n this._currentUpdate = TableUpdate.Complete;\r\n const columnDescriptions = await this.props.dataProvider.getColumns();\r\n this._currentUpdate = TableUpdate.None;\r\n\r\n // istanbul ignore next\r\n if (!this._isMounted)\r\n return UpdateStatus.Abort;\r\n\r\n if (this._pendingUpdate === TableUpdate.Complete) {\r\n await this.handlePendingUpdate();\r\n return UpdateStatus.Abort;\r\n }\r\n\r\n let dataGridColumns = columnDescriptions.map(this._columnDescriptionToReactDataGridColumn);\r\n if (this.props.settingsIdentifier) {\r\n const stateStorage: UiStateStorage = this.props.settingsStorage || /* istanbul ignore next */ this.props.uiStateStorage || /* istanbul ignore next */ new LocalStateStorage();\r\n const reorderResult = await stateStorage.getSetting(this.props.settingsIdentifier, \"ColumnReorder\");\r\n // istanbul ignore next\r\n if (reorderResult.status === UiStateStorageStatus.Success) {\r\n const setting = reorderResult.setting as string[];\r\n // map columns according to the keys in columns, in the order of the loaded array of keys\r\n dataGridColumns = setting.map((key) => dataGridColumns.filter((col) => col.key === key)[0]);\r\n } else if (reorderResult.status === UiStateStorageStatus.NotFound) {\r\n const keys = columnDescriptions.map((col) => col.key);\r\n await stateStorage.saveSetting(this.props.settingsIdentifier, \"ColumnReorder\", keys);\r\n }\r\n const showhideResult = await stateStorage.getSetting(this.props.settingsIdentifier, \"ColumnShowHideHiddenColumns\");\r\n // istanbul ignore next\r\n if (showhideResult.status === UiStateStorageStatus.Success) {\r\n const hiddenColumns = showhideResult.setting as string[];\r\n this.setState({ hiddenColumns });\r\n }\r\n }\r\n\r\n let keyboardEditorCellKey: string | undefined;\r\n const tableColumns = dataGridColumns.map((dataGridColumn: ReactDataGridColumn, index: number) => {\r\n const tableColumn = new TableColumn(this, columnDescriptions[index], dataGridColumn);\r\n tableColumn.dataProvider = this.props.dataProvider;\r\n if (!keyboardEditorCellKey && tableColumn.columnDescription.editable)\r\n keyboardEditorCellKey = tableColumn.key;\r\n if (tableColumn.filterable)\r\n dataGridColumn.filterableColumn = tableColumn;\r\n return tableColumn;\r\n });\r\n\r\n for (const tableColumn of tableColumns) {\r\n if (tableColumn.filterable)\r\n tableColumn.distinctValueCollection = await tableColumn.getDistinctValues(this.props.maximumDistinctValues);\r\n }\r\n\r\n this.setState({ columns: tableColumns, keyboardEditorCellKey });\r\n\r\n if (this._pendingUpdate !== TableUpdate.None) {\r\n return this.handlePendingUpdate();\r\n }\r\n return UpdateStatus.Continue;\r\n }\r\n\r\n private _onColumnsChanged = async () => {\r\n await this.updateColumns();\r\n\r\n this._cellItemSelectionHandlers = undefined;\r\n };\r\n\r\n private async updateRows(): Promise<UpdateStatus> {\r\n if (this._currentUpdate !== TableUpdate.None) {\r\n if (this._pendingUpdate === TableUpdate.None)\r\n this._pendingUpdate = TableUpdate.Rows;\r\n return UpdateStatus.Abort;\r\n }\r\n\r\n this._currentUpdate = TableUpdate.Rows;\r\n const rowsCount = await this.props.dataProvider.getRowsCount();\r\n this._currentUpdate = TableUpdate.None;\r\n\r\n // istanbul ignore next\r\n if (!this._isMounted)\r\n return UpdateStatus.Abort;\r\n\r\n if (this._pendingUpdate !== TableUpdate.None) {\r\n return this.handlePendingUpdate();\r\n }\r\n\r\n if (rowsCount !== this.state.rowsCount) {\r\n this._rowItemSelectionHandlers = undefined;\r\n this._cellItemSelectionHandlers = undefined;\r\n\r\n // when updating the rows with new data from dataProvider clear out existing selections\r\n this._selectedRowIndices.clear();\r\n this._selectedCellKeys.clear();\r\n }\r\n\r\n this._rowGetterAsync.cache.clear!();\r\n this.setState({ rowsCount, rows: [] });\r\n this._rowGetterAsync(0, true); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n return UpdateStatus.Continue;\r\n }\r\n\r\n // Workaround for react-data-grid bug that shows blank grid when updating after grid has been scrolled.\r\n // Force a re-render by scrolling up 1 then down 1\r\n private _pokeScrollAfterUpdate = () => {\r\n // istanbul ignore else\r\n if (this._gridRef.current && this._topRowIndex !== 0) {\r\n const grid = this._gridRef.current as any;\r\n // istanbul ignore else\r\n if (grid.getRowOffsetHeight && grid.getDataGridDOMNode) {\r\n const gridCanvas = grid.getDataGridDOMNode().querySelector(\".react-grid-Canvas\");\r\n\r\n // Scroll up 1\r\n let top = TABLE_ROW_HEIGHT * this._topRowIndex - 1;\r\n gridCanvas.scrollTop = top;\r\n\r\n // Scroll back down\r\n top = TABLE_ROW_HEIGHT * this._topRowIndex;\r\n gridCanvas.scrollTop = top;\r\n }\r\n }\r\n };\r\n\r\n private _queuePokeScroll = () => {\r\n this._unsetPokeScrollTimeout();\r\n this._pokeScrollTimer.setOnExecute(() => { this._pokeScrollAfterUpdate(); });\r\n this._pokeScrollTimer.start();\r\n };\r\n\r\n private _unsetPokeScrollTimeout = (): void => {\r\n this._pokeScrollTimer.stop();\r\n };\r\n\r\n private _onRowsChanged = async () => {\r\n await this.updateRows();\r\n this._queuePokeScroll();\r\n };\r\n\r\n /** @internal */\r\n public async update(): Promise<UpdateStatus> {\r\n let status = await this.updateColumns();\r\n\r\n if (status !== UpdateStatus.Abort)\r\n status = await this.updateRows();\r\n\r\n if (this.props.scrollToRow !== undefined)\r\n this.scrollToRow(this.props.scrollToRow);\r\n\r\n /* istanbul ignore next */\r\n if (this.props.onRender)\r\n this.props.onRender();\r\n\r\n return status;\r\n }\r\n\r\n /** @internal */\r\n public updateSelectedRows() {\r\n const selectedRowIndices = new Set<number>();\r\n if (this.props.isRowSelected) {\r\n for (let rowIndex = 0; rowIndex < this.state.rows.length; rowIndex++) {\r\n if (this.state.rows[rowIndex] && this.props.isRowSelected(this.state.rows[rowIndex].item))\r\n selectedRowIndices.add(rowIndex);\r\n }\r\n }\r\n this._selectedRowIndices = selectedRowIndices;\r\n this.forceUpdate();\r\n }\r\n\r\n /** @internal */\r\n public updateSelectedCells() {\r\n const selectedCellKeys = new Map<string, Set<number>>();\r\n if (this.props.isCellSelected) {\r\n for (const column of this.state.columns) {\r\n const set = new Set<number>();\r\n for (let rowIndex = 0; rowIndex < this.state.rows.length; rowIndex++) {\r\n // istanbul ignore next\r\n if (!this.state.rows[rowIndex])\r\n continue;\r\n const cellItem = this._getCellItem(this.state.rows[rowIndex].item, column.key);\r\n if (this.props.isCellSelected(rowIndex, cellItem))\r\n set.add(rowIndex);\r\n }\r\n // istanbul ignore else\r\n if (set.size !== 0)\r\n selectedCellKeys.set(column.key, set);\r\n }\r\n }\r\n this._selectedCellKeys = selectedCellKeys;\r\n this.forceUpdate();\r\n }\r\n\r\n private _columnDescriptionToReactDataGridColumn = (columnDescription: ColumnDescription): ReactDataGridColumn => {\r\n const isEditable = !!columnDescription.editable;\r\n\r\n const column: ReactDataGridColumn = {\r\n key: columnDescription.key,\r\n name: columnDescription.label,\r\n icon: columnDescription.icon,\r\n width: columnDescription.width,\r\n resizable: !!columnDescription.resizable,\r\n sortable: !!columnDescription.sortable,\r\n draggable: !!this.props.reorderableColumns,\r\n filterable: !!columnDescription.filterable,\r\n };\r\n\r\n column.events = {};\r\n\r\n if (this.props.onCellContextMenu) {\r\n column.events.onContextMenu = this.cellContextMenu.bind(this, column);\r\n }\r\n\r\n if (isEditable) {\r\n column.events.onClick = this.cellEditOnClick.bind(this, column);\r\n }\r\n\r\n if (columnDescription.filterRenderer !== undefined) {\r\n switch (columnDescription.filterRenderer) {\r\n case FilterRenderer.Numeric:\r\n column.filterRenderer = NumericFilter;\r\n break;\r\n case FilterRenderer.MultiSelect:\r\n column.filterRenderer = MultiSelectFilter;\r\n break;\r\n case FilterRenderer.MultiValue:\r\n column.filterRenderer = MultiValueFilter;\r\n break;\r\n case FilterRenderer.SingleSelect:\r\n column.filterRenderer = SingleSelectFilter;\r\n break;\r\n case FilterRenderer.Text:\r\n // column.filterRenderer is not set for the Text input filter\r\n break;\r\n }\r\n }\r\n\r\n return column;\r\n };\r\n\r\n private _getCellItem = (row: RowItem, columnKey: string): CellItem => {\r\n return row.cells.find((cell: CellItem) => cell.key === columnKey) || /* istanbul ignore next */ { key: columnKey };\r\n };\r\n\r\n private isCellSelected(key: CellKey) {\r\n const set = this._selectedCellKeys.get(key.columnKey);\r\n if (set)\r\n return set.has(key.rowIndex);\r\n return false;\r\n }\r\n\r\n private selectCells(cellKeys: CellKey[]) {\r\n for (const key of cellKeys) {\r\n let set = this._selectedCellKeys.get(key.columnKey);\r\n if (!set) {\r\n set = new Set();\r\n this._selectedCellKeys.set(key.columnKey, set);\r\n }\r\n set.add(key.rowIndex);\r\n }\r\n }\r\n\r\n private deselectCells(cellKeys: CellKey[]) {\r\n for (const key of cellKeys) {\r\n // istanbul ignore else\r\n const set = this._selectedCellKeys.get(key.columnKey);\r\n // istanbul ignore else\r\n if (set)\r\n set.delete(key.rowIndex);\r\n }\r\n }\r\n\r\n private createRowItemSelectionHandler(rowIndex: number): SingleSelectionHandler<number> {\r\n return {\r\n preselect: () => {\r\n this._pressedItemSelected = this._selectedRowIndices.has(rowIndex);\r\n },\r\n select: () => {\r\n // istanbul ignore else\r\n if (!this._selectedRowIndices.has(rowIndex)) {\r\n this._selectedRowIndices.add(rowIndex);\r\n if (!this._pressedItemSelected)\r\n this.forceUpdate();\r\n }\r\n },\r\n deselect: () => {\r\n // istanbul ignore else\r\n if (this._selectedRowIndices.has(rowIndex)) {\r\n this._selectedRowIndices.delete(rowIndex);\r\n this.forceUpdate();\r\n }\r\n },\r\n isSelected: () => this._selectedRowIndices.has(rowIndex),\r\n item: () => rowIndex,\r\n };\r\n }\r\n\r\n private _rowComponentSelectionHandler: MultiSelectionHandler<number> = {\r\n deselectAll: () => {\r\n this._selectedRowIndices = new Set<number>();\r\n if (!this._pressedItemSelected) {\r\n this._deactivateCellEditor();\r\n this.forceUpdate();\r\n }\r\n },\r\n selectBetween: (rowIndex1: number, rowIndex2: number) => {\r\n const selections = [];\r\n const lowerNumber = rowIndex1 < rowIndex2 ? rowIndex1 : rowIndex2;\r\n const higherNumber = rowIndex1 > rowIndex2 ? rowIndex1 : rowIndex2;\r\n for (let i = lowerNumber; i <= higherNumber; i++) {\r\n // istanbul ignore else\r\n if (!this._selectedRowIndices.has(i)) {\r\n selections.push(i);\r\n this._selectedRowIndices.add(i);\r\n }\r\n }\r\n\r\n this.forceUpdate();\r\n return selections;\r\n },\r\n updateSelection: (selections: number[], deselections: number[]): void => {\r\n for (const rowIndex of selections) {\r\n // istanbul ignore else\r\n if (!this._selectedRowIndices.has(rowIndex))\r\n this._selectedRowIndices.add(rowIndex);\r\n }\r\n\r\n for (const rowIndex of deselections) {\r\n // istanbul ignore else\r\n if (this._selectedRowIndices.has(rowIndex))\r\n this._selectedRowIndices.delete(rowIndex);\r\n }\r\n this.forceUpdate();\r\n },\r\n areEqual: (item1: number, item2: number) => item1 === item2,\r\n };\r\n\r\n private createCellItemSelectionHandler(cellKey: CellKey): SingleSelectionHandler<CellKey> {\r\n return {\r\n preselect: () => {\r\n this._pressedItemSelected = this.isCellSelected(cellKey);\r\n },\r\n select: () => {\r\n this.selectCells([cellKey]);\r\n this.forceUpdate();\r\n },\r\n deselect: () => {\r\n this.deselectCells([cellKey]);\r\n this.forceUpdate();\r\n },\r\n isSelected: () => this.isCellSelected(cellKey),\r\n item: () => cellKey,\r\n };\r\n }\r\n\r\n private _cellComponentSelectionHandler: MultiSelectionHandler<CellKey> = {\r\n deselectAll: () => {\r\n this._selectedCellKeys = new Map<string, Set<number>>();\r\n this.forceUpdate();\r\n },\r\n selectBetween: (item1: CellKey, item2: CellKey) => {\r\n const selections: CellKey[] = [];\r\n const lowerIndex = item1.rowIndex < item2.rowIndex ? item1.rowIndex : item2.rowIndex;\r\n const higherIndex = item1.rowIndex > item2.rowIndex ? item1.rowIndex : item2.rowIndex;\r\n let secondItem: CellKey;\r\n let firstItemFound = false;\r\n let secondItemFound = false;\r\n\r\n for (let rowIndex = lowerIndex; rowIndex <= higherIndex; rowIndex++) {\r\n for (const column of this.state.columns) {\r\n if (!firstItemFound) {\r\n if (rowIndex === item1.rowIndex && column.key === item1.columnKey) {\r\n firstItemFound = true;\r\n secondItem = item2;\r\n } else {\r\n // istanbul ignore else\r\n if (rowIndex === item2.rowIndex && column.key === item2.columnKey) {\r\n firstItemFound = true;\r\n secondItem = item1;\r\n } else\r\n continue;\r\n }\r\n }\r\n\r\n const cellKey = { rowIndex, columnKey: column.key };\r\n if (!this.isCellSelected(cellKey))\r\n selections.push(cellKey);\r\n\r\n if (rowIndex === secondItem!.rowIndex && column.key === secondItem!.columnKey) {\r\n secondItemFound = true;\r\n break;\r\n }\r\n }\r\n if (secondItemFound)\r\n break;\r\n }\r\n\r\n this.selectCells(selections);\r\n this.forceUpdate();\r\n return selections;\r\n },\r\n updateSelection: (selections: CellKey[], deselections: CellKey[]): void => {\r\n this.selectCells(selections);\r\n this.deselectCells(deselections);\r\n this.forceUpdate();\r\n },\r\n areEqual: (item1: CellKey, item2: CellKey) => item1.rowIndex === item2.rowIndex && item1.columnKey === item2.columnKey,\r\n };\r\n\r\n private _rowGetter = (i: number): RowProps => {\r\n if (this.state.rows[i])\r\n return this.state.rows[i];\r\n\r\n // get another page of rows\r\n // note: always start loading at the beginning of a page to avoid\r\n // requesting duplicate data (e.g. a page that starts at 0, at 1, at 2, ...)\r\n this._rowGetterAsync(i - (i % this._pageAmount), false); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n\r\n // Return placeholder object\r\n return { item: { key: \"\", cells: [] }, index: i, cells: {} };\r\n };\r\n\r\n private _rowGetterAsync = memoize(async (index: number, clearRows: boolean): Promise<void> => {\r\n // istanbul ignore next\r\n if (index < 0)\r\n return;\r\n\r\n // load up to `this._pageAmount` more rows\r\n const maxIndex = Math.min(this.state.rowsCount, index + this._pageAmount);\r\n const loadResult = await this.loadRows(index, maxIndex);\r\n\r\n // istanbul ignore next\r\n if (!this._isMounted)\r\n return;\r\n\r\n // istanbul ignore next\r\n if (this._pendingUpdate !== TableUpdate.None)\r\n return;\r\n\r\n const selectedRowIndices = this._selectedRowIndices;\r\n for (const rowIndex of loadResult.selectedRowIndices) {\r\n // istanbul ignore else\r\n if (!selectedRowIndices.has(rowIndex))\r\n selectedRowIndices.add(rowIndex);\r\n }\r\n this._selectedRowIndices = selectedRowIndices;\r\n\r\n this.selectCells(loadResult.selectedCellKeys);\r\n this.setState((prev) => {\r\n const rows = clearRows ? [] : [...prev.rows];\r\n loadResult.rows.forEach((r, i) => { rows[index + i] = r; });\r\n return { rows };\r\n }, async () => {\r\n if (this.props.onRowsLoaded)\r\n this.props.onRowsLoaded(index, index + loadResult.rows.length - 1);\r\n\r\n const showFilter = this._isShowFilterRow();\r\n if (showFilter !== this._filterRowShown)\r\n this.toggleFilterRow(showFilter);\r\n });\r\n });\r\n\r\n private async renderCellContent(cellItem: CellItem, column: ReactDataGridColumn, displayValue: string): Promise<React.ComponentType<{ isSelected: boolean }>> {\r\n if (column.icon)\r\n return () => <TableIconCellContent iconName={displayValue} />;\r\n\r\n return (props: { isSelected: boolean }) => (\r\n <TableCellContent\r\n height={TABLE_ROW_HEIGHT}\r\n isSelected={props.isSelected}\r\n cellItem={cellItem}\r\n onDialogOpen={this._onDialogOpen}\r\n propertyValueRendererManager={this.props.propertyValueRendererManager\r\n ? this.props.propertyValueRendererManager\r\n : PropertyValueRendererManager.defaultManager}\r\n style={{ zIndex: ((cellItem.mergedCellsCount ?? 1) > 1) ? 1 : undefined }}\r\n />\r\n );\r\n }\r\n\r\n private async getCellDisplayValue(cellItem: CellItem): Promise<string> {\r\n // istanbul ignore next\r\n if (!cellItem.record || cellItem.record.value.valueFormat !== PropertyValueFormat.Primitive)\r\n return \"\";\r\n\r\n const value = cellItem.record.value.value;\r\n\r\n if (value === undefined)\r\n return \"\";\r\n\r\n const displayValue = await TypeConverterManager\r\n .getConverter(cellItem.record.property.typename, cellItem.record.property.converter?.name)\r\n .convertPropertyToString(cellItem.record.property, value);\r\n\r\n return displayValue ? displayValue : /* istanbul ignore next */ \"\";\r\n }\r\n\r\n private async createPropsForRowItem(item: RowItem, index: number): Promise<RowProps> {\r\n const cellProps: { [key: string]: CellProps } = {};\r\n for (const column of this.state.columns) {\r\n const cellItem = this._getCellItem(item, column.key);\r\n const displayValue = await this.getCellDisplayValue(cellItem);\r\n cellProps[column.key] = {\r\n item: cellItem,\r\n displayValue,\r\n render: await this.renderCellContent(cellItem, column.reactDataGridColumn, displayValue),\r\n };\r\n }\r\n const rowStyle = TableRowStyleProvider.createStyle(item.colorOverrides ? item.colorOverrides : {});\r\n return {\r\n item,\r\n index,\r\n cells: cellProps,\r\n render: undefined,\r\n style: rowStyle,\r\n };\r\n }\r\n\r\n private async loadRows(beginIndex: number, endIndex: number): Promise<RowsLoadResult> {\r\n const result: RowsLoadResult = {\r\n rows: [],\r\n selectedRowIndices: [],\r\n selectedCellKeys: [],\r\n };\r\n this._rowLoadGuid = Guid.createValue();\r\n const currentSelectedRowGuid: GuidString = this._rowLoadGuid;\r\n\r\n const promises = new Array<Promise<RowProps>>();\r\n for (let i = beginIndex; i < endIndex; ++i) {\r\n promises.push(\r\n this.props.dataProvider.getRow(i).then(async (rowData) =>\r\n this.createPropsForRowItem(rowData, i).then((rowProps) => (rowProps)),\r\n ));\r\n }\r\n\r\n try {\r\n result.rows = await Promise.all(promises);\r\n } catch { }\r\n\r\n // Check if another loadRows got called while this one was still going\r\n if (currentSelectedRowGuid === this._rowLoadGuid) {\r\n for (const rowProps of result.rows) {\r\n if (this.props.isRowSelected && this.props.isRowSelected(rowProps.item))\r\n result.selectedRowIndices.push(rowProps.index);\r\n\r\n if (this.props.isCellSelected) {\r\n for (const column of this.state.columns) {\r\n const cellItem = this._getCellItem(rowProps.item, column.key);\r\n if (this.props.isCellSelected(rowProps.index, cellItem))\r\n result.selectedCellKeys.push({ rowIndex: rowProps.index, columnKey: column.key });\r\n }\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private _handleGridSort = (columnKey: string, sortDirection: \"ASC\" | \"DESC\" | \"NONE\") => {\r\n let directionEnum: SortDirection;\r\n\r\n switch (sortDirection) {\r\n case \"ASC\":\r\n directionEnum = SortDirection.Ascending;\r\n break;\r\n case \"DESC\":\r\n directionEnum = SortDirection.Descending;\r\n break;\r\n case \"NONE\":\r\n default:\r\n directionEnum = SortDirection.NoSort;\r\n break;\r\n }\r\n\r\n // Sort the column\r\n this.gridSortAsync(columnKey, directionEnum); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n\r\n this._queuePokeScroll();\r\n };\r\n\r\n private getColumnIndexFromKey(columnKey: string): number {\r\n return this.state.columns.findIndex((column: TableColumn) => column.key === columnKey);\r\n }\r\n\r\n private async gridSortAsync(columnKey: string, directionEnum: SortDirection) {\r\n const columnIndex = this.getColumnIndexFromKey(columnKey);\r\n // istanbul ignore next\r\n if (columnIndex < 0)\r\n return;\r\n\r\n await this.props.dataProvider.sort(columnIndex, directionEnum);\r\n\r\n // istanbul ignore next\r\n if (!this._isMounted)\r\n return;\r\n\r\n this.updateRows(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }\r\n\r\n private createRowCells(rowProps: RowProps, isSelected: boolean): { [columnKey: string]: React.ReactNode } {\r\n const cells: { [columnKey: string]: React.ReactNode } = {};\r\n let gridColumns: HTMLElement[] = [];\r\n let foundHiddenColumns = 0;\r\n\r\n // istanbul ignore else\r\n if (this._gridRef.current && (this._gridRef.current as any).getDataGridDOMNode)\r\n gridColumns = (this._gridRef.current as any).getDataGridDOMNode().querySelectorAll(\".react-grid-HeaderCell\");\r\n\r\n for (let index = 0; index < this.state.columns.length; index++) {\r\n const column = this.state.columns[index];\r\n\r\n const cellProps = rowProps.cells[column.key];\r\n if (!cellProps) {\r\n continue;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n const CellContent = cellProps.render;\r\n const isEditorCell =\r\n this.state.cellEditorState.active\r\n && this.state.cellEditorState.rowIndex === rowProps.index\r\n && this.state.cellEditorState.colIndex === index\r\n && cellProps.item.record;\r\n\r\n let onClick: ((e: React.MouseEvent) => void) | undefined;\r\n let onMouseMove: ((e: React.MouseEvent) => void) | undefined;\r\n let onMouseDown: ((e: React.MouseEvent) => void) | undefined;\r\n let className: string | undefined;\r\n\r\n const cellKey = { rowIndex: rowProps.index, columnKey: column.key };\r\n if (this._tableSelectionTarget === TableSelectionTarget.Cell) {\r\n const selectionHandler = this.createCellItemSelectionHandler(cellKey);\r\n const selectionFunction = this._cellSelectionHandler.createSelectionFunction(this._cellComponentSelectionHandler, selectionHandler);\r\n onClick = (e: React.MouseEvent) => selectionFunction(e.shiftKey, e.ctrlKey);\r\n onMouseMove = (e: React.MouseEvent) => {\r\n // istanbul ignore else\r\n if (e.buttons === 1)\r\n this._cellSelectionHandler.updateDragAction(cellKey);\r\n };\r\n onMouseDown = () => {\r\n this._cellSelectionHandler.createDragAction(this._cellComponentSelectionHandler, this.cellItemSelectionHandlers, cellKey);\r\n };\r\n className = classnames({ \"is-selected\": this.isCellSelected(cellKey) });\r\n } else {\r\n if (this._selectedRowIndices.has(rowProps.index))\r\n className = classnames({ \"is-keyboard-editable\": this.state.keyboardEditorCellKey === column.key });\r\n }\r\n\r\n className = classnames(className, this.getCellBorderStyle(cellKey));\r\n const mergedAdjacentCellsCount = (cellProps.item.mergedCellsCount ?? 1) - 1;\r\n let cellWidth = 0;\r\n\r\n for (let i = 0; i <= mergedAdjacentCellsCount; i++) {\r\n const col = this.state.columns[index + i];\r\n if (this.state.hiddenColumns.indexOf(col.key) === -1) {\r\n const gridColumn = gridColumns[index + i - foundHiddenColumns];\r\n const gridColumnWidth = gridColumn ? gridColumn.getBoundingClientRect().width : 0;\r\n cellWidth += gridColumnWidth;\r\n } else {\r\n foundHiddenColumns++;\r\n }\r\n\r\n if (i > 0) {\r\n cells[col.key] = (\r\n <TableCell\r\n className={className.replace(\"border-bottom\", \"\")}\r\n title={\"empty-cell\"}\r\n onClick={onClick}\r\n onMouseMove={onMouseMove}\r\n onMouseDown={onMouseDown}\r\n >\r\n </TableCell>\r\n );\r\n }\r\n const mergedColumn = this.state.columns[index + i];\r\n const emptyCellKey = { rowIndex: rowProps.index, columnKey: mergedColumn.key };\r\n className = classnamesDedupe(className, this.getCellBorderStyle(emptyCellKey));\r\n }\r\n index += mergedAdjacentCellsCount;\r\n\r\n cells[column.key] = (\r\n <TableCell\r\n className={className}\r\n title={cellProps.displayValue}\r\n onClick={onClick}\r\n onMouseMove={onMouseMove}\r\n onMouseDown={onMouseDown}\r\n cellEditingProps={isEditorCell ? {\r\n onCancel: this._deactivateCellEditor,\r\n onCommit: this._onCellCommit,\r\n propertyRecord: cellProps.item.record!,\r\n setFocus: true,\r\n } : undefined}\r\n style={{ width: (mergedAdjacentCellsCount > 0) ? cellWidth : undefined }}\r\n >\r\n <CellContent isSelected={isSelected} />\r\n </TableCell>\r\n );\r\n }\r\n return cells;\r\n }\r\n\r\n private getCellBorderStyle(key: CellKey): string {\r\n const isCellSelected = (cellKey: CellKey): boolean => {\r\n if (this._tableSelectionTarget === TableSelectionTarget.Row) {\r\n return this._selectedRowIndices.has(cellKey.rowIndex);\r\n }\r\n\r\n return this.isCellSelected(cellKey);\r\n };\r\n\r\n const cellIsSelected = isCellSelected(key);\r\n const columnIndex = this.state.columns.findIndex((column) => key.columnKey === column.key);\r\n\r\n const isTopBorderVisible = (): boolean => {\r\n if (key.rowIndex === 0) {\r\n return cellIsSelected;\r\n }\r\n\r\n if (cellIsSelected) {\r\n return !isCellSelected({ rowIndex: key.rowIndex - 1, columnKey: key.columnKey });\r\n }\r\n\r\n // Bottom border is rendered by drawing the top border on the node below\r\n // Check if the node above needs its bottom border drawn\r\n return isCellSelected({ rowIndex: key.rowIndex - 1, columnKey: key.columnKey });\r\n };\r\n\r\n const isRightBorderVisible = (): boolean => {\r\n if (!cellIsSelected) {\r\n return false;\r\n }\r\n\r\n if (columnIndex === this.state.columns.length - 1) {\r\n return true;\r\n }\r\n\r\n return !isCellSelected({ rowIndex: key.rowIndex, columnKey: this.state.columns[columnIndex + 1].key });\r\n };\r\n\r\n const isBottomBorderVisible = (): boolean => {\r\n return cellIsSelected && key.rowIndex === this.state.rowsCount - 1;\r\n };\r\n\r\n const isLeftBorderVisible = (): boolean => {\r\n if (!cellIsSelected) {\r\n return false;\r\n }\r\n\r\n if (columnIndex === 0) {\r\n return true;\r\n }\r\n\r\n return !isCellSelected({ rowIndex: key.rowIndex, columnKey: this.state.columns[columnIndex - 1].key });\r\n };\r\n\r\n return classnames({\r\n \"border-top\": isTopBorderVisible(),\r\n \"border-right\": isRightBorderVisible(),\r\n \"border-bottom\": isBottomBorderVisible(),\r\n \"border-left\": isLeftBorderVisible(),\r\n });\r\n }\r\n\r\n private _createRowRenderer = () => {\r\n return (props: { row: RowProps, [k: string]: React.ReactNode }) => {\r\n // istanbul ignore next\r\n const renderRow = this.props.renderRow ? this.props.renderRow : this.renderRow;\r\n const { row: rowProps, ...reactDataGridRowProps } = props;\r\n if (this._tableSelectionTarget === TableSelectionTarget.Row) {\r\n const selectionFunction = this._rowSelectionHandler.createSelectionFunction(this._rowComponentSelectionHandler, this.createRowItemSelectionHandler(props.row.index));\r\n const onClick = (e: React.MouseEvent) => selectionFunction(e.shiftKey, e.ctrlKey);\r\n const onMouseDown = () => {\r\n this._rowSelectionHandler.createDragAction(this._rowComponentSelectionHandler, [this.rowItemSelectionHandlers], props.row.index);\r\n };\r\n const onMouseMove = (e: React.MouseEvent) => {\r\n // istanbul ignore else\r\n if (e.buttons === 1)\r\n this._rowSelectionHandler.updateDragAction(props.row.index);\r\n };\r\n const isSelected = this._selectedRowIndices.has(props.row.index);\r\n const cells = this.createRowCells(rowProps, isSelected);\r\n const row = renderRow(rowProps.item, { ...reactDataGridRowProps, cells, isSelected });\r\n return <div\r\n className={classnames(\"components-table-row\")}\r\n onClickCapture={onClick}\r\n onMouseMove={onMouseMove}\r\n onMouseDown={onMouseDown}\r\n style={props.row.style}\r\n role=\"presentation\">\r\n {row}\r\n </div>;\r\n } else {\r\n const cells = this.createRowCells(rowProps, false);\r\n return renderRow(rowProps.item, { ...reactDataGridRowProps, cells });\r\n }\r\n };\r\n };\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n private renderRow = (item: RowItem, props: TableRowProps): React.ReactNode => {\r\n return <TableRow key={item.key} {...props} />;\r\n };\r\n\r\n private _onMouseUp = () => {\r\n if (this._tableSelectionTarget === TableSelectionTarget.Row)\r\n this._rowSelectionHandler.completeDragAction();\r\n else\r\n this._cellSelectionHandler.completeDragAction();\r\n };\r\n\r\n private _onMouseDown = () => {\r\n document.addEventListener(\"mouseup\", this._onMouseUp, { capture: true, once: true });\r\n };\r\n\r\n private _onHeaderDrop = (source: string, target: string) => {\r\n const cols = [...this.state.columns];\r\n const columnSourceIndex = this.state.columns.findIndex((i) => i.key === source);\r\n const columnTargetIndex = this.state.columns.findIndex((i) => i.key === target);\r\n\r\n cols.splice(columnTargetIndex, 0, cols.splice(columnSourceIndex, 1)[0]);\r\n // istanbul ignore else\r\n if (this.props.settingsIdentifier) {\r\n const stateStorage: UiStateStorage = this.props.settingsStorage || /* istanbul ignore next */ new LocalStateStorage();\r\n const keys = cols.map((col) => col.key);\r\n stateStorage.saveSetting(this.props.settingsIdentifier, \"ColumnReorder\", keys); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }\r\n this.setState({ columns: [] }, () => { // fix react-data-grid update issues\r\n this.setState({ columns: cols });\r\n });\r\n };\r\n\r\n private cellEditOnClick(column: ReactDataGridColumn, _ev: React.SyntheticEvent<any>, args: ReactDataGridColumnEventArgs): void {\r\n // Prevent editing when property record is not primitive\r\n // istanbul ignore else\r\n if (this.state.rows[args.rowIdx]) {\r\n const record = this._getCellItem(this.state.rows[0].item, column.key).record;\r\n // istanbul ignore next\r\n if (record && record.value.valueFormat !== PropertyValueFormat.Primitive)\r\n return;\r\n }\r\n\r\n if (this.state.keyboardEditorCellKey !== column.key)\r\n this.setState({ keyboardEditorCellKey: column.key });\r\n\r\n let activate = false;\r\n\r\n if (this._pressedItemSelected)\r\n activate = true;\r\n\r\n if (activate)\r\n this.activateCellEditor(args.rowIdx, args.idx, column.key);\r\n else\r\n this._deactivateCellEditor();\r\n }\r\n\r\n private cellContextMenu(column: ReactDataGridColumn, e: React.SyntheticEvent<any>, args: ReactDataGridColumnEventArgs): void {\r\n // istanbul ignore else\r\n if (this.props.onCellContextMenu) {\r\n const contextMenuArgs: TableCellContextMenuArgs = {\r\n rowIndex: args.rowIdx,\r\n colIndex: args.idx,\r\n cellKey: column.key,\r\n event: e as unknown as React.MouseEvent,\r\n };\r\n\r\n // istanbul ignore else\r\n if (this.state.rows[args.rowIdx])\r\n contextMenuArgs.cellItem = this._getCellItem(this.state.rows[args.rowIdx].item, column.key);\r\n\r\n e.preventDefault();\r\n this.props.onCellContextMenu(contextMenuArgs);\r\n }\r\n }\r\n\r\n private activateCellEditor(rowIndex: number, colIndex: number, cellKey: string): void {\r\n const cellEditorState = { active: true, rowIndex, colIndex, cellKey };\r\n // istanbul ignore else\r\n if (cellEditorState !== this.state.cellEditorState) {\r\n this.setState(\r\n { cellEditorState },\r\n () => {\r\n // istanbul ignore else\r\n if (this.props.onPropertyEditing)\r\n this.props.onPropertyEditing(cellEditorState);\r\n },\r\n );\r\n }\r\n }\r\n\r\n private _deactivateCellEditor = (): void => {\r\n if (this.state.cellEditorState.active)\r\n this.setState({ cellEditorState: { active: false } }, () => setImmediate(() => this.setFocusToSelected()));\r\n };\r\n\r\n /** @internal */\r\n public override shouldComponentUpdate(_props: TableProps): boolean {\r\n return true;\r\n }\r\n\r\n private _onCellCommit = async (args: PropertyUpdatedArgs) => {\r\n // istanbul ignore else\r\n if (this.props.onPropertyUpdated) {\r\n const cellUpdatedArgs: TableCellUpdatedArgs = {\r\n rowIndex: this.state.cellEditorState.rowIndex!,\r\n colIndex: this.state.cellEditorState.colIndex!,\r\n cellKey: this.state.cellEditorState.cellKey!,\r\n };\r\n const allowed = await this.props.onPropertyUpdated(args, cellUpdatedArgs);\r\n // istanbul ignore else\r\n if (allowed && this.state.cellEditorState.rowIndex !== undefined && this.state.cellEditorState.rowIndex >= 0) {\r\n this._deactivateCellEditor();\r\n await this.updateRows();\r\n } else {\r\n this._deactivateCellEditor();\r\n }\r\n }\r\n };\r\n\r\n private _getVisibleColumns = (): ReactDataGridColumn[] => {\r\n return this.state.columns\r\n .filter((tableColumn: TableColumn) => this.state.hiddenColumns.indexOf(tableColumn.key) === -1)\r\n .map((tableColumn: TableColumn) => tableColumn.reactDataGridColumn);\r\n };\r\n\r\n private _handleShowHideContextMenu = (e: React.MouseEvent) => {\r\n const header = e.currentTarget.querySelector(\".react-grid-Header\");\r\n // istanbul ignore else\r\n if (header) {\r\n const headerRect = header.getBoundingClientRect();\r\n const offsetY = headerRect.top;\r\n const height = headerRect.height;\r\n const x = e.clientX, y = e.clientY;\r\n // istanbul ignore else\r\n if (y < offsetY + height) {\r\n e.preventDefault();\r\n this.setState({\r\n menuX: x, menuY: y,\r\n menuVisible: true,\r\n });\r\n }\r\n }\r\n };\r\n\r\n private _hideContextMenu = () => {\r\n // istanbul ignore else\r\n if (this.props.showHideColumns)\r\n this.setState({ menuVisible: false });\r\n };\r\n\r\n // istanbul ignore next\r\n private _handleShowHideChange = (cols: string[]) => {\r\n this.setState({ hiddenColumns: cols });\r\n if (this.props.settingsIdentifier) {\r\n const stateStorage: UiStateStorage = this.props.settingsStorage || new LocalStateStorage();\r\n stateStorage.saveSetting(this.props.settingsIdentifier, \"ColumnShowHideHiddenColumns\", cols); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }\r\n return true;\r\n };\r\n\r\n // istanbul ignore next\r\n private _onDialogOpen = (dialogState: PropertyDialogState) => this.setState({ dialog: dialogState });\r\n\r\n // istanbul ignore next\r\n private _onDialogClose = () => this.setState({ dialog: undefined });\r\n\r\n private _isShowFilterRow(): boolean {\r\n return this.state.columns.some((tableColumn: TableColumn) => tableColumn.filterable);\r\n }\r\n\r\n /** Turn on/off filter row */\r\n private toggleFilterRow(showFilter: boolean): void {\r\n // istanbul ignore else\r\n if (this._gridRef.current) {\r\n const grid = this._gridRef.current as any;\r\n // istanbul ignore else\r\n if (grid.onToggleFilter && showFilter !== this._filterRowShown) {\r\n grid.onToggleFilter();\r\n\r\n this._filterRowShown = showFilter;\r\n }\r\n }\r\n }\r\n\r\n /** Gets the filter descriptors for the table.\r\n * @internal\r\n */\r\n public get filterDescriptors(): CompositeFilterDescriptorCollection {\r\n if (undefined === this._filterDescriptors) {\r\n this._filterDescriptors = new TableFilterDescriptorCollection();\r\n this._filterDescriptors.logicalOperator = FilterCompositionLogicalOperator.And;\r\n }\r\n\r\n return this._filterDescriptors;\r\n }\r\n\r\n /** Gets ECExpression to get property display value.\r\n * @internal\r\n */\r\n // istanbul ignore next\r\n public getPropertyDisplayValueExpression(property: string): string {\r\n if (this.props.dataProvider.getPropertyDisplayValueExpression !== undefined)\r\n return this.props.dataProvider.getPropertyDisplayValueExpression(property);\r\n return property;\r\n }\r\n\r\n private _handleFilterChange = (filter: ReactDataGridFilter): void => {\r\n const columnKey = filter.column.key;\r\n const tableColumn = this.state.columns.find((column: TableColumn) => column.key === columnKey);\r\n\r\n // istanbul ignore else\r\n if (tableColumn) {\r\n setTimeout(async () => {\r\n await DataGridFilterParser.handleFilterChange(filter, tableColumn.columnFilterDescriptor, tableColumn.columnDescription, this._applyFilter);\r\n });\r\n }\r\n };\r\n\r\n // istanbul ignore next\r\n private _handleOnClearFilters = () => {\r\n this.filterDescriptors.clear();\r\n\r\n this._applyFilter(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n };\r\n\r\n private _applyFilter = async (): Promise<void> => {\r\n // istanbul ignore else\r\n if (this.props.dataProvider.applyFilterDescriptors) {\r\n await this.props.dataProvider.applyFilterDescriptors(this.filterDescriptors);\r\n await this.updateRows();\r\n\r\n // istanbul ignore else\r\n if (this.props.onApplyFilter)\r\n this.props.onApplyFilter();\r\n }\r\n };\r\n\r\n // istanbul ignore next\r\n private _getValidFilterValues = (columnKey: string): any[] => {\r\n const tableColumn = this.state.columns.find((column: TableColumn) => column.reactDataGridColumn.key === columnKey);\r\n if (tableColumn && tableColumn.distinctValueCollection) {\r\n return tableColumn.distinctValueCollection.values;\r\n }\r\n return [];\r\n };\r\n\r\n // TODO: Enable, when table gets refactored. Explanation in ./../table/NonPrimitiveValueRenderer\r\n // private _onPopupShow = (popupState: PropertyPopupState) => this.setState({ popup: popupState });\r\n\r\n // private _onPopupHide = () => this.setState({ popup: undefined });\r\n\r\n // istanbul ignore next\r\n private _onScroll = (scrollData: ScrollState) => {\r\n this._topRowIndex = scrollData.rowVisibleStartIdx;\r\n if (this.props.onScrollToRow)\r\n this.props.onScrollToRow(scrollData.rowVisibleStartIdx);\r\n };\r\n\r\n /** Determines if focus is in an input element - for filter checking */\r\n private isFocusOnInputElement(): boolean {\r\n const element: HTMLElement = document.activeElement as HTMLElement;\r\n return element &&\r\n (element instanceof HTMLInputElement ||\r\n element instanceof HTMLSelectElement ||\r\n element instanceof HTMLTextAreaElement);\r\n }\r\n\r\n private _onKeyboardEvent = (e: React.KeyboardEvent, keyDown: boolean) => {\r\n if (isNavigationKey(e.key) && !this.state.cellEditorState.active && !this.isFocusOnInputElement()) {\r\n if (this._tableSelectionTarget === TableSelectionTarget.Row) {\r\n const handleKeyboardSelectItem = (index: number) => {\r\n const selectionFunction = this._rowSelectionHandler.createSelectionFunction(this._rowComponentSelectionHandler, this.createRowItemSelectionHandler(index));\r\n selectionFunction(e.shiftKey, e.ctrlKey);\r\n };\r\n\r\n const handleKeyboardActivateItem = (index: number) => {\r\n // istanbul ignore else\r\n if (this.state.keyboardEditorCellKey) {\r\n const columnIndex = this.getColumnIndexFromKey(this.state.keyboardEditorCellKey);\r\n // istanbul ignore else\r\n if (0 <= columnIndex && columnIndex < this.state.columns.length) {\r\n const columnDescription = this.state.columns[columnIndex].columnDescription;\r\n // istanbul ignore else\r\n if (columnDescription && columnDescription.editable)\r\n this.activateCellEditor(index, columnIndex, this.state.keyboardEditorCellKey);\r\n }\r\n\r\n }\r\n };\r\n\r\n const handleCrossAxisArrowKey = (forward: boolean) => {\r\n // istanbul ignore else\r\n if (this.state.keyboardEditorCellKey) {\r\n let newEditorCellKey: string | undefined;\r\n const columnIndex = this.getColumnIndexFromKey(this.state.keyboardEditorCellKey);\r\n\r\n // istanbul ignore else\r\n if (columnIndex >= 0) {\r\n let newColIndex = columnIndex;\r\n\r\n while (!newEditorCellKey) {\r\n if (forward)\r\n newColIndex++;\r\n else\r\n newColIndex--;\r\n\r\n if (newColIndex < 0)\r\n newColIndex = this.state.columns.length - 1;\r\n else if (newColIndex >= this.state.columns.length)\r\n newColIndex = 0;\r\n\r\n // istanbul ignore next\r\n if (newColIndex === columnIndex)\r\n break;\r\n\r\n const isEditable = this.state.columns[newColIndex].columnDescription.editable;\r\n if (isEditable)\r\n newEditorCellKey = this.state.columns[newColIndex].key;\r\n }\r\n\r\n // istanbul ignore else\r\n if (newEditorCellKey)\r\n this.setState({ keyboardEditorCellKey: newEditorCellKey });\r\n }\r\n }\r\n };\r\n\r\n const itemKeyboardNavigator = new ItemKeyboardNavigator(handleKeyboardSelectItem, handleKeyboardActivateItem);\r\n itemKeyboardNavigator.orientation = Orientation.Vertical;\r\n itemKeyboardNavigator.allowWrap = false;\r\n itemKeyboardNavigator.itemCount = this.state.rowsCount;\r\n itemKeyboardNavigator.crossAxisArrowKeyHandler = handleCrossAxisArrowKey;\r\n\r\n const processedRow = this._rowSelectionHandler.processedItem ? this._rowSelectionHandler.processedItem /* istanbul ignore next */ : 0;\r\n keyDown ?\r\n itemKeyboardNavigator.handleKeyDownEvent(e, processedRow) :\r\n itemKeyboardNavigator.handleKeyUpEvent(e, processedRow);\r\n } else {\r\n const handleKeyboardSelectItem = (index: number) => {\r\n const processedCell = this._cellSelectionHandler.processedItem;\r\n // istanbul ignore else\r\n if (processedCell) {\r\n const cellKey = { rowIndex: index, columnKey: processedCell.columnKey };\r\n const selectionHandler = this.createCellItemSelectionHandler(cellKey);\r\n const selectionFunction = this._cellSelectionHandler.createSelectionFunction(this._cellComponentSelectionHandler, selectionHandler);\r\n selectionFunction(e.shiftKey, e.ctrlKey);\r\n }\r\n };\r\n\r\n const handleKeyboardActivateItem = (index: number) => {\r\n const processedCell = this._cellSelectionHandler.processedItem;\r\n // istanbul ignore else\r\n if (processedCell) {\r\n const columnIndex = this.getColumnIndexFromKey(processedCell.columnKey);\r\n // istanbul ignore else\r\n if (0 <= columnIndex && columnIndex < this.state.columns.length) {\r\n const columnDescription = this.state.columns[columnIndex].columnDescription;\r\n // istanbul ignore else\r\n if (columnDescription && columnDescription.editable)\r\n this.activateCellEditor(index, columnIndex, processedCell.columnKey);\r\n }\r\n }\r\n };\r\n\r\n const handleCrossAxisArrowKey = (forward: boolean) => {\r\n const processedCell = this._cellSelectionHandler.processedItem;\r\n // istanbul ignore else\r\n if (processedCell) {\r\n const columnIndex = this.getColumnIndexFromKey(processedCell.columnKey);\r\n // istanbul ignore else\r\n if (columnIndex >= 0) {\r\n let newColIndex = columnIndex;\r\n\r\n if (forward)\r\n newColIndex++;\r\n else\r\n newColIndex--;\r\n\r\n if (newColIndex < 0)\r\n newColIndex = this.state.columns.length - 1;\r\n else if (newColIndex >= this.state.columns.length)\r\n newColIndex = 0;\r\n\r\n const columnKey = this.state.columns[newColIndex].key;\r\n const cellKey = { rowIndex: processedCell.rowIndex, columnKey };\r\n const selectionHandler = this.createCellItemSelectionHandler(cellKey);\r\n const selectionFunction = this._cellSelectionHandler.createSelectionFunction(this._cellComponentSelectionHandler, selectionHandler);\r\n selectionFunction(e.shiftKey, e.ctrlKey);\r\n }\r\n }\r\n };\r\n\r\n const itemKeyboardNavigator = new ItemKeyboardNavigator(handleKeyboardSelectItem, handleKeyboardActivateItem);\r\n itemKeyboardNavigator.orientation = Orientation.Vertical;\r\n itemKeyboardNavigator.allowWrap = false;\r\n itemKeyboardNavigator.itemCount = this.state.rowsCount;\r\n itemKeyboardNavigator.crossAxisArrowKeyHandler = handleCrossAxisArrowKey;\r\n\r\n const processedRow = this._cellSelectionHandler.processedItem ? this._cellSelectionHandler.processedItem.rowIndex : /* istanbul ignore next */ 0;\r\n keyDown ?\r\n itemKeyboardNavigator.handleKeyDownEvent(e, processedRow) :\r\n itemKeyboardNavigator.handleKeyUpEvent(e, processedRow);\r\n }\r\n }\r\n };\r\n\r\n private _onKeyDown = (e: React.KeyboardEvent) => this._onKeyboardEvent(e, true);\r\n private _onKeyUp = (e: React.KeyboardEvent) => this._onKeyboardEvent(e, false);\r\n\r\n /** @internal */\r\n public override render() {\r\n const rowRenderer = <TableRowRenderer rowRendererCreator={() => this._createRowRenderer()} />;\r\n\r\n const visibleColumns = this._getVisibleColumns();\r\n const tableClassName = classnames(\r\n \"components-table\",\r\n \"components-smallEditor-host\",\r\n this.props.className,\r\n {\r\n \"hide-header\": this.props.hideHeader,\r\n \"striped-rows\": this.props.stripedRows,\r\n \"row-selection\": this._tableSelectionTarget === TableSelectionTarget.Row,\r\n \"cell-selection\": this._tableSelectionTarget === TableSelectionTarget.Cell,\r\n },\r\n );\r\n\r\n return (\r\n <>\r\n <div className={tableClassName} style={this.props.style}\r\n onMouseDown={this._onMouseDown}\r\n onContextMenu={this.props.showHideColumns ? this._handleShowHideContextMenu : undefined}\r\n onKeyDown={this._onKeyDown}\r\n onKeyUp={this._onKeyUp}\r\n role=\"presentation\"\r\n >\r\n {this.props.showHideColumns &&\r\n <ShowHideMenu\r\n opened={this.state.menuVisible}\r\n items={this.state.columns.map((column) => ({ id: column.key, label: column.reactDataGridColumn.name }))}\r\n x={this.state.menuX} y={this.state.menuY}\r\n initialHidden={this.state.hiddenColumns}\r\n onClose={this._hideContextMenu}\r\n onShowHideChange={this._handleShowHideChange} />\r\n }\r\n <ElementResizeObserver watchedElement={this.state.gridContainer}\r\n render={({ width, height }) => {\r\n setTimeout(() => this._queuePokeScroll());\r\n return (\r\n <ReactDataGrid\r\n ref={this._gridRef}\r\n columns={visibleColumns}\r\n rowGetter={this._rowGetter}\r\n rowRenderer={rowRenderer}\r\n rowsCount={this.state.rowsCount}\r\n {...(this.props.reorderableColumns ? {\r\n draggableHeaderCell: DragDropHeaderCell,\r\n onHeaderDrop: this._onHeaderDrop,\r\n } as any : {})}\r\n minHeight={height}\r\n minWidth={width}\r\n headerRowHeight={TABLE_ROW_HEIGHT}\r\n rowHeight={TABLE_ROW_HEIGHT}\r\n onGridSort={this._handleGridSort}\r\n enableRowSelect={null} // Prevent deprecation warning\r\n onAddFilter={this._handleFilterChange}\r\n onClearFilters={this._handleOnClearFilters} // eslint-disable-line @typescript-eslint/unbound-method\r\n headerFiltersHeight={TABLE_FILTER_ROW_HEIGHT}\r\n getValidFilterValues={this._getValidFilterValues}\r\n onScroll={this._onScroll}\r\n />\r\n );\r\n }}\r\n />\r\n </div>\r\n <div ref={this._tableRef}>\r\n {this.state.dialog\r\n ?\r\n // istanbul ignore next\r\n <Dialog\r\n opened={true}\r\n onClose={this._onDialogClose}\r\n title={this.state.dialog.title}\r\n height={\"50vh\"}\r\n >\r\n {this.state.dialog.content}\r\n </Dialog>\r\n : undefined}\r\n {/* TODO: Enable, when table gets refactored. Explanation in ./../../properties/renderers/value/table/NonPrimitiveValueRenderer */}\r\n {/* {this.state.popup\r\n ?\r\n <Popup\r\n isShown={true}\r\n fixedPosition={this.state.popup.fixedPosition}\r\n position={Position.Top}\r\n >\r\n {this.state.popup.content}\r\n </Popup>\r\n :\r\n undefined} */}\r\n </div>\r\n </>\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * Props for the [[TableRow]] component\r\n * @internal\r\n */\r\nexport interface TableRowProps extends CommonProps {\r\n cells: { [key: string]: React.ReactNode };\r\n isSelected?: boolean;\r\n}\r\n\r\n/**\r\n * Default component for rendering a row for the Table\r\n * @internal\r\n */\r\nexport class TableRow extends React.Component<TableRowProps> {\r\n\r\n /** @internal */\r\n public override render() {\r\n const { cells, isSelected, ...props } = this.props;\r\n return (\r\n <ReactDataGrid.Row {...props} row={cells} isSelected={isSelected} />\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Table.js","sourceRoot":"","sources":["../../../../../src/components-react/table/component/Table.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,wBAAsB;AACtB,mDAAiD;AACjD,4DAAoC;AACpC,+DAAiD;AACjD,mCAAiC;AACjC,6CAA+B;AAC/B,sEAA4C;AAC5C,sDAAuE;AACvE,0DAA4D;AAC5D,kDAG2B;AAC3B,8EAEiD;AACjD,0EAAsE;AACtE,qEAAkE;AAClE,gFAA6E;AAE7E,0DAAmE;AACnE,gFAA0G;AAC1G,wEAA2H;AAC3H,6FAA0F;AAC1F,qFAAkF;AAClF,+FAA4F;AAC5F,kFAAoG;AACpG,6FAA0F;AAC1F,wGAAqG;AACrG,4DAA+G;AAC/G,6DAA0D;AAC1D,2CAAgF;AAChF,+CAAiE;AAEjE,uDAAuD;AAEvD,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAEnC;;;GAGG;AACH,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,6DAAG,CAAA;IACH,+DAAI,CAAA;AACN,CAAC,EAHW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAG/B;AAED,uBAAuB;AACvB,IAAK,gBAMJ;AAND,WAAK,gBAAgB;IACnB,kCAAc,CAAA;IACd,sCAAkB,CAAA;IAClB,iCAAa,CAAA;IACb,mCAAe,CAAA;IACf,iCAAa,CAAA;AACf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,IAAI,CAAC,aAAa;6BAC1B,CAAC,CAAC,CAAC,EAAE,CAAC,EACd,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,KAAK,EACf,eAAe,EAAE,gBAAgB,EACjC,SAAS,EAAE,gBAAgB,EAC3B,UAAU,EAAE,IAAI,CAAC,eAAe,EAChC,eAAe,EAAE,IAAI,EACrB,WAAW,EAAE,IAAI,CAAC,mBAAmB,EACrC,cAAc,EAAE,IAAI,CAAC,qBAAqB,EAC1C,mBAAmB,EAAE,uBAAuB,EAC5C,oBAAoB,EAAE,IAAI,CAAC,qBAAqB,EAChD,QAAQ,EAAE,IAAI,CAAC,SAAS,GACxB,CACH,CAAC;oBACJ,CAAC,GACD,CACE;YACN,6BAAK,GAAG,EAAE,IAAI,CAAC,SAAS,IACrB,IAAI,CAAC,KAAK,CAAC,MAAM;gBAChB,CAAC;oBACD,uBAAuB;oBACvB,oBAAC,mBAAM,IACL,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAC9B,MAAM,EAAE,MAAM,IAEb,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CACnB;gBACT,CAAC,CAAC,SAAS,CAaT,CACL,CACJ,CAAC;IACJ,CAAC;CACF;AA7+CD,sBA6+CC;AAWD;;;GAGG;AACH,MAAa,QAAS,SAAQ,KAAK,CAAC,SAAwB;IAE1D,gBAAgB;IACA,MAAM;QACpB,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACnD,OAAO,CACL,oBAAC,yBAAa,CAAC,GAAG,OAAK,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,GAAI,CACrE,CAAC;IACJ,CAAC;CACF;AATD,4BASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module Table\r\n */\r\n\r\nimport \"./Table.scss\";\r\nimport \"../columnfiltering/ColumnFiltering.scss\";\r\nimport classnames from \"classnames\";\r\nimport classnamesDedupe from \"classnames/dedupe\";\r\nimport { memoize } from \"lodash\";\r\nimport * as React from \"react\";\r\nimport ReactDataGrid from \"react-data-grid\";\r\nimport { DisposableList, Guid, GuidString } from \"@itwin/core-bentley\";\r\nimport { PropertyValueFormat } from \"@itwin/appui-abstract\";\r\nimport {\r\n CommonProps, Dialog, ElementResizeObserver, isNavigationKey, ItemKeyboardNavigator, LocalStateStorage, Orientation, SortDirection, Timer,\r\n UiStateStorage, UiStateStorageStatus,\r\n} from \"@itwin/core-react\";\r\nimport {\r\n MultiSelectionHandler, OnItemsDeselectedCallback, OnItemsSelectedCallback, SelectionHandler, SingleSelectionHandler,\r\n} from \"../../common/selection/SelectionHandler\";\r\nimport { SelectionMode } from \"../../common/selection/SelectionModes\";\r\nimport { ShowHideMenu } from \"../../common/showhide/ShowHideMenu\";\r\nimport { TypeConverterManager } from \"../../converters/TypeConverterManager\";\r\nimport { PropertyUpdatedArgs } from \"../../editors/EditorContainer\";\r\nimport { TableRowStyleProvider } from \"../../properties/ItemStyle\";\r\nimport { PropertyDialogState, PropertyValueRendererManager } from \"../../properties/ValueRendererManager\";\r\nimport { CompositeFilterDescriptorCollection, FilterCompositionLogicalOperator } from \"../columnfiltering/ColumnFiltering\";\r\nimport { MultiSelectFilter } from \"../columnfiltering/data-grid-addons/MultiSelectFilter\";\r\nimport { NumericFilter } from \"../columnfiltering/data-grid-addons/NumericFilter\";\r\nimport { SingleSelectFilter } from \"../columnfiltering/data-grid-addons/SingleSelectFilter\";\r\nimport { DataGridFilterParser, ReactDataGridFilter } from \"../columnfiltering/DataGridFilterParser\";\r\nimport { MultiValueFilter } from \"../columnfiltering/multi-value-filter/MultiValueFilter\";\r\nimport { TableFilterDescriptorCollection } from \"../columnfiltering/TableFilterDescriptorCollection\";\r\nimport { CellItem, ColumnDescription, FilterRenderer, RowItem, TableDataProvider } from \"../TableDataProvider\";\r\nimport { DragDropHeaderCell } from \"./DragDropHeaderCell\";\r\nimport { TableCell, TableCellContent, TableIconCellContent } from \"./TableCell\";\r\nimport { ReactDataGridColumn, TableColumn } from \"./TableColumn\";\r\n\r\n// cspell:ignore Overscan columnfiltering Dedupe popout\r\n\r\nconst TABLE_ROW_HEIGHT = 27;\r\nconst TABLE_FILTER_ROW_HEIGHT = 32;\r\n\r\n/**\r\n * Specifies table selection target.\r\n * @public @deprecated\r\n */\r\nexport enum TableSelectionTarget {\r\n Row,\r\n Cell,\r\n}\r\n\r\n/** Scroll Direction */\r\nenum SCROLL_DIRECTION {\r\n UP = \"upwards\",\r\n DOWN = \"downwards\",\r\n LEFT = \"left\",\r\n RIGHT = \"right\",\r\n NONE = \"none\",\r\n}\r\n\r\n/** Scroll State */\r\ninterface ScrollState {\r\n height: number;\r\n scrollTop: number;\r\n scrollLeft: number;\r\n rowVisibleStartIdx: number;\r\n rowVisibleEndIdx: number;\r\n rowOverscanStartIdx: number;\r\n rowOverscanEndIdx: number;\r\n colVisibleStartIdx: number;\r\n colVisibleEndIdx: number;\r\n colOverscanStartIdx: number;\r\n colOverscanEndIdx: number;\r\n scrollDirection: SCROLL_DIRECTION;\r\n lastFrozenColumnIndex: number;\r\n isScrolling: boolean;\r\n}\r\n\r\n/** Properties for the Table React component\r\n * @public @deprecated Use the Table component in @itwin/itwinui-react\r\n */\r\nexport interface TableProps extends CommonProps {\r\n /** Data provider for the Table */\r\n dataProvider: TableDataProvider;\r\n /** Amount of rows per page. The default is 100. */\r\n pageAmount?: number;\r\n\r\n /** Called when rows are loaded */\r\n onRowsLoaded?: (firstRowIndex: number, lastRowIndex: number) => void;\r\n\r\n /** Callback for determining if row is selected */\r\n isRowSelected?: (row: RowItem) => boolean;\r\n /** Callback for when rows are selected */\r\n onRowsSelected?: (rowIterator: AsyncIterableIterator<RowItem>, replace: boolean) => Promise<boolean>;\r\n /** Callback for when rows are deselected */\r\n onRowsDeselected?: (rowIterator: AsyncIterableIterator<RowItem>) => Promise<boolean>;\r\n\r\n /** Callback for determining if cell is selected */\r\n isCellSelected?: (rowIndex: number, cell: CellItem) => boolean;\r\n /** Callback for when cells are selected */\r\n onCellsSelected?: (cellIterator: AsyncIterableIterator<[RowItem, CellItem]>, replace: boolean) => Promise<boolean>;\r\n /** Callback for when cells are deselected */\r\n onCellsDeselected?: (cellIterator: AsyncIterableIterator<[RowItem, CellItem]>) => Promise<boolean>;\r\n\r\n /** Specifies the selection target. The default is Row. */\r\n tableSelectionTarget?: TableSelectionTarget;\r\n /** Specifies the selection mode. The default is Single. */\r\n selectionMode?: SelectionMode;\r\n\r\n /** Callback for when properties are being edited */\r\n onPropertyEditing?: (args: TableCellEditorState) => void;\r\n /** Callback for when properties are updated */\r\n onPropertyUpdated?: (propertyArgs: PropertyUpdatedArgs, cellArgs: TableCellUpdatedArgs) => Promise<boolean>;\r\n\r\n /** @internal */\r\n renderRow?: (item: RowItem, props: TableRowProps) => React.ReactNode;\r\n /** Enables context menu to show/hide columns */\r\n showHideColumns?: boolean;\r\n /** Indicates whether the Table columns are reorderable */\r\n reorderableColumns?: boolean;\r\n /** Optional parameter for persistent UI settings. Used for column reordering and show persistency. */\r\n settingsStorage?: UiStateStorage;\r\n /** Optional parameter for persistent UI settings. Used for column reordering and show persistency.\r\n * @deprecated use settingsStorage property */\r\n uiStateStorage?: UiStateStorage;\r\n /** Identifying string used for persistent state. */\r\n settingsIdentifier?: string;\r\n /** Custom property value renderer manager */\r\n propertyValueRendererManager?: PropertyValueRendererManager;\r\n /**\r\n * Gets called when rendering is finished. Should be used while testing to know when asynchronous rendering has finished.\r\n * @internal\r\n */\r\n onRender?: () => void;\r\n\r\n /** Hide the header */\r\n hideHeader?: boolean;\r\n /** Alternate the background of odd and even rows */\r\n stripedRows?: boolean;\r\n /** Specifies a row index to scroll to */\r\n scrollToRow?: number;\r\n /** @internal */\r\n onScrollToRow?: (rowIndex: number) => void;\r\n /** @internal */\r\n onApplyFilter?: () => void;\r\n\r\n /** Called to show a context menu when a cell is right-clicked. */\r\n onCellContextMenu?: (args: TableCellContextMenuArgs) => void;\r\n /** Maximum number of distinct values for filtering */\r\n maximumDistinctValues?: number;\r\n}\r\n\r\n/** Properties for a Table cell\r\n * @public @deprecated Use the Table component in @iTwin/@iTwinUI-react\r\n */\r\nexport interface CellProps {\r\n item: CellItem;\r\n displayValue: string;\r\n render: React.ComponentType<{ isSelected: boolean }>;\r\n}\r\n\r\n/** Properties for a Table row\r\n * @public @deprecated Use the Table component in @itwin/itwinui-react\r\n */\r\nexport interface RowProps {\r\n index: number;\r\n item: RowItem;\r\n cells: { [key: string]: CellProps };\r\n render?: () => React.ReactNode;\r\n style?: React.CSSProperties;\r\n}\r\n\r\ninterface RowsLoadResult {\r\n rows: RowProps[];\r\n selectedRowIndices: number[];\r\n selectedCellKeys: CellKey[];\r\n}\r\n\r\ninterface ReactDataGridColumnEventArgs {\r\n rowIdx: number;\r\n idx: number;\r\n name: string;\r\n}\r\n\r\n/** Cell/Property Editor state\r\n * @public @deprecated Use the Table component in @itwin/itwinui-react\r\n */\r\nexport interface TableCellEditorState {\r\n active: boolean;\r\n rowIndex?: number;\r\n colIndex?: number;\r\n cellKey?: string;\r\n}\r\n\r\n/** Cell/Property Updated Args\r\n * @public @deprecated Use the Table component in @iTwin/@iTwinUI-react\r\n */\r\nexport interface TableCellUpdatedArgs {\r\n rowIndex: number;\r\n colIndex: number;\r\n cellKey: string;\r\n}\r\n\r\n/** Arguments for `TableProps.onCellContextMenu` callback\r\n * @public @deprecated Use the Table component in @itwin/itwinui-react\r\n */\r\nexport interface TableCellContextMenuArgs {\r\n /** Index of the row clicked */\r\n rowIndex: number;\r\n /** Index of the column clicked */\r\n colIndex: number;\r\n /** Key of the cell clicked */\r\n cellKey: string;\r\n /** An event which caused the context menu callback */\r\n event: React.MouseEvent;\r\n /** CellItem of the cell clicked */\r\n cellItem?: CellItem;\r\n}\r\n\r\n/** @internal */\r\ninterface TableState {\r\n columns: TableColumn[];\r\n hiddenColumns: string[];\r\n rows: RowProps[];\r\n rowsCount: number;\r\n menuVisible: boolean;\r\n menuX: number;\r\n menuY: number;\r\n cellEditorState: TableCellEditorState;\r\n dialog?: PropertyDialogState;\r\n keyboardEditorCellKey?: string;\r\n // TODO: Enable, when table gets refactored\r\n // popup?: PropertyPopupState;\r\n gridContainer: HTMLDivElement | null;\r\n}\r\n\r\nconst initialState: TableState = {\r\n columns: [],\r\n hiddenColumns: [],\r\n rows: [],\r\n rowsCount: 0,\r\n cellEditorState: { active: false },\r\n menuVisible: false,\r\n menuX: 0,\r\n menuY: 0,\r\n gridContainer: null,\r\n};\r\n\r\ninterface CellKey {\r\n rowIndex: number;\r\n columnKey: string;\r\n}\r\n\r\n/** TableRowRenderer props. */\r\ninterface TableRowRendererProps {\r\n rowRendererCreator: () => any;\r\n}\r\n\r\n/** ReactDataGrid requires a class component for the RowRenderer because it sets a ref to it. */\r\nclass TableRowRenderer extends React.Component<TableRowRendererProps> {\r\n public override render() {\r\n const creatorFn = this.props.rowRendererCreator();\r\n return creatorFn(this.props);\r\n }\r\n}\r\n\r\nconst enum TableUpdate { // eslint-disable-line no-restricted-syntax\r\n None = 0,\r\n Rows = 1,\r\n Complete = 2,\r\n}\r\n\r\nconst enum UpdateStatus { // eslint-disable-line no-restricted-syntax\r\n Continue,\r\n Abort,\r\n}\r\n\r\n/**\r\n * Table React component that displays rows and columns in a grid along with a header\r\n * @public @deprecated Use the Table component in @iTwin/@iTwinUI-react\r\n */\r\nexport class Table extends React.Component<TableProps, TableState> {\r\n private _pageAmount = 100;\r\n private _disposableListeners = new DisposableList();\r\n private _isMounted = false;\r\n private _currentUpdate = TableUpdate.None;\r\n private _pendingUpdate = TableUpdate.None;\r\n private _rowLoadGuid = Guid.createValue();\r\n private _rowSelectionHandler: SelectionHandler<number>;\r\n private _cellSelectionHandler: SelectionHandler<CellKey>;\r\n private _selectedRowIndices: Set<number> = new Set<number>();\r\n private _selectedCellKeys: Map<string, Set<number>> = new Map<string, Set<number>>(); // column keys -> rowIndices\r\n private _rowItemSelectionHandlers?: Array<SingleSelectionHandler<number>>;\r\n private _cellItemSelectionHandlers?: Array<Array<SingleSelectionHandler<CellKey>>>;\r\n private _pressedItemSelected: boolean = false;\r\n private _tableRef = React.createRef<HTMLDivElement>();\r\n private _gridRef = React.createRef<ReactDataGrid<any>>();\r\n private _gridContainerRef = React.createRef<HTMLDivElement>();\r\n private _filterDescriptors?: TableFilterDescriptorCollection;\r\n private _filterRowShown = false;\r\n private _topRowIndex = 0;\r\n private _pokeScrollTimer = new Timer(100);\r\n\r\n /** @internal */\r\n public override readonly state = initialState;\r\n\r\n /** @internal */\r\n constructor(props: TableProps) {\r\n super(props);\r\n\r\n if (props.pageAmount)\r\n this._pageAmount = props.pageAmount;\r\n\r\n this._disposableListeners.add(props.dataProvider.onColumnsChanged.addListener(this._onColumnsChanged));\r\n this._disposableListeners.add(props.dataProvider.onRowsChanged.addListener(this._onRowsChanged));\r\n this._rowSelectionHandler = new SelectionHandler(props.selectionMode ? props.selectionMode : SelectionMode.Single);\r\n this._cellSelectionHandler = new SelectionHandler(props.selectionMode ? props.selectionMode : SelectionMode.Single);\r\n this._rowSelectionHandler.onItemsSelectedCallback = this._onRowsSelected;\r\n this._rowSelectionHandler.onItemsDeselectedCallback = this._onRowsDeselected;\r\n this._cellSelectionHandler.onItemsSelectedCallback = this._onCellsSelected;\r\n this._cellSelectionHandler.onItemsDeselectedCallback = this._onCellsDeselected;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n private get rowItemSelectionHandlers(): Array<SingleSelectionHandler<number>> {\r\n // istanbul ignore else\r\n if (!this._rowItemSelectionHandlers) {\r\n this._rowItemSelectionHandlers = [];\r\n for (let i = 0; i < this.state.rowsCount; i++)\r\n this._rowItemSelectionHandlers.push(this.createRowItemSelectionHandler(i));\r\n }\r\n return this._rowItemSelectionHandlers;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n private get cellItemSelectionHandlers(): Array<Array<SingleSelectionHandler<CellKey>>> {\r\n // istanbul ignore else\r\n if (!this._cellItemSelectionHandlers) {\r\n this._cellItemSelectionHandlers = [];\r\n for (let rowIndex = 0; rowIndex < this.state.rowsCount; rowIndex++) {\r\n this._cellItemSelectionHandlers[rowIndex] = [];\r\n for (const column of this.state.columns) {\r\n this._cellItemSelectionHandlers[rowIndex].push(this.createCellItemSelectionHandler({ rowIndex, columnKey: column.key }));\r\n }\r\n }\r\n }\r\n return this._cellItemSelectionHandlers;\r\n }\r\n\r\n private async * createRowIterator(rowIndices: number[]): AsyncIterableIterator<RowItem> {\r\n for (const index of rowIndices)\r\n yield await this.props.dataProvider.getRow(index);\r\n }\r\n\r\n private async * createCellIterator(cellKeys: CellKey[]): AsyncIterableIterator<[RowItem, CellItem]> {\r\n for (const key of cellKeys) {\r\n const row = await this.props.dataProvider.getRow(key.rowIndex);\r\n yield [row, this._getCellItem(row, key.columnKey)];\r\n }\r\n }\r\n\r\n private _onRowsSelected: OnItemsSelectedCallback<number> = (rowIndices: number[], replace: boolean) => {\r\n if (this.props.onRowsSelected)\r\n this.props.onRowsSelected(this.createRowIterator(rowIndices), replace); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n };\r\n\r\n private _onRowsDeselected: OnItemsDeselectedCallback<number> = (rowIndices: number[]) => {\r\n if (this.props.onRowsDeselected)\r\n this.props.onRowsDeselected(this.createRowIterator(rowIndices)); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n };\r\n\r\n private _onCellsSelected: OnItemsSelectedCallback<CellKey> = (cellKeys: CellKey[], replace: boolean) => {\r\n if (this.props.onCellsSelected)\r\n this.props.onCellsSelected(this.createCellIterator(cellKeys), replace); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n };\r\n\r\n private _onCellsDeselected: OnItemsDeselectedCallback<CellKey> = (cellKeys: CellKey[]) => {\r\n if (this.props.onCellsDeselected)\r\n this.props.onCellsDeselected(this.createCellIterator(cellKeys)); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n };\r\n\r\n private get _tableSelectionTarget(): TableSelectionTarget {\r\n return this.props.tableSelectionTarget ? this.props.tableSelectionTarget : TableSelectionTarget.Row;\r\n }\r\n\r\n /** @internal */\r\n public override componentDidUpdate(previousProps: TableProps, previousState: TableState) {\r\n this._rowSelectionHandler.selectionMode = this.props.selectionMode ? this.props.selectionMode : SelectionMode.Single;\r\n this._cellSelectionHandler.selectionMode = this.props.selectionMode ? this.props.selectionMode : SelectionMode.Single;\r\n\r\n if (previousProps.dataProvider !== this.props.dataProvider) {\r\n this._disposableListeners.dispose();\r\n this._disposableListeners.add(this.props.dataProvider.onColumnsChanged.addListener(this._onColumnsChanged));\r\n this._disposableListeners.add(this.props.dataProvider.onRowsChanged.addListener(this._onRowsChanged));\r\n }\r\n\r\n if (this.props.dataProvider !== previousProps.dataProvider) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.update();\r\n return;\r\n }\r\n\r\n // When hiddenColumns length is changed, we need to re-render component so that cell widths would be calculated appropriately.\r\n if (previousState.hiddenColumns.length !== this.state.hiddenColumns.length)\r\n this.forceUpdate();\r\n\r\n if (this.props.isCellSelected !== previousProps.isCellSelected\r\n || this.props.isRowSelected !== previousProps.isRowSelected\r\n || this.props.tableSelectionTarget !== previousProps.tableSelectionTarget) {\r\n this.updateSelectedRows();\r\n this.updateSelectedCells();\r\n }\r\n\r\n if (this.props.scrollToRow !== previousProps.scrollToRow) {\r\n // istanbul ignore else\r\n if (this.props.scrollToRow !== undefined)\r\n this.scrollToRow(this.props.scrollToRow);\r\n }\r\n\r\n /* istanbul ignore next */\r\n if (this.props.onRender)\r\n this.props.onRender();\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n let gridContainer: HTMLDivElement | null = null;\r\n\r\n this._isMounted = true;\r\n\r\n // The previously used ReactResizeDetector, which does not work in popout/child windows, used deprecated React.findDomNode\r\n // which is now deprecated so, so new ElementResizeObserver requires you to pass the element to observe. So get the\r\n // same HTMLDivElement from grid as was used previously by ReactResizeDetector.\r\n if (this._gridRef.current) {\r\n const grid = this._gridRef.current as any;\r\n gridContainer = grid.getDataGridDOMNode();\r\n }\r\n this.setState({ gridContainer }, () => {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.update();\r\n });\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n this._isMounted = false;\r\n this._disposableListeners.dispose();\r\n this._unsetPokeScrollTimeout();\r\n }\r\n\r\n private scrollToRow(rowIndex: number) {\r\n // istanbul ignore else\r\n if (this._gridRef.current) {\r\n const grid = this._gridRef.current as any;\r\n // istanbul ignore else\r\n if (grid.getRowOffsetHeight && grid.getDataGridDOMNode) {\r\n const top = TABLE_ROW_HEIGHT * rowIndex;\r\n const gridCanvas = grid.getDataGridDOMNode().querySelector(\".react-grid-Canvas\");\r\n gridCanvas.scrollTop = top;\r\n this._topRowIndex = rowIndex;\r\n\r\n // istanbul ignore else\r\n if (this.props.onScrollToRow)\r\n this.props.onScrollToRow(rowIndex);\r\n }\r\n }\r\n }\r\n\r\n private setFocusToSelected() {\r\n // istanbul ignore next\r\n if (this._gridRef.current) {\r\n const grid = this._gridRef.current as any;\r\n // istanbul ignore else\r\n if (grid.getDataGridDOMNode) {\r\n const gridSelected = grid.getDataGridDOMNode().querySelector(\".rdg-selected\");\r\n // istanbul ignore else\r\n if (gridSelected) {\r\n gridSelected.focus();\r\n }\r\n }\r\n }\r\n }\r\n\r\n private async handlePendingUpdate(): Promise<UpdateStatus> {\r\n const update = this._pendingUpdate;\r\n this._pendingUpdate = TableUpdate.None;\r\n\r\n let status = UpdateStatus.Continue;\r\n if (update === TableUpdate.Complete)\r\n status = await this.updateColumns();\r\n // istanbul ignore else\r\n if (status === UpdateStatus.Continue && update > TableUpdate.None)\r\n status = await this.updateRows();\r\n return status;\r\n }\r\n\r\n private async updateColumns(): Promise<UpdateStatus> {\r\n if (this._currentUpdate !== TableUpdate.None) {\r\n this._pendingUpdate = TableUpdate.Complete;\r\n return UpdateStatus.Abort;\r\n }\r\n\r\n this._currentUpdate = TableUpdate.Complete;\r\n const columnDescriptions = await this.props.dataProvider.getColumns();\r\n this._currentUpdate = TableUpdate.None;\r\n\r\n // istanbul ignore next\r\n if (!this._isMounted)\r\n return UpdateStatus.Abort;\r\n\r\n if (this._pendingUpdate === TableUpdate.Complete) {\r\n await this.handlePendingUpdate();\r\n return UpdateStatus.Abort;\r\n }\r\n\r\n let dataGridColumns = columnDescriptions.map(this._columnDescriptionToReactDataGridColumn);\r\n if (this.props.settingsIdentifier) {\r\n const stateStorage: UiStateStorage = this.props.settingsStorage || /* istanbul ignore next */ this.props.uiStateStorage || /* istanbul ignore next */ new LocalStateStorage();\r\n const reorderResult = await stateStorage.getSetting(this.props.settingsIdentifier, \"ColumnReorder\");\r\n // istanbul ignore next\r\n if (reorderResult.status === UiStateStorageStatus.Success) {\r\n const setting = reorderResult.setting as string[];\r\n // map columns according to the keys in columns, in the order of the loaded array of keys\r\n dataGridColumns = setting.map((key) => dataGridColumns.filter((col) => col.key === key)[0]);\r\n } else if (reorderResult.status === UiStateStorageStatus.NotFound) {\r\n const keys = columnDescriptions.map((col) => col.key);\r\n await stateStorage.saveSetting(this.props.settingsIdentifier, \"ColumnReorder\", keys);\r\n }\r\n const showhideResult = await stateStorage.getSetting(this.props.settingsIdentifier, \"ColumnShowHideHiddenColumns\");\r\n // istanbul ignore next\r\n if (showhideResult.status === UiStateStorageStatus.Success) {\r\n const hiddenColumns = showhideResult.setting as string[];\r\n this.setState({ hiddenColumns });\r\n }\r\n }\r\n\r\n let keyboardEditorCellKey: string | undefined;\r\n const tableColumns = dataGridColumns.map((dataGridColumn: ReactDataGridColumn, index: number) => {\r\n const tableColumn = new TableColumn(this, columnDescriptions[index], dataGridColumn);\r\n tableColumn.dataProvider = this.props.dataProvider;\r\n if (!keyboardEditorCellKey && tableColumn.columnDescription.editable)\r\n keyboardEditorCellKey = tableColumn.key;\r\n if (tableColumn.filterable)\r\n dataGridColumn.filterableColumn = tableColumn;\r\n return tableColumn;\r\n });\r\n\r\n for (const tableColumn of tableColumns) {\r\n if (tableColumn.filterable)\r\n tableColumn.distinctValueCollection = await tableColumn.getDistinctValues(this.props.maximumDistinctValues);\r\n }\r\n\r\n this.setState({ columns: tableColumns, keyboardEditorCellKey });\r\n\r\n if (this._pendingUpdate !== TableUpdate.None) {\r\n return this.handlePendingUpdate();\r\n }\r\n return UpdateStatus.Continue;\r\n }\r\n\r\n private _onColumnsChanged = async () => {\r\n await this.updateColumns();\r\n\r\n this._cellItemSelectionHandlers = undefined;\r\n };\r\n\r\n private async updateRows(): Promise<UpdateStatus> {\r\n if (this._currentUpdate !== TableUpdate.None) {\r\n if (this._pendingUpdate === TableUpdate.None)\r\n this._pendingUpdate = TableUpdate.Rows;\r\n return UpdateStatus.Abort;\r\n }\r\n\r\n this._currentUpdate = TableUpdate.Rows;\r\n const rowsCount = await this.props.dataProvider.getRowsCount();\r\n this._currentUpdate = TableUpdate.None;\r\n\r\n // istanbul ignore next\r\n if (!this._isMounted)\r\n return UpdateStatus.Abort;\r\n\r\n if (this._pendingUpdate !== TableUpdate.None) {\r\n return this.handlePendingUpdate();\r\n }\r\n\r\n if (rowsCount !== this.state.rowsCount) {\r\n this._rowItemSelectionHandlers = undefined;\r\n this._cellItemSelectionHandlers = undefined;\r\n\r\n // when updating the rows with new data from dataProvider clear out existing selections\r\n this._selectedRowIndices.clear();\r\n this._selectedCellKeys.clear();\r\n }\r\n\r\n this._rowGetterAsync.cache.clear!();\r\n this.setState({ rowsCount, rows: [] });\r\n this._rowGetterAsync(0, true); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n return UpdateStatus.Continue;\r\n }\r\n\r\n // Workaround for react-data-grid bug that shows blank grid when updating after grid has been scrolled.\r\n // Force a re-render by scrolling up 1 then down 1\r\n private _pokeScrollAfterUpdate = () => {\r\n // istanbul ignore else\r\n if (this._gridRef.current && this._topRowIndex !== 0) {\r\n const grid = this._gridRef.current as any;\r\n // istanbul ignore else\r\n if (grid.getRowOffsetHeight && grid.getDataGridDOMNode) {\r\n const gridCanvas = grid.getDataGridDOMNode().querySelector(\".react-grid-Canvas\");\r\n\r\n // Scroll up 1\r\n let top = TABLE_ROW_HEIGHT * this._topRowIndex - 1;\r\n gridCanvas.scrollTop = top;\r\n\r\n // Scroll back down\r\n top = TABLE_ROW_HEIGHT * this._topRowIndex;\r\n gridCanvas.scrollTop = top;\r\n }\r\n }\r\n };\r\n\r\n private _queuePokeScroll = () => {\r\n this._unsetPokeScrollTimeout();\r\n this._pokeScrollTimer.setOnExecute(() => { this._pokeScrollAfterUpdate(); });\r\n this._pokeScrollTimer.start();\r\n };\r\n\r\n private _unsetPokeScrollTimeout = (): void => {\r\n this._pokeScrollTimer.stop();\r\n };\r\n\r\n private _onRowsChanged = async () => {\r\n await this.updateRows();\r\n this._queuePokeScroll();\r\n };\r\n\r\n /** @internal */\r\n public async update(): Promise<UpdateStatus> {\r\n let status = await this.updateColumns();\r\n\r\n if (status !== UpdateStatus.Abort)\r\n status = await this.updateRows();\r\n\r\n if (this.props.scrollToRow !== undefined)\r\n this.scrollToRow(this.props.scrollToRow);\r\n\r\n /* istanbul ignore next */\r\n if (this.props.onRender)\r\n this.props.onRender();\r\n\r\n return status;\r\n }\r\n\r\n /** @internal */\r\n public updateSelectedRows() {\r\n const selectedRowIndices = new Set<number>();\r\n if (this.props.isRowSelected) {\r\n for (let rowIndex = 0; rowIndex < this.state.rows.length; rowIndex++) {\r\n if (this.state.rows[rowIndex] && this.props.isRowSelected(this.state.rows[rowIndex].item))\r\n selectedRowIndices.add(rowIndex);\r\n }\r\n }\r\n this._selectedRowIndices = selectedRowIndices;\r\n this.forceUpdate();\r\n }\r\n\r\n /** @internal */\r\n public updateSelectedCells() {\r\n const selectedCellKeys = new Map<string, Set<number>>();\r\n if (this.props.isCellSelected) {\r\n for (const column of this.state.columns) {\r\n const set = new Set<number>();\r\n for (let rowIndex = 0; rowIndex < this.state.rows.length; rowIndex++) {\r\n // istanbul ignore next\r\n if (!this.state.rows[rowIndex])\r\n continue;\r\n const cellItem = this._getCellItem(this.state.rows[rowIndex].item, column.key);\r\n if (this.props.isCellSelected(rowIndex, cellItem))\r\n set.add(rowIndex);\r\n }\r\n // istanbul ignore else\r\n if (set.size !== 0)\r\n selectedCellKeys.set(column.key, set);\r\n }\r\n }\r\n this._selectedCellKeys = selectedCellKeys;\r\n this.forceUpdate();\r\n }\r\n\r\n private _columnDescriptionToReactDataGridColumn = (columnDescription: ColumnDescription): ReactDataGridColumn => {\r\n const isEditable = !!columnDescription.editable;\r\n\r\n const column: ReactDataGridColumn = {\r\n key: columnDescription.key,\r\n name: columnDescription.label,\r\n icon: columnDescription.icon,\r\n width: columnDescription.width,\r\n resizable: !!columnDescription.resizable,\r\n sortable: !!columnDescription.sortable,\r\n draggable: !!this.props.reorderableColumns,\r\n filterable: !!columnDescription.filterable,\r\n };\r\n\r\n column.events = {};\r\n\r\n if (this.props.onCellContextMenu) {\r\n column.events.onContextMenu = this.cellContextMenu.bind(this, column);\r\n }\r\n\r\n if (isEditable) {\r\n column.events.onClick = this.cellEditOnClick.bind(this, column);\r\n }\r\n\r\n if (columnDescription.filterRenderer !== undefined) {\r\n switch (columnDescription.filterRenderer) {\r\n case FilterRenderer.Numeric:\r\n column.filterRenderer = NumericFilter;\r\n break;\r\n case FilterRenderer.MultiSelect:\r\n column.filterRenderer = MultiSelectFilter;\r\n break;\r\n case FilterRenderer.MultiValue:\r\n column.filterRenderer = MultiValueFilter;\r\n break;\r\n case FilterRenderer.SingleSelect:\r\n column.filterRenderer = SingleSelectFilter;\r\n break;\r\n case FilterRenderer.Text:\r\n // column.filterRenderer is not set for the Text input filter\r\n break;\r\n }\r\n }\r\n\r\n return column;\r\n };\r\n\r\n private _getCellItem = (row: RowItem, columnKey: string): CellItem => {\r\n return row.cells.find((cell: CellItem) => cell.key === columnKey) || /* istanbul ignore next */ { key: columnKey };\r\n };\r\n\r\n private isCellSelected(key: CellKey) {\r\n const set = this._selectedCellKeys.get(key.columnKey);\r\n if (set)\r\n return set.has(key.rowIndex);\r\n return false;\r\n }\r\n\r\n private selectCells(cellKeys: CellKey[]) {\r\n for (const key of cellKeys) {\r\n let set = this._selectedCellKeys.get(key.columnKey);\r\n if (!set) {\r\n set = new Set();\r\n this._selectedCellKeys.set(key.columnKey, set);\r\n }\r\n set.add(key.rowIndex);\r\n }\r\n }\r\n\r\n private deselectCells(cellKeys: CellKey[]) {\r\n for (const key of cellKeys) {\r\n // istanbul ignore else\r\n const set = this._selectedCellKeys.get(key.columnKey);\r\n // istanbul ignore else\r\n if (set)\r\n set.delete(key.rowIndex);\r\n }\r\n }\r\n\r\n private createRowItemSelectionHandler(rowIndex: number): SingleSelectionHandler<number> {\r\n return {\r\n preselect: () => {\r\n this._pressedItemSelected = this._selectedRowIndices.has(rowIndex);\r\n },\r\n select: () => {\r\n // istanbul ignore else\r\n if (!this._selectedRowIndices.has(rowIndex)) {\r\n this._selectedRowIndices.add(rowIndex);\r\n if (!this._pressedItemSelected)\r\n this.forceUpdate();\r\n }\r\n },\r\n deselect: () => {\r\n // istanbul ignore else\r\n if (this._selectedRowIndices.has(rowIndex)) {\r\n this._selectedRowIndices.delete(rowIndex);\r\n this.forceUpdate();\r\n }\r\n },\r\n isSelected: () => this._selectedRowIndices.has(rowIndex),\r\n item: () => rowIndex,\r\n };\r\n }\r\n\r\n private _rowComponentSelectionHandler: MultiSelectionHandler<number> = {\r\n deselectAll: () => {\r\n this._selectedRowIndices = new Set<number>();\r\n if (!this._pressedItemSelected) {\r\n this._deactivateCellEditor();\r\n this.forceUpdate();\r\n }\r\n },\r\n selectBetween: (rowIndex1: number, rowIndex2: number) => {\r\n const selections = [];\r\n const lowerNumber = rowIndex1 < rowIndex2 ? rowIndex1 : rowIndex2;\r\n const higherNumber = rowIndex1 > rowIndex2 ? rowIndex1 : rowIndex2;\r\n for (let i = lowerNumber; i <= higherNumber; i++) {\r\n // istanbul ignore else\r\n if (!this._selectedRowIndices.has(i)) {\r\n selections.push(i);\r\n this._selectedRowIndices.add(i);\r\n }\r\n }\r\n\r\n this.forceUpdate();\r\n return selections;\r\n },\r\n updateSelection: (selections: number[], deselections: number[]): void => {\r\n for (const rowIndex of selections) {\r\n // istanbul ignore else\r\n if (!this._selectedRowIndices.has(rowIndex))\r\n this._selectedRowIndices.add(rowIndex);\r\n }\r\n\r\n for (const rowIndex of deselections) {\r\n // istanbul ignore else\r\n if (this._selectedRowIndices.has(rowIndex))\r\n this._selectedRowIndices.delete(rowIndex);\r\n }\r\n this.forceUpdate();\r\n },\r\n areEqual: (item1: number, item2: number) => item1 === item2,\r\n };\r\n\r\n private createCellItemSelectionHandler(cellKey: CellKey): SingleSelectionHandler<CellKey> {\r\n return {\r\n preselect: () => {\r\n this._pressedItemSelected = this.isCellSelected(cellKey);\r\n },\r\n select: () => {\r\n this.selectCells([cellKey]);\r\n this.forceUpdate();\r\n },\r\n deselect: () => {\r\n this.deselectCells([cellKey]);\r\n this.forceUpdate();\r\n },\r\n isSelected: () => this.isCellSelected(cellKey),\r\n item: () => cellKey,\r\n };\r\n }\r\n\r\n private _cellComponentSelectionHandler: MultiSelectionHandler<CellKey> = {\r\n deselectAll: () => {\r\n this._selectedCellKeys = new Map<string, Set<number>>();\r\n this.forceUpdate();\r\n },\r\n selectBetween: (item1: CellKey, item2: CellKey) => {\r\n const selections: CellKey[] = [];\r\n const lowerIndex = item1.rowIndex < item2.rowIndex ? item1.rowIndex : item2.rowIndex;\r\n const higherIndex = item1.rowIndex > item2.rowIndex ? item1.rowIndex : item2.rowIndex;\r\n let secondItem: CellKey;\r\n let firstItemFound = false;\r\n let secondItemFound = false;\r\n\r\n for (let rowIndex = lowerIndex; rowIndex <= higherIndex; rowIndex++) {\r\n for (const column of this.state.columns) {\r\n if (!firstItemFound) {\r\n if (rowIndex === item1.rowIndex && column.key === item1.columnKey) {\r\n firstItemFound = true;\r\n secondItem = item2;\r\n } else {\r\n // istanbul ignore else\r\n if (rowIndex === item2.rowIndex && column.key === item2.columnKey) {\r\n firstItemFound = true;\r\n secondItem = item1;\r\n } else\r\n continue;\r\n }\r\n }\r\n\r\n const cellKey = { rowIndex, columnKey: column.key };\r\n if (!this.isCellSelected(cellKey))\r\n selections.push(cellKey);\r\n\r\n if (rowIndex === secondItem!.rowIndex && column.key === secondItem!.columnKey) {\r\n secondItemFound = true;\r\n break;\r\n }\r\n }\r\n if (secondItemFound)\r\n break;\r\n }\r\n\r\n this.selectCells(selections);\r\n this.forceUpdate();\r\n return selections;\r\n },\r\n updateSelection: (selections: CellKey[], deselections: CellKey[]): void => {\r\n this.selectCells(selections);\r\n this.deselectCells(deselections);\r\n this.forceUpdate();\r\n },\r\n areEqual: (item1: CellKey, item2: CellKey) => item1.rowIndex === item2.rowIndex && item1.columnKey === item2.columnKey,\r\n };\r\n\r\n private _rowGetter = (i: number): RowProps => {\r\n if (this.state.rows[i])\r\n return this.state.rows[i];\r\n\r\n // get another page of rows\r\n // note: always start loading at the beginning of a page to avoid\r\n // requesting duplicate data (e.g. a page that starts at 0, at 1, at 2, ...)\r\n this._rowGetterAsync(i - (i % this._pageAmount), false); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n\r\n // Return placeholder object\r\n return { item: { key: \"\", cells: [] }, index: i, cells: {} };\r\n };\r\n\r\n private _rowGetterAsync = memoize(async (index: number, clearRows: boolean): Promise<void> => {\r\n // istanbul ignore next\r\n if (index < 0)\r\n return;\r\n\r\n // load up to `this._pageAmount` more rows\r\n const maxIndex = Math.min(this.state.rowsCount, index + this._pageAmount);\r\n const loadResult = await this.loadRows(index, maxIndex);\r\n\r\n // istanbul ignore next\r\n if (!this._isMounted)\r\n return;\r\n\r\n // istanbul ignore next\r\n if (this._pendingUpdate !== TableUpdate.None)\r\n return;\r\n\r\n const selectedRowIndices = this._selectedRowIndices;\r\n for (const rowIndex of loadResult.selectedRowIndices) {\r\n // istanbul ignore else\r\n if (!selectedRowIndices.has(rowIndex))\r\n selectedRowIndices.add(rowIndex);\r\n }\r\n this._selectedRowIndices = selectedRowIndices;\r\n\r\n this.selectCells(loadResult.selectedCellKeys);\r\n this.setState((prev) => {\r\n const rows = clearRows ? [] : [...prev.rows];\r\n loadResult.rows.forEach((r, i) => { rows[index + i] = r; });\r\n return { rows };\r\n }, async () => {\r\n if (this.props.onRowsLoaded)\r\n this.props.onRowsLoaded(index, index + loadResult.rows.length - 1);\r\n\r\n const showFilter = this._isShowFilterRow();\r\n if (showFilter !== this._filterRowShown)\r\n this.toggleFilterRow(showFilter);\r\n });\r\n });\r\n\r\n private async renderCellContent(cellItem: CellItem, column: ReactDataGridColumn, displayValue: string): Promise<React.ComponentType<{ isSelected: boolean }>> {\r\n if (column.icon)\r\n return () => <TableIconCellContent iconName={displayValue} />;\r\n\r\n return (props: { isSelected: boolean }) => (\r\n <TableCellContent\r\n height={TABLE_ROW_HEIGHT}\r\n isSelected={props.isSelected}\r\n cellItem={cellItem}\r\n onDialogOpen={this._onDialogOpen}\r\n propertyValueRendererManager={this.props.propertyValueRendererManager\r\n ? this.props.propertyValueRendererManager\r\n : PropertyValueRendererManager.defaultManager}\r\n style={{ zIndex: ((cellItem.mergedCellsCount ?? 1) > 1) ? 1 : undefined }}\r\n />\r\n );\r\n }\r\n\r\n private async getCellDisplayValue(cellItem: CellItem): Promise<string> {\r\n // istanbul ignore next\r\n if (!cellItem.record || cellItem.record.value.valueFormat !== PropertyValueFormat.Primitive)\r\n return \"\";\r\n\r\n const value = cellItem.record.value.value;\r\n\r\n if (value === undefined)\r\n return \"\";\r\n\r\n const displayValue = await TypeConverterManager\r\n .getConverter(cellItem.record.property.typename, cellItem.record.property.converter?.name)\r\n .convertPropertyToString(cellItem.record.property, value);\r\n\r\n return displayValue ? displayValue : /* istanbul ignore next */ \"\";\r\n }\r\n\r\n private async createPropsForRowItem(item: RowItem, index: number): Promise<RowProps> {\r\n const cellProps: { [key: string]: CellProps } = {};\r\n for (const column of this.state.columns) {\r\n const cellItem = this._getCellItem(item, column.key);\r\n const displayValue = await this.getCellDisplayValue(cellItem);\r\n cellProps[column.key] = {\r\n item: cellItem,\r\n displayValue,\r\n render: await this.renderCellContent(cellItem, column.reactDataGridColumn, displayValue),\r\n };\r\n }\r\n const rowStyle = TableRowStyleProvider.createStyle(item.colorOverrides ? item.colorOverrides : {});\r\n return {\r\n item,\r\n index,\r\n cells: cellProps,\r\n render: undefined,\r\n style: rowStyle,\r\n };\r\n }\r\n\r\n private async loadRows(beginIndex: number, endIndex: number): Promise<RowsLoadResult> {\r\n const result: RowsLoadResult = {\r\n rows: [],\r\n selectedRowIndices: [],\r\n selectedCellKeys: [],\r\n };\r\n this._rowLoadGuid = Guid.createValue();\r\n const currentSelectedRowGuid: GuidString = this._rowLoadGuid;\r\n\r\n const promises = new Array<Promise<RowProps>>();\r\n for (let i = beginIndex; i < endIndex; ++i) {\r\n promises.push(\r\n this.props.dataProvider.getRow(i).then(async (rowData) =>\r\n this.createPropsForRowItem(rowData, i).then((rowProps) => (rowProps)),\r\n ));\r\n }\r\n\r\n try {\r\n result.rows = await Promise.all(promises);\r\n } catch { }\r\n\r\n // Check if another loadRows got called while this one was still going\r\n if (currentSelectedRowGuid === this._rowLoadGuid) {\r\n for (const rowProps of result.rows) {\r\n if (this.props.isRowSelected && this.props.isRowSelected(rowProps.item))\r\n result.selectedRowIndices.push(rowProps.index);\r\n\r\n if (this.props.isCellSelected) {\r\n for (const column of this.state.columns) {\r\n const cellItem = this._getCellItem(rowProps.item, column.key);\r\n if (this.props.isCellSelected(rowProps.index, cellItem))\r\n result.selectedCellKeys.push({ rowIndex: rowProps.index, columnKey: column.key });\r\n }\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n private _handleGridSort = (columnKey: string, sortDirection: \"ASC\" | \"DESC\" | \"NONE\") => {\r\n let directionEnum: SortDirection;\r\n\r\n switch (sortDirection) {\r\n case \"ASC\":\r\n directionEnum = SortDirection.Ascending;\r\n break;\r\n case \"DESC\":\r\n directionEnum = SortDirection.Descending;\r\n break;\r\n case \"NONE\":\r\n default:\r\n directionEnum = SortDirection.NoSort;\r\n break;\r\n }\r\n\r\n // Sort the column\r\n this.gridSortAsync(columnKey, directionEnum); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n\r\n this._queuePokeScroll();\r\n };\r\n\r\n private getColumnIndexFromKey(columnKey: string): number {\r\n return this.state.columns.findIndex((column: TableColumn) => column.key === columnKey);\r\n }\r\n\r\n private async gridSortAsync(columnKey: string, directionEnum: SortDirection) {\r\n const columnIndex = this.getColumnIndexFromKey(columnKey);\r\n // istanbul ignore next\r\n if (columnIndex < 0)\r\n return;\r\n\r\n await this.props.dataProvider.sort(columnIndex, directionEnum);\r\n\r\n // istanbul ignore next\r\n if (!this._isMounted)\r\n return;\r\n\r\n this.updateRows(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }\r\n\r\n private createRowCells(rowProps: RowProps, isSelected: boolean): { [columnKey: string]: React.ReactNode } {\r\n const cells: { [columnKey: string]: React.ReactNode } = {};\r\n let gridColumns: HTMLElement[] = [];\r\n let foundHiddenColumns = 0;\r\n\r\n // istanbul ignore else\r\n if (this._gridRef.current && (this._gridRef.current as any).getDataGridDOMNode)\r\n gridColumns = (this._gridRef.current as any).getDataGridDOMNode().querySelectorAll(\".react-grid-HeaderCell\");\r\n\r\n for (let index = 0; index < this.state.columns.length; index++) {\r\n const column = this.state.columns[index];\r\n\r\n const cellProps = rowProps.cells[column.key];\r\n if (!cellProps) {\r\n continue;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n const CellContent = cellProps.render;\r\n const isEditorCell =\r\n this.state.cellEditorState.active\r\n && this.state.cellEditorState.rowIndex === rowProps.index\r\n && this.state.cellEditorState.colIndex === index\r\n && cellProps.item.record;\r\n\r\n let onClick: ((e: React.MouseEvent) => void) | undefined;\r\n let onMouseMove: ((e: React.MouseEvent) => void) | undefined;\r\n let onMouseDown: ((e: React.MouseEvent) => void) | undefined;\r\n let className: string | undefined;\r\n\r\n const cellKey = { rowIndex: rowProps.index, columnKey: column.key };\r\n if (this._tableSelectionTarget === TableSelectionTarget.Cell) {\r\n const selectionHandler = this.createCellItemSelectionHandler(cellKey);\r\n const selectionFunction = this._cellSelectionHandler.createSelectionFunction(this._cellComponentSelectionHandler, selectionHandler);\r\n onClick = (e: React.MouseEvent) => selectionFunction(e.shiftKey, e.ctrlKey);\r\n onMouseMove = (e: React.MouseEvent) => {\r\n // istanbul ignore else\r\n if (e.buttons === 1)\r\n this._cellSelectionHandler.updateDragAction(cellKey);\r\n };\r\n onMouseDown = () => {\r\n this._cellSelectionHandler.createDragAction(this._cellComponentSelectionHandler, this.cellItemSelectionHandlers, cellKey);\r\n };\r\n className = classnames({ \"is-selected\": this.isCellSelected(cellKey) });\r\n } else {\r\n if (this._selectedRowIndices.has(rowProps.index))\r\n className = classnames({ \"is-keyboard-editable\": this.state.keyboardEditorCellKey === column.key });\r\n }\r\n\r\n className = classnames(className, this.getCellBorderStyle(cellKey));\r\n const mergedAdjacentCellsCount = (cellProps.item.mergedCellsCount ?? 1) - 1;\r\n let cellWidth = 0;\r\n\r\n for (let i = 0; i <= mergedAdjacentCellsCount; i++) {\r\n const col = this.state.columns[index + i];\r\n if (this.state.hiddenColumns.indexOf(col.key) === -1) {\r\n const gridColumn = gridColumns[index + i - foundHiddenColumns];\r\n const gridColumnWidth = gridColumn ? gridColumn.getBoundingClientRect().width : 0;\r\n cellWidth += gridColumnWidth;\r\n } else {\r\n foundHiddenColumns++;\r\n }\r\n\r\n if (i > 0) {\r\n cells[col.key] = (\r\n <TableCell\r\n className={className.replace(\"border-bottom\", \"\")}\r\n title={\"empty-cell\"}\r\n onClick={onClick}\r\n onMouseMove={onMouseMove}\r\n onMouseDown={onMouseDown}\r\n >\r\n </TableCell>\r\n );\r\n }\r\n const mergedColumn = this.state.columns[index + i];\r\n const emptyCellKey = { rowIndex: rowProps.index, columnKey: mergedColumn.key };\r\n className = classnamesDedupe(className, this.getCellBorderStyle(emptyCellKey));\r\n }\r\n index += mergedAdjacentCellsCount;\r\n\r\n cells[column.key] = (\r\n <TableCell\r\n className={className}\r\n title={cellProps.displayValue}\r\n onClick={onClick}\r\n onMouseMove={onMouseMove}\r\n onMouseDown={onMouseDown}\r\n cellEditingProps={isEditorCell ? {\r\n onCancel: this._deactivateCellEditor,\r\n onCommit: this._onCellCommit,\r\n propertyRecord: cellProps.item.record!,\r\n setFocus: true,\r\n } : undefined}\r\n style={{ width: (mergedAdjacentCellsCount > 0) ? cellWidth : undefined }}\r\n >\r\n <CellContent isSelected={isSelected} />\r\n </TableCell>\r\n );\r\n }\r\n return cells;\r\n }\r\n\r\n private getCellBorderStyle(key: CellKey): string {\r\n const isCellSelected = (cellKey: CellKey): boolean => {\r\n if (this._tableSelectionTarget === TableSelectionTarget.Row) {\r\n return this._selectedRowIndices.has(cellKey.rowIndex);\r\n }\r\n\r\n return this.isCellSelected(cellKey);\r\n };\r\n\r\n const cellIsSelected = isCellSelected(key);\r\n const columnIndex = this.state.columns.findIndex((column) => key.columnKey === column.key);\r\n\r\n const isTopBorderVisible = (): boolean => {\r\n if (key.rowIndex === 0) {\r\n return cellIsSelected;\r\n }\r\n\r\n if (cellIsSelected) {\r\n return !isCellSelected({ rowIndex: key.rowIndex - 1, columnKey: key.columnKey });\r\n }\r\n\r\n // Bottom border is rendered by drawing the top border on the node below\r\n // Check if the node above needs its bottom border drawn\r\n return isCellSelected({ rowIndex: key.rowIndex - 1, columnKey: key.columnKey });\r\n };\r\n\r\n const isRightBorderVisible = (): boolean => {\r\n if (!cellIsSelected) {\r\n return false;\r\n }\r\n\r\n if (columnIndex === this.state.columns.length - 1) {\r\n return true;\r\n }\r\n\r\n return !isCellSelected({ rowIndex: key.rowIndex, columnKey: this.state.columns[columnIndex + 1].key });\r\n };\r\n\r\n const isBottomBorderVisible = (): boolean => {\r\n return cellIsSelected && key.rowIndex === this.state.rowsCount - 1;\r\n };\r\n\r\n const isLeftBorderVisible = (): boolean => {\r\n if (!cellIsSelected) {\r\n return false;\r\n }\r\n\r\n if (columnIndex === 0) {\r\n return true;\r\n }\r\n\r\n return !isCellSelected({ rowIndex: key.rowIndex, columnKey: this.state.columns[columnIndex - 1].key });\r\n };\r\n\r\n return classnames({\r\n \"border-top\": isTopBorderVisible(),\r\n \"border-right\": isRightBorderVisible(),\r\n \"border-bottom\": isBottomBorderVisible(),\r\n \"border-left\": isLeftBorderVisible(),\r\n });\r\n }\r\n\r\n private _createRowRenderer = () => {\r\n return (props: { row: RowProps, [k: string]: React.ReactNode }) => {\r\n // istanbul ignore next\r\n const renderRow = this.props.renderRow ? this.props.renderRow : this.renderRow;\r\n const { row: rowProps, ...reactDataGridRowProps } = props;\r\n if (this._tableSelectionTarget === TableSelectionTarget.Row) {\r\n const selectionFunction = this._rowSelectionHandler.createSelectionFunction(this._rowComponentSelectionHandler, this.createRowItemSelectionHandler(props.row.index));\r\n const onClick = (e: React.MouseEvent) => selectionFunction(e.shiftKey, e.ctrlKey);\r\n const onMouseDown = () => {\r\n this._rowSelectionHandler.createDragAction(this._rowComponentSelectionHandler, [this.rowItemSelectionHandlers], props.row.index);\r\n };\r\n const onMouseMove = (e: React.MouseEvent) => {\r\n // istanbul ignore else\r\n if (e.buttons === 1)\r\n this._rowSelectionHandler.updateDragAction(props.row.index);\r\n };\r\n const isSelected = this._selectedRowIndices.has(props.row.index);\r\n const cells = this.createRowCells(rowProps, isSelected);\r\n const row = renderRow(rowProps.item, { ...reactDataGridRowProps, cells, isSelected });\r\n return <div\r\n className={classnames(\"components-table-row\")}\r\n onClickCapture={onClick}\r\n onMouseMove={onMouseMove}\r\n onMouseDown={onMouseDown}\r\n style={props.row.style}\r\n role=\"presentation\">\r\n {row}\r\n </div>;\r\n } else {\r\n const cells = this.createRowCells(rowProps, false);\r\n return renderRow(rowProps.item, { ...reactDataGridRowProps, cells });\r\n }\r\n };\r\n };\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n private renderRow = (item: RowItem, props: TableRowProps): React.ReactNode => {\r\n return <TableRow key={item.key} {...props} />;\r\n };\r\n\r\n private _onMouseUp = () => {\r\n if (this._tableSelectionTarget === TableSelectionTarget.Row)\r\n this._rowSelectionHandler.completeDragAction();\r\n else\r\n this._cellSelectionHandler.completeDragAction();\r\n };\r\n\r\n private _onMouseDown = () => {\r\n document.addEventListener(\"mouseup\", this._onMouseUp, { capture: true, once: true });\r\n };\r\n\r\n private _onHeaderDrop = (source: string, target: string) => {\r\n const cols = [...this.state.columns];\r\n const columnSourceIndex = this.state.columns.findIndex((i) => i.key === source);\r\n const columnTargetIndex = this.state.columns.findIndex((i) => i.key === target);\r\n\r\n cols.splice(columnTargetIndex, 0, cols.splice(columnSourceIndex, 1)[0]);\r\n // istanbul ignore else\r\n if (this.props.settingsIdentifier) {\r\n const stateStorage: UiStateStorage = this.props.settingsStorage || /* istanbul ignore next */ new LocalStateStorage();\r\n const keys = cols.map((col) => col.key);\r\n stateStorage.saveSetting(this.props.settingsIdentifier, \"ColumnReorder\", keys); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }\r\n this.setState({ columns: [] }, () => { // fix react-data-grid update issues\r\n this.setState({ columns: cols });\r\n });\r\n };\r\n\r\n private cellEditOnClick(column: ReactDataGridColumn, _ev: React.SyntheticEvent<any>, args: ReactDataGridColumnEventArgs): void {\r\n // Prevent editing when property record is not primitive\r\n // istanbul ignore else\r\n if (this.state.rows[args.rowIdx]) {\r\n const record = this._getCellItem(this.state.rows[0].item, column.key).record;\r\n // istanbul ignore next\r\n if (record && record.value.valueFormat !== PropertyValueFormat.Primitive)\r\n return;\r\n }\r\n\r\n if (this.state.keyboardEditorCellKey !== column.key)\r\n this.setState({ keyboardEditorCellKey: column.key });\r\n\r\n let activate = false;\r\n\r\n if (this._pressedItemSelected)\r\n activate = true;\r\n\r\n if (activate)\r\n this.activateCellEditor(args.rowIdx, args.idx, column.key);\r\n else\r\n this._deactivateCellEditor();\r\n }\r\n\r\n private cellContextMenu(column: ReactDataGridColumn, e: React.SyntheticEvent<any>, args: ReactDataGridColumnEventArgs): void {\r\n // istanbul ignore else\r\n if (this.props.onCellContextMenu) {\r\n const contextMenuArgs: TableCellContextMenuArgs = {\r\n rowIndex: args.rowIdx,\r\n colIndex: args.idx,\r\n cellKey: column.key,\r\n event: e as unknown as React.MouseEvent,\r\n };\r\n\r\n // istanbul ignore else\r\n if (this.state.rows[args.rowIdx])\r\n contextMenuArgs.cellItem = this._getCellItem(this.state.rows[args.rowIdx].item, column.key);\r\n\r\n e.preventDefault();\r\n this.props.onCellContextMenu(contextMenuArgs);\r\n }\r\n }\r\n\r\n private activateCellEditor(rowIndex: number, colIndex: number, cellKey: string): void {\r\n const cellEditorState = { active: true, rowIndex, colIndex, cellKey };\r\n // istanbul ignore else\r\n if (cellEditorState !== this.state.cellEditorState) {\r\n this.setState(\r\n { cellEditorState },\r\n () => {\r\n // istanbul ignore else\r\n if (this.props.onPropertyEditing)\r\n this.props.onPropertyEditing(cellEditorState);\r\n },\r\n );\r\n }\r\n }\r\n\r\n private _deactivateCellEditor = (): void => {\r\n if (this.state.cellEditorState.active)\r\n this.setState({ cellEditorState: { active: false } }, () => setTimeout(() => this.setFocusToSelected()));\r\n };\r\n\r\n /** @internal */\r\n public override shouldComponentUpdate(_props: TableProps): boolean {\r\n return true;\r\n }\r\n\r\n private _onCellCommit = async (args: PropertyUpdatedArgs) => {\r\n // istanbul ignore else\r\n if (this.props.onPropertyUpdated) {\r\n const cellUpdatedArgs: TableCellUpdatedArgs = {\r\n rowIndex: this.state.cellEditorState.rowIndex!,\r\n colIndex: this.state.cellEditorState.colIndex!,\r\n cellKey: this.state.cellEditorState.cellKey!,\r\n };\r\n const allowed = await this.props.onPropertyUpdated(args, cellUpdatedArgs);\r\n // istanbul ignore else\r\n if (allowed && this.state.cellEditorState.rowIndex !== undefined && this.state.cellEditorState.rowIndex >= 0) {\r\n this._deactivateCellEditor();\r\n await this.updateRows();\r\n } else {\r\n this._deactivateCellEditor();\r\n }\r\n }\r\n };\r\n\r\n private _getVisibleColumns = (): ReactDataGridColumn[] => {\r\n return this.state.columns\r\n .filter((tableColumn: TableColumn) => this.state.hiddenColumns.indexOf(tableColumn.key) === -1)\r\n .map((tableColumn: TableColumn) => tableColumn.reactDataGridColumn);\r\n };\r\n\r\n private _handleShowHideContextMenu = (e: React.MouseEvent) => {\r\n const header = e.currentTarget.querySelector(\".react-grid-Header\");\r\n // istanbul ignore else\r\n if (header) {\r\n const headerRect = header.getBoundingClientRect();\r\n const offsetY = headerRect.top;\r\n const height = headerRect.height;\r\n const x = e.clientX, y = e.clientY;\r\n // istanbul ignore else\r\n if (y < offsetY + height) {\r\n e.preventDefault();\r\n this.setState({\r\n menuX: x, menuY: y,\r\n menuVisible: true,\r\n });\r\n }\r\n }\r\n };\r\n\r\n private _hideContextMenu = () => {\r\n // istanbul ignore else\r\n if (this.props.showHideColumns)\r\n this.setState({ menuVisible: false });\r\n };\r\n\r\n // istanbul ignore next\r\n private _handleShowHideChange = (cols: string[]) => {\r\n this.setState({ hiddenColumns: cols });\r\n if (this.props.settingsIdentifier) {\r\n const stateStorage: UiStateStorage = this.props.settingsStorage || new LocalStateStorage();\r\n stateStorage.saveSetting(this.props.settingsIdentifier, \"ColumnShowHideHiddenColumns\", cols); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n }\r\n return true;\r\n };\r\n\r\n // istanbul ignore next\r\n private _onDialogOpen = (dialogState: PropertyDialogState) => this.setState({ dialog: dialogState });\r\n\r\n // istanbul ignore next\r\n private _onDialogClose = () => this.setState({ dialog: undefined });\r\n\r\n private _isShowFilterRow(): boolean {\r\n return this.state.columns.some((tableColumn: TableColumn) => tableColumn.filterable);\r\n }\r\n\r\n /** Turn on/off filter row */\r\n private toggleFilterRow(showFilter: boolean): void {\r\n // istanbul ignore else\r\n if (this._gridRef.current) {\r\n const grid = this._gridRef.current as any;\r\n // istanbul ignore else\r\n if (grid.onToggleFilter && showFilter !== this._filterRowShown) {\r\n grid.onToggleFilter();\r\n\r\n this._filterRowShown = showFilter;\r\n }\r\n }\r\n }\r\n\r\n /** Gets the filter descriptors for the table.\r\n * @internal\r\n */\r\n public get filterDescriptors(): CompositeFilterDescriptorCollection {\r\n if (undefined === this._filterDescriptors) {\r\n this._filterDescriptors = new TableFilterDescriptorCollection();\r\n this._filterDescriptors.logicalOperator = FilterCompositionLogicalOperator.And;\r\n }\r\n\r\n return this._filterDescriptors;\r\n }\r\n\r\n /** Gets ECExpression to get property display value.\r\n * @internal\r\n */\r\n // istanbul ignore next\r\n public getPropertyDisplayValueExpression(property: string): string {\r\n if (this.props.dataProvider.getPropertyDisplayValueExpression !== undefined)\r\n return this.props.dataProvider.getPropertyDisplayValueExpression(property);\r\n return property;\r\n }\r\n\r\n private _handleFilterChange = (filter: ReactDataGridFilter): void => {\r\n const columnKey = filter.column.key;\r\n const tableColumn = this.state.columns.find((column: TableColumn) => column.key === columnKey);\r\n\r\n // istanbul ignore else\r\n if (tableColumn) {\r\n setTimeout(async () => {\r\n await DataGridFilterParser.handleFilterChange(filter, tableColumn.columnFilterDescriptor, tableColumn.columnDescription, this._applyFilter);\r\n });\r\n }\r\n };\r\n\r\n // istanbul ignore next\r\n private _handleOnClearFilters = () => {\r\n this.filterDescriptors.clear();\r\n\r\n this._applyFilter(); // eslint-disable-line @typescript-eslint/no-floating-promises\r\n };\r\n\r\n private _applyFilter = async (): Promise<void> => {\r\n // istanbul ignore else\r\n if (this.props.dataProvider.applyFilterDescriptors) {\r\n await this.props.dataProvider.applyFilterDescriptors(this.filterDescriptors);\r\n await this.updateRows();\r\n\r\n // istanbul ignore else\r\n if (this.props.onApplyFilter)\r\n this.props.onApplyFilter();\r\n }\r\n };\r\n\r\n // istanbul ignore next\r\n private _getValidFilterValues = (columnKey: string): any[] => {\r\n const tableColumn = this.state.columns.find((column: TableColumn) => column.reactDataGridColumn.key === columnKey);\r\n if (tableColumn && tableColumn.distinctValueCollection) {\r\n return tableColumn.distinctValueCollection.values;\r\n }\r\n return [];\r\n };\r\n\r\n // TODO: Enable, when table gets refactored. Explanation in ./../table/NonPrimitiveValueRenderer\r\n // private _onPopupShow = (popupState: PropertyPopupState) => this.setState({ popup: popupState });\r\n\r\n // private _onPopupHide = () => this.setState({ popup: undefined });\r\n\r\n // istanbul ignore next\r\n private _onScroll = (scrollData: ScrollState) => {\r\n this._topRowIndex = scrollData.rowVisibleStartIdx;\r\n if (this.props.onScrollToRow)\r\n this.props.onScrollToRow(scrollData.rowVisibleStartIdx);\r\n };\r\n\r\n /** Determines if focus is in an input element - for filter checking */\r\n private isFocusOnInputElement(): boolean {\r\n const element: HTMLElement = document.activeElement as HTMLElement;\r\n return element &&\r\n (element instanceof HTMLInputElement ||\r\n element instanceof HTMLSelectElement ||\r\n element instanceof HTMLTextAreaElement);\r\n }\r\n\r\n private _onKeyboardEvent = (e: React.KeyboardEvent, keyDown: boolean) => {\r\n if (isNavigationKey(e.key) && !this.state.cellEditorState.active && !this.isFocusOnInputElement()) {\r\n if (this._tableSelectionTarget === TableSelectionTarget.Row) {\r\n const handleKeyboardSelectItem = (index: number) => {\r\n const selectionFunction = this._rowSelectionHandler.createSelectionFunction(this._rowComponentSelectionHandler, this.createRowItemSelectionHandler(index));\r\n selectionFunction(e.shiftKey, e.ctrlKey);\r\n };\r\n\r\n const handleKeyboardActivateItem = (index: number) => {\r\n // istanbul ignore else\r\n if (this.state.keyboardEditorCellKey) {\r\n const columnIndex = this.getColumnIndexFromKey(this.state.keyboardEditorCellKey);\r\n // istanbul ignore else\r\n if (0 <= columnIndex && columnIndex < this.state.columns.length) {\r\n const columnDescription = this.state.columns[columnIndex].columnDescription;\r\n // istanbul ignore else\r\n if (columnDescription && columnDescription.editable)\r\n this.activateCellEditor(index, columnIndex, this.state.keyboardEditorCellKey);\r\n }\r\n\r\n }\r\n };\r\n\r\n const handleCrossAxisArrowKey = (forward: boolean) => {\r\n // istanbul ignore else\r\n if (this.state.keyboardEditorCellKey) {\r\n let newEditorCellKey: string | undefined;\r\n const columnIndex = this.getColumnIndexFromKey(this.state.keyboardEditorCellKey);\r\n\r\n // istanbul ignore else\r\n if (columnIndex >= 0) {\r\n let newColIndex = columnIndex;\r\n\r\n while (!newEditorCellKey) {\r\n if (forward)\r\n newColIndex++;\r\n else\r\n newColIndex--;\r\n\r\n if (newColIndex < 0)\r\n newColIndex = this.state.columns.length - 1;\r\n else if (newColIndex >= this.state.columns.length)\r\n newColIndex = 0;\r\n\r\n // istanbul ignore next\r\n if (newColIndex === columnIndex)\r\n break;\r\n\r\n const isEditable = this.state.columns[newColIndex].columnDescription.editable;\r\n if (isEditable)\r\n newEditorCellKey = this.state.columns[newColIndex].key;\r\n }\r\n\r\n // istanbul ignore else\r\n if (newEditorCellKey)\r\n this.setState({ keyboardEditorCellKey: newEditorCellKey });\r\n }\r\n }\r\n };\r\n\r\n const itemKeyboardNavigator = new ItemKeyboardNavigator(handleKeyboardSelectItem, handleKeyboardActivateItem);\r\n itemKeyboardNavigator.orientation = Orientation.Vertical;\r\n itemKeyboardNavigator.allowWrap = false;\r\n itemKeyboardNavigator.itemCount = this.state.rowsCount;\r\n itemKeyboardNavigator.crossAxisArrowKeyHandler = handleCrossAxisArrowKey;\r\n\r\n const processedRow = this._rowSelectionHandler.processedItem ? this._rowSelectionHandler.processedItem /* istanbul ignore next */ : 0;\r\n keyDown ?\r\n itemKeyboardNavigator.handleKeyDownEvent(e, processedRow) :\r\n itemKeyboardNavigator.handleKeyUpEvent(e, processedRow);\r\n } else {\r\n const handleKeyboardSelectItem = (index: number) => {\r\n const processedCell = this._cellSelectionHandler.processedItem;\r\n // istanbul ignore else\r\n if (processedCell) {\r\n const cellKey = { rowIndex: index, columnKey: processedCell.columnKey };\r\n const selectionHandler = this.createCellItemSelectionHandler(cellKey);\r\n const selectionFunction = this._cellSelectionHandler.createSelectionFunction(this._cellComponentSelectionHandler, selectionHandler);\r\n selectionFunction(e.shiftKey, e.ctrlKey);\r\n }\r\n };\r\n\r\n const handleKeyboardActivateItem = (index: number) => {\r\n const processedCell = this._cellSelectionHandler.processedItem;\r\n // istanbul ignore else\r\n if (processedCell) {\r\n const columnIndex = this.getColumnIndexFromKey(processedCell.columnKey);\r\n // istanbul ignore else\r\n if (0 <= columnIndex && columnIndex < this.state.columns.length) {\r\n const columnDescription = this.state.columns[columnIndex].columnDescription;\r\n // istanbul ignore else\r\n if (columnDescription && columnDescription.editable)\r\n this.activateCellEditor(index, columnIndex, processedCell.columnKey);\r\n }\r\n }\r\n };\r\n\r\n const handleCrossAxisArrowKey = (forward: boolean) => {\r\n const processedCell = this._cellSelectionHandler.processedItem;\r\n // istanbul ignore else\r\n if (processedCell) {\r\n const columnIndex = this.getColumnIndexFromKey(processedCell.columnKey);\r\n // istanbul ignore else\r\n if (columnIndex >= 0) {\r\n let newColIndex = columnIndex;\r\n\r\n if (forward)\r\n newColIndex++;\r\n else\r\n newColIndex--;\r\n\r\n if (newColIndex < 0)\r\n newColIndex = this.state.columns.length - 1;\r\n else if (newColIndex >= this.state.columns.length)\r\n newColIndex = 0;\r\n\r\n const columnKey = this.state.columns[newColIndex].key;\r\n const cellKey = { rowIndex: processedCell.rowIndex, columnKey };\r\n const selectionHandler = this.createCellItemSelectionHandler(cellKey);\r\n const selectionFunction = this._cellSelectionHandler.createSelectionFunction(this._cellComponentSelectionHandler, selectionHandler);\r\n selectionFunction(e.shiftKey, e.ctrlKey);\r\n }\r\n }\r\n };\r\n\r\n const itemKeyboardNavigator = new ItemKeyboardNavigator(handleKeyboardSelectItem, handleKeyboardActivateItem);\r\n itemKeyboardNavigator.orientation = Orientation.Vertical;\r\n itemKeyboardNavigator.allowWrap = false;\r\n itemKeyboardNavigator.itemCount = this.state.rowsCount;\r\n itemKeyboardNavigator.crossAxisArrowKeyHandler = handleCrossAxisArrowKey;\r\n\r\n const processedRow = this._cellSelectionHandler.processedItem ? this._cellSelectionHandler.processedItem.rowIndex : /* istanbul ignore next */ 0;\r\n keyDown ?\r\n itemKeyboardNavigator.handleKeyDownEvent(e, processedRow) :\r\n itemKeyboardNavigator.handleKeyUpEvent(e, processedRow);\r\n }\r\n }\r\n };\r\n\r\n private _onKeyDown = (e: React.KeyboardEvent) => this._onKeyboardEvent(e, true);\r\n private _onKeyUp = (e: React.KeyboardEvent) => this._onKeyboardEvent(e, false);\r\n\r\n /** @internal */\r\n public override render() {\r\n const rowRenderer = <TableRowRenderer rowRendererCreator={() => this._createRowRenderer()} />;\r\n\r\n const visibleColumns = this._getVisibleColumns();\r\n const tableClassName = classnames(\r\n \"components-table\",\r\n \"components-smallEditor-host\",\r\n this.props.className,\r\n {\r\n \"hide-header\": this.props.hideHeader,\r\n \"striped-rows\": this.props.stripedRows,\r\n \"row-selection\": this._tableSelectionTarget === TableSelectionTarget.Row,\r\n \"cell-selection\": this._tableSelectionTarget === TableSelectionTarget.Cell,\r\n },\r\n );\r\n\r\n return (\r\n <>\r\n <div className={tableClassName} style={this.props.style}\r\n onMouseDown={this._onMouseDown}\r\n onContextMenu={this.props.showHideColumns ? this._handleShowHideContextMenu : undefined}\r\n onKeyDown={this._onKeyDown}\r\n onKeyUp={this._onKeyUp}\r\n role=\"presentation\"\r\n >\r\n {this.props.showHideColumns &&\r\n <ShowHideMenu\r\n opened={this.state.menuVisible}\r\n items={this.state.columns.map((column) => ({ id: column.key, label: column.reactDataGridColumn.name }))}\r\n x={this.state.menuX} y={this.state.menuY}\r\n initialHidden={this.state.hiddenColumns}\r\n onClose={this._hideContextMenu}\r\n onShowHideChange={this._handleShowHideChange} />\r\n }\r\n <ElementResizeObserver watchedElement={this.state.gridContainer}\r\n render={({ width, height }) => {\r\n setTimeout(() => this._queuePokeScroll());\r\n return (\r\n <ReactDataGrid\r\n ref={this._gridRef}\r\n columns={visibleColumns}\r\n rowGetter={this._rowGetter}\r\n rowRenderer={rowRenderer}\r\n rowsCount={this.state.rowsCount}\r\n {...(this.props.reorderableColumns ? {\r\n draggableHeaderCell: DragDropHeaderCell,\r\n onHeaderDrop: this._onHeaderDrop,\r\n } as any : {})}\r\n minHeight={height}\r\n minWidth={width}\r\n headerRowHeight={TABLE_ROW_HEIGHT}\r\n rowHeight={TABLE_ROW_HEIGHT}\r\n onGridSort={this._handleGridSort}\r\n enableRowSelect={null} // Prevent deprecation warning\r\n onAddFilter={this._handleFilterChange}\r\n onClearFilters={this._handleOnClearFilters} // eslint-disable-line @typescript-eslint/unbound-method\r\n headerFiltersHeight={TABLE_FILTER_ROW_HEIGHT}\r\n getValidFilterValues={this._getValidFilterValues}\r\n onScroll={this._onScroll}\r\n />\r\n );\r\n }}\r\n />\r\n </div>\r\n <div ref={this._tableRef}>\r\n {this.state.dialog\r\n ?\r\n // istanbul ignore next\r\n <Dialog\r\n opened={true}\r\n onClose={this._onDialogClose}\r\n title={this.state.dialog.title}\r\n height={\"50vh\"}\r\n >\r\n {this.state.dialog.content}\r\n </Dialog>\r\n : undefined}\r\n {/* TODO: Enable, when table gets refactored. Explanation in ./../../properties/renderers/value/table/NonPrimitiveValueRenderer */}\r\n {/* {this.state.popup\r\n ?\r\n <Popup\r\n isShown={true}\r\n fixedPosition={this.state.popup.fixedPosition}\r\n position={Position.Top}\r\n >\r\n {this.state.popup.content}\r\n </Popup>\r\n :\r\n undefined} */}\r\n </div>\r\n </>\r\n );\r\n }\r\n}\r\n\r\n/**\r\n * Props for the [[TableRow]] component\r\n * @internal\r\n */\r\nexport interface TableRowProps extends CommonProps {\r\n cells: { [key: string]: React.ReactNode };\r\n isSelected?: boolean;\r\n}\r\n\r\n/**\r\n * Default component for rendering a row for the Table\r\n * @internal\r\n */\r\nexport class TableRow extends React.Component<TableRowProps> {\r\n\r\n /** @internal */\r\n public override render() {\r\n const { cells, isSelected, ...props } = this.props;\r\n return (\r\n <ReactDataGrid.Row {...props} row={cells} isSelected={isSelected} />\r\n );\r\n }\r\n}\r\n"]}