d2coreui 23.0.59 → 23.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/README.md +1 -1
- package/components/date/dateTimeInput.d.ts +4 -9
- package/components/date/dateTimeInput.js +19 -34
- package/components/date/dateTimeInput.js.map +1 -1
- package/components/date/durationInput.js +6 -6
- package/components/date/durationInput.js.map +1 -1
- package/components/grid/dataGrid.d.ts +34 -1
- package/components/grid/dataGrid.js +93 -59
- package/components/grid/dataGrid.js.map +1 -1
- package/components/grid/export/contextMenu.d.ts +13 -3
- package/components/grid/export/contextMenu.js +69 -31
- package/components/grid/export/contextMenu.js.map +1 -1
- package/components/grid/export/worker/csvExport.js +3 -1
- package/components/grid/export/worker/csvExport.js.map +1 -1
- package/components/grid/extendedDataGrid.d.ts +21 -4
- package/components/grid/extendedDataGrid.js +21 -3
- package/components/grid/extendedDataGrid.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataGrid.js","sourceRoot":"","sources":["../../../../components/grid/dataGrid.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAC,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChN,OAAO,EAAC,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,EAA+B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,MAAM,CAAC;AACvH,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,+CAA+C,CAAA;AACtD,OAAO,gBAAgB,MAAM,kDAAkD,CAAA;AAC/E,OAAO,kBAAkB,MAAM,oDAAoD,CA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K,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC;IACpC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC;IAEvC,+DAA+D;IAC/D,IAAI,OAAO,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAEvC,4DAA4D;IAC5D,OAAO,CACH,QAAQ,CAAC,YAAY,KAAK,SAAS,CAAC,YAAY;QAChD,QAAQ,CAAC,gBAAgB,KAAK,SAAS,CAAC,gBAAgB;QACxD,QAAQ,CAAC,YAAY,KAAK,SAAS,CAAC,YAAY;QAChD,QAAQ,CAAC,SAAS,KAAK,SAAS,CAAC,SAAS;QAC1C,QAAQ,CAAC,mBAAmB,KAAK,SAAS,CAAC,mBAAmB;QAC9D,QAAQ,CAAC,kBAAkB,KAAK,SAAS,CAAC,kBAAkB;QAC5D,QAAQ,CAAC,WAAW,KAAK,SAAS,CAAC,WAAW;QAC9C,QAAQ,CAAC,cAAc,KAAK,SAAS,CAAC,cAAc,CACvD,CAAC;AACN,CAAC","sourcesContent":["import React, {ReactElement} from \"react\";\r\n\r\nimport {ColumnWidthOutlined, ControlOutlined, DownloadOutlined, EllipsisOutlined, FileSearchOutlined, LoadingOutlined, ReloadOutlined, SearchOutlined, SettingOutlined, TableOutlined} from \"@ant-design/icons\";\r\nimport {Button, Card, ConfigProvider, Dropdown, Empty, MappingAlgorithm, MenuProps, Popover, Space, theme} from \"antd\";\r\nimport {AgGridReact} from \"ag-grid-react\";\r\nimport 'd2coreui/style/ag-grid/aggrid-adaptations.css'\r\nimport TextColumnFilter from \"d2coreui/components/grid/filter/textColumnFilter\"\r\nimport CustomColumnFilter from \"d2coreui/components/grid/filter/customColumnFilter\"\r\nimport SimpleHeader from \"d2coreui/components/grid/header/simpleHeader\"\r\nimport DataGridEditor from \"d2coreui/components/grid/config/dataGridEditor\";\r\nimport i18n from \"d2core/i18n/i18n\";\r\nimport AutoCompleteInput from \"d2coreui/components/input/autoCompleteInput\";\r\nimport isEqual from \"lodash/isEqual\"\r\nimport getContextMenu, {ContextMenuProps, PageOrientation} from \"d2coreui/components/grid/export/contextMenu\";\r\nimport LoadingOverlay from \"d2coreui/components/grid/panel/loadingOverlay\";\r\nimport NoRecordsOverlay from \"d2coreui/components/grid/panel/noRecordsOverlay\";\r\nimport at from \"lodash/at\"\r\nimport ColumnTransfer from \"d2coreui/components/grid/config/columnTransfer\";\r\nimport {ColumnUtils} from \"d2coreui/components/grid/columnUtils\";\r\nimport cloneDeep from \"lodash/cloneDeep\";\r\nimport {RangeSelector} from \"d2coreui/components/grid/cell/rangeSelector\";\r\nimport {CellControl} from \"d2coreui/components/grid/cell/cellControl\";\r\nimport {\r\n _ModuleWithoutApi,\r\n AllCommunityModule,\r\n CellClassParams,\r\n CellContextMenuEvent,\r\n CellFocusedEvent,\r\n CellMouseDownEvent,\r\n CellMouseOverEvent,\r\n CellPosition,\r\n ColDef,\r\n ColTypeDef,\r\n ColGroupDef,\r\n Column,\r\n ColumnEvent,\r\n NewColumnsLoadedEvent,\r\n ColumnState,\r\n FilterChangedEvent,\r\n FilterModifiedEvent,\r\n GetQuickFilterTextParams,\r\n GetRowIdParams,\r\n GridApi,\r\n GridOptions,\r\n GridReadyEvent,\r\n ICellRendererParams,\r\n IRowNode,\r\n ModuleRegistry,\r\n NavigateToNextCellParams,\r\n PaginationChangedEvent,\r\n provideGlobalGridOptions,\r\n RowClassParams,\r\n RowDataUpdatedEvent,\r\n RowNode,\r\n RowPinnedType, RowSelectionOptions,\r\n RowStyle,\r\n SortChangedEvent,\r\n SuppressKeyboardEventParams,\r\n ValueFormatterParams,\r\n ValueGetterParams,\r\n ViewportChangedEvent\r\n} from \"ag-grid-community\";\r\nimport {LocaleHolder, UtcOffsetMode} from \"d2core/i18n/localeHolder\";\r\nimport tableDefaultRowStyleRules, {GridRowStyle, RowStyleRule} from \"d2coreui/components/grid/cell/tableDefaultRowStyleRules\";\r\nimport {ModalDialog, ModalDialogMode} from \"d2coreui/components/modal/modalDialog\";\r\nimport debounce from \"lodash/debounce\";\r\nimport {Key} from \"ts-key-enum\";\r\nimport {ClipboardUtils} from \"d2coreui/components/clipboard/clipboardUtils\";\r\nimport ProgressPopup from \"d2coreui/components/grid/export/progressPopup\";\r\nimport TimeUtils from \"d2core/utils/timeUtils\";\r\nimport KeyboardUtils from \"d2coreui/components/keyboard/keyboardUtils\";\r\nimport NumberCellEditor from \"d2coreui/components/grid/cell/numberCellEditor\";\r\nimport BigNumberCellEditor from \"d2coreui/components/grid/cell/bigNumberCellEditor\";\r\nimport TextCellEditor from \"d2coreui/components/grid/cell/textCellEditor\";\r\nimport StatusTextCellEditor from \"d2coreui/components/grid/cell/statusTextCellEditor\";\r\nimport DateCellEditor from \"d2coreui/components/grid/cell/dateCellEditor\";\r\nimport memoizeOne from \"memoize-one\";\r\nimport SimpleStatusTextCellEditor from \"d2coreui/components/grid/cell/simpleStatusTextCellEditor\";\r\nimport DurationCellEditor from \"d2coreui/components/grid/cell/durationCellEditor\";\r\nimport CustomEnumCellEditor from \"d2coreui/components/grid/cell/customEnumCellEditor\";\r\nimport HexaValueCellEditor from \"d2coreui/components/grid/cell/hexaValueCellEditor\";\r\nimport HexaOctetStringCellEditor from \"d2coreui/components/grid/cell/hexaOctetStringCellEditor\";\r\nimport {D2000UnixTimeNullValue, unixTimeToMoment} from \"d2core/types/unixTimeUtils\";\r\nimport {compileExpression} from \"filtrex\";\r\nimport DataGridPagination from \"./panel/dataGridPagination\";\r\nimport {calculateLineHeight, calculateRowHeight, getFontSize, getLineHeight, getRowHeightDelta, GRID_DEFAULT_FONT_SIZE, GRID_DEFAULT_ROW_HEIGHT_DELTA} from \"./config/rowHeightCalculator\";\r\nimport BeanAccessor, {GridApiWithPrivateAccess} from \"./cell/beanAccessor\";\r\nimport WildcardQuickFilterEngine from \"./filter/wildcardQuickFilterEngine\";\r\nimport {colorSchemeDark, themeBalham} from \"ag-grid-community\";\r\nimport {AliasToken} from \"antd/es/theme/interface\";\r\nimport WithCss, {WithCssInjectedProps} from \"../style/withCss\";\r\nimport {createStyles} from \"antd-style\";\r\n\r\ndeclare module \"antd/es/theme/interface/alias\" {\r\n interface AliasToken {\r\n /**\r\n * Background of the odd rows of `DataGrid` / `ExtendedDataGrid` with the default theme, set through\r\n * `ConfigProvider` `theme.token`. Unset, odd rows have `colorBgContainer` like the even ones (no striping).\r\n */\r\n gridOddRowBg?: string\r\n }\r\n}\r\n\r\nconst useStyles = createStyles(({css, token}, props?: WithCssInjectedProps) => {\r\n const controlHeight = {small: token.controlHeightSM, middle: token.controlHeight, large: token.controlHeightLG}[props?.size ?? \"middle\"];\r\n\r\n return {\r\n baseLayout: css`\r\n width: 100%;\r\n height: 100%;\r\n `,\r\n // as high as a toolbar button, so that the text is in the middle of the toolbar line\r\n recordRange: css`\r\n line-height: ${controlHeight}px;\r\n `\r\n }\r\n});\r\n\r\nconst gridFrameworkComponents = {\r\n customColumnFilter: CustomColumnFilter,\r\n textColumnFilter: TextColumnFilter,\r\n numberCellEditor: NumberCellEditor,\r\n bigNumberCellEditor: BigNumberCellEditor,\r\n textCellEditor: TextCellEditor,\r\n simpleStatusTextCellEditor: SimpleStatusTextCellEditor,\r\n statusTextCellEditor: StatusTextCellEditor,\r\n dateCellEditor: DateCellEditor,\r\n durationCellEditor: DurationCellEditor,\r\n customEnumCellEditor: CustomEnumCellEditor,\r\n hexaValueCellEditor: HexaValueCellEditor,\r\n hexaOctetStringCellEditor: HexaOctetStringCellEditor,\r\n simpleHeader: SimpleHeader,\r\n loadingOverlay: LoadingOverlay,\r\n noRecordsOverlay: NoRecordsOverlay\r\n};\r\n\r\nconst DataGridModule: _ModuleWithoutApi = {\r\n version: \"34.3.1\",\r\n // @ts-ignore\r\n moduleName: `dataGridModule`,\r\n beans: [RangeSelector, CellControl, BeanAccessor],\r\n dependantModules: [],\r\n}\r\n\r\nModuleRegistry.registerModules([AllCommunityModule, DataGridModule]);\r\n\r\nfunction getRowId(item: GetRowIdParams): string {\r\n return item.data.id + \"\";\r\n}\r\n\r\nprovideGlobalGridOptions({\r\n theme: \"legacy\"\r\n})\r\n\r\nconst rowStyleRuleCompiledExpressions: { [key: string]: (parameters: any) => any } = {};\r\n\r\n/**\r\n * Separator for joining several parts into one cell value (e.g. name and status).\r\n * When a string cell value contains it (after the first character), clipboard copy of several rows and export\r\n * replace every run of line breaks with a single space; copying a single focused cell keeps the line breaks.\r\n */\r\nexport const EXPORT_SEPARATOR = \"\\n\";\r\n\r\n/** A single (non-null) antd menu item as used by the export, settings and context menus of {@link DataGrid}. */\r\nexport type MenuElement = Exclude<Exclude<MenuProps[\"items\"], undefined>[number], null>;\r\n\r\nconst enum NavigationEventEnum {\r\n KEYBOARD,\r\n MOUSE\r\n}\r\n\r\n/**\r\n * ag-grid's `viewportChanged` event enriched by {@link DataGrid}. The object passed to\r\n * `DataGridProps.onViewportChanged` is actually of this type (cast it to read the extra field).\r\n */\r\nexport interface DataGridViewportChangedEvent extends ViewportChangedEvent {\r\n /**\r\n * Number of rows the last displayed row moved by since the previous viewport change: negative when\r\n * scrolled/paged backwards (towards the first record), positive when forwards (towards the last record).\r\n * On the first event it equals the number of displayed rows (`lastRow + 1`).\r\n */\r\n rowsScrollingDelta: number\r\n}\r\n\r\n/** Sort direction of a column. */\r\nexport type SortMode = \"asc\" | \"desc\"\r\n\r\n/**\r\n * Sorting of one column. A sort model is an array of these, ordered by sort priority\r\n * (see {@link DataGrid.getSortModel} and {@link DataGrid.setSortModel}).\r\n */\r\nexport interface SortItem {\r\n /** Column id (`ColDef.colId`). */\r\n colId: string;\r\n /** Sort direction. */\r\n sort: SortMode;\r\n}\r\n\r\n/**\r\n * Renders a custom floating filter for a column (see {@link DataGridColDef.renderFilter}).\r\n * @param value - current filter text (empty string when no filter is set)\r\n * @param changeValue - updates the filter text in the ag-grid filter model without applying it\r\n * @param onSearch - applies the current filter text (use e.g. on Enter)\r\n * @returns the filter UI rendered beneath the column header\r\n */\r\nexport type FilterRenderer = (value: string, changeValue: (newValue: string) => void, onSearch: () => void) => React.ReactNode\r\n\r\n/*\r\n * Extended table column definition\r\n */\r\n/**\r\n * Column definition accepted by {@link DataGrid}: an ag-grid `ColDef` with a few extra fields.\r\n *\r\n * Unless `DataGridProps.disableColumnDefsPreprocessing` is set, DataGrid adapts every definition: it makes the column\r\n * resizable, uses the built-in `simpleHeader` header component (column menu with pin/autosize/hide/reset/columns\r\n * configuration), enables the floating filter only when the column (or one of its `type`s) defines one and the column\r\n * search is visible, and takes `hide` from the current column state when the column is already known.\r\n * ag-grid's `lockVisible` is honoured by the grid's own column menu and columns configuration dialog.\r\n *\r\n * Besides ag-grid's own, these values can be used in `type`: `numberColumn` (localized number, fraction digits from\r\n * `cellRendererParams.fractionDigits`), `dateColumn`, `dateTimeColumn`, `fromNowDateTimeColumn` (D2000 unix time values,\r\n * formatted according to `hideYear`/`showMilliseconds`/`showUtcOffset`), `localizedArrayColumn` (array of i18n keys),\r\n * `escapedValueColumn` (line breaks shown as spaces), `alignRight`, and the filter types `textColumnFilter`\r\n * (client-side text filter), `textColumnServerFilter` and `customColumnServerFilter` (filter applied explicitly, the latter\r\n * rendered by {@link DataGridColDef.renderFilter}). Text filters are case-insensitive and `contains` supports `*` and `?` wildcards.\r\n */\r\nexport interface DataGridColDef extends Omit<ColDef, \"cellStyle\"> {\r\n /** Localized name of the column group; columns are grouped by it in the columns configuration dialog. */\r\n group: string\r\n /** Arbitrary user data attached to the column definition. */\r\n context?: any\r\n\r\n /**\r\n * Cell style (object or function), like ag-grid's `cellStyle` but a function may return `undefined`.\r\n * It is merged over the grid's own cell style (font size, right alignment).\r\n */\r\n cellStyle?: { [cssProperty: string]: string | number | null } | ((cellClassParams: CellClassParams) => {\r\n [cssProperty: string]: string | number | null\r\n } | undefined);\r\n\r\n\r\n /** Custom floating filter renderer; used by columns of type `customColumnServerFilter`. */\r\n renderFilter?: FilterRenderer\r\n}\r\n\r\n/**\r\n * Column group of {@link DataGrid}: a common header above its children, which are adapted like top-level columns.\r\n * Not to be confused with {@link DataGridColDef.group}, which is the column's category in the columns configuration dialog.\r\n */\r\nexport interface DataGridColGroupDef extends Omit<ColGroupDef, \"children\"> {\r\n children: (DataGridColDef | DataGridColGroupDef)[]\r\n}\r\n\r\n// removal of console warnings of our properties\r\n// COL_DEF_VALIDATORS.allProperties?.push(\"group\", \"context\", \"cellStyle\", \"renderFilter\");\r\n\r\n\r\n/** Column (floating) filter configuration of {@link DataGrid}, see `DataGridProps.filter`. */\r\nexport interface DataGridFilterProps {\r\n /**\r\n * Whether the floating filters beneath the column headers are visible (controlled). Hiding them clears the\r\n * filter model. While visible, the search box is disabled.\r\n */\r\n columnSearchVisible?: boolean\r\n /** Called when the user toggles the column filter in the settings menu; update `columnSearchVisible` in response. */\r\n onColumnSearchVisible?: (visible: boolean) => void\r\n\r\n /**\r\n * Returns the ag-grid filter model to apply. It is re-applied whenever the `rowData` prop changes and when the\r\n * column filter is toggled, so filters stay pre-filled (e.g. from the search box).\r\n */\r\n getFilterModel?(): any\r\n\r\n /** Forwarded ag-grid `filterChanged` event (a filter was applied, e.g. Enter in a floating filter). */\r\n onFilterChanged?(event: FilterChangedEvent): void;\r\n\r\n /** Forwarded ag-grid `filterModified` event (a filter value was edited but not necessarily applied). */\r\n onFilterModified?(event: FilterModifiedEvent): void;\r\n\r\n /** Called when Enter is pressed in a text floating filter. */\r\n onFilterConfirmed?(): void\r\n}\r\n\r\n/** Search box and search button configuration of the {@link DataGrid} toolbar, see `DataGridProps.search`. */\r\nexport interface DataGridSearchProps {\r\n /** Placeholder of the empty search field. */\r\n placeholder?: string\r\n /** Current search text (controlled, update it from {@link DataGridSearchProps.onChange}). */\r\n searchString?: string\r\n /** Previous searches offered in the search field's popup. */\r\n searchHistory?: string[]\r\n /** Extra CSS class of the search button. */\r\n searchButtonClassName?: string\r\n /** Disables the search button. */\r\n searchButtonDisabled?: boolean\r\n /** Hides the search button. */\r\n searchButtonHidden?: boolean\r\n /** Icon of the search button (replaced by a spinner while loading). */\r\n searchButtonIcon?: React.ReactNode\r\n /** Renders the search button as antd `danger`. */\r\n searchButtonDanger?: boolean\r\n /** Hides the search field; the search button then acts as a \"Refresh\" button with a reload icon. */\r\n hidden?: boolean\r\n\r\n /** Renders a custom search field in place of the built-in one. */\r\n searchRenderer?(): React.ReactNode\r\n\r\n /** Formats strings displayed in the search field and its history. */\r\n stringFormatter?(rawString: string): string\r\n\r\n /** Called when the search field text changes. */\r\n onChange?(searchString: string): void\r\n\r\n /**\r\n * Called when a search is invoked: search button, Enter in the search field, or the \"Search\" button of the\r\n * default no-records overlay.\r\n */\r\n onSearch?(): void\r\n}\r\n\r\n/**\r\n * Callback handed to `DataGridProps.onLoadData`; call it once the data are loaded. It hides the loading overlay,\r\n * shows the no-records overlay when `totalRecords` is 0 and focuses the grid when `autofocus` is set.\r\n */\r\nexport type OnLoadDataCallback = (totalRecords: number) => void\r\n\r\n/**\r\n * Props of {@link DataGrid}. All other ag-grid `GridOptions` are passed through to `AgGridReact`, with these differences:\r\n * - `columnDefs` are {@link DataGridColDef}s, optionally wrapped in {@link DataGridColGroupDef}s;\r\n * - `paginationPageSize` is not available, use `paging.pageSize`;\r\n * - `getRowStyle` is combined with {@link DataGridProps.rowStyleRules};\r\n * - `getRowId` is fixed to `String(data.id)`, so every row object must have a unique `id`;\r\n * - the pagination panel, overlays, header component, column types, `context` and several event handlers are provided\r\n * by DataGrid (the handlers listed here are still called).\r\n *\r\n * @typeParam TData - row data type, passed to the ag-grid `GridOptions` (`rowData`, `getRowId`, events, ...)\r\n */\r\nexport interface DataGridProps<TData = any> extends Omit<GridOptions<TData>, \"columnDefs\" | \"paginationPageSize\" | \"getRowStyle\" | \"cellStyle\"> {\r\n /** ag-grid options object passed to `AgGridReact`, e.g. to link grids for the aligned grids feature. */\r\n gridOptions?: GridOptions<TData>\r\n /** Column definitions; see {@link DataGridColDef} for how they are adapted. Columns may be wrapped in {@link DataGridColGroupDef}s. */\r\n columnDefs: (DataGridColDef | DataGridColGroupDef)[]\r\n /** Passes `columnDefs` to ag-grid unchanged (no header component, cell style or floating filter adaptation); used for aligned grids. */\r\n disableColumnDefsPreprocessing?: boolean\r\n\r\n /** Called asynchronously with the adapted column definitions each time they are rebuilt (not called when preprocessing is disabled). */\r\n onColumnDefsAdapted?(columnDefs: (ColDef | ColGroupDef)[]): void\r\n\r\n /**\r\n * Visibility of the advanced table configuration panel (page size, date format, row styles). Controlled: the panel\r\n * is shown only while this is `true`; update it from {@link DataGridProps.onTableConfigVisible}.\r\n */\r\n tableConfigVisible?: boolean,\r\n /** Initial visibility of the columns configuration dialog; afterwards the dialog is managed internally. */\r\n columnsConfigVisible?: boolean,\r\n /** Style merged into the body of the card wrapping the toolbar and the grid. */\r\n panelStyle?: React.CSSProperties,\r\n /** Style merged into the panel wrapping the grid itself (below the toolbar). */\r\n tablePanelStyle?: React.CSSProperties,\r\n /** Column (floating) filter configuration. */\r\n filter?: DataGridFilterProps\r\n /** Toolbar search box configuration. */\r\n search?: DataGridSearchProps\r\n /**\r\n * Paging configuration.\r\n * @default {pageSize: 0, defaultPageSize: 0}\r\n */\r\n paging: {\r\n /* current size of table page:\r\n - value -1 means no paging at all (scrollbar only)\r\n - value 0 means automatic paging (page size automatically adjusted based on available height for table)\r\n - value >0 defines statically defined page size (number of rows) for the table\r\n */\r\n /**\r\n * Page size: `-1` disables paging (scrolling only, the toolbar shows the visible range instead of the pager),\r\n * `0` sizes pages automatically to the available height, a positive number is a fixed number of rows per page.\r\n */\r\n pageSize: number,\r\n /** Page size restored when the table configuration is reset to defaults. */\r\n defaultPageSize?: number,\r\n /**\r\n * Called when the effective page size changes (reported by ag-grid) or when the user changes the paging in the\r\n * table configuration panel. The grid does not store the new setting in `pageSize`; persist it if needed.\r\n * @param currentPageSize - number of rows per page currently used by ag-grid (`null` before it is known)\r\n * @param definedPageSize - configured page size with the same meaning as {@link pageSize} (`-1`, `0` or rows per page)\r\n */\r\n onPaginationChanged?: (currentPageSize: number | null, definedPageSize: number) => void;\r\n }\r\n\r\n /**\r\n * When `true`, the `rowData` prop is not passed to ag-grid; supply data through {@link DataGrid.setRowData} or\r\n * ag-grid transactions instead (avoids comparing large `rowData` arrays on every render).\r\n */\r\n rowDataManualMode?: boolean\r\n\r\n /**\r\n * Called when the grid needs data: once after the grid is ready and its page size is known, and on every\r\n * {@link DataGrid.loadData} call. A loading overlay is shown until `callback` is called.\r\n */\r\n onLoadData(callback: OnLoadDataCallback): void\r\n\r\n /** Focuses the first column of the (last) selected row, or the first row, after each data load. */\r\n autofocus?: boolean\r\n\r\n /** Called for every key down in a grid cell, after the built-in keyboard handling; `editing` is `true` while a cell editor is open. */\r\n onKeyPressed?(event: KeyboardEvent, editing: boolean): void\r\n\r\n /** Called when Enter is pressed in a grid cell. */\r\n onEnter?: () => void;\r\n\r\n /**\r\n * Ids of the rows to keep selected. Applied only when the `rowData` prop changes: matching rows are selected,\r\n * and if none of them is present the selection is cleared.\r\n */\r\n selectedIds?: (number | string)[]\r\n\r\n /**\r\n * Row styling rules. A rule applies to rows whose data match its `expression` (a filtrex expression evaluated on the\r\n * row data) or to all rows when it has none; matching styles are merged in order. The rules with keys\r\n * `table-font-size` and `table-line-indentation` also determine the font size and the row, header and floating\r\n * filter heights.\r\n * @default tableDefaultRowStyleRules()\r\n */\r\n rowStyleRules: RowStyleRule[]\r\n\r\n /** Row styling rules restored when the table configuration is reset to defaults. */\r\n defaultRowStyleRules?: RowStyleRule[]\r\n\r\n /** Called when the user edits the row styling rules in the table configuration panel; update `rowStyleRules` in response. */\r\n onChangeRowStyleRules?(rowStyleRules: RowStyleRule[]): void\r\n\r\n /** Toolbar customization. The toolbar contains the extra buttons, export and settings menus, the search box and the pager. */\r\n toolbar?: {\r\n /** Renders the toolbar part left of the pager; receives the default one (buttons, menus and search box) to wrap or replace. */\r\n renderToolbar?(originalSearchBar: ReactElement): ReactElement\r\n\r\n /** Extra buttons rendered at the start of the toolbar, before the export menu button. */\r\n toolbarButtons?: ReactElement\r\n\r\n /** Hides the \"first-last of total\" record range shown when paging is disabled (`pageSize` -1). */\r\n hideRecordCount?: boolean\r\n\r\n /** Extra content rendered at the end of the toolbar, after the pager or record count. */\r\n extraContent?: React.ReactNode\r\n\r\n /**\r\n * Compact toolbar for a narrow (mobile) screen: the export and settings buttons move into a popover opened by\r\n * one button, and the pager has only the previous, \"page / pages\" and next buttons. A pager that still does not fit\r\n * moves to a line of its own under the toolbar.\r\n */\r\n compact?: boolean\r\n }\r\n\r\n /** Called with the new row height in pixels when it changes because of the font size/line indentation rules. */\r\n onRowHeightChanged?(rowHeight: number): void\r\n\r\n /** Called with the full ag-grid column state when a column is shown/hidden, pinned, resized or moved; persist it to restore the layout. */\r\n onColumnsChanged?(columnModel: ColumnState[], event: ColumnEvent): void\r\n\r\n /** Called when the table configuration panel is requested to open (settings menu) or close. */\r\n onTableConfigVisible?(visible: boolean): void\r\n\r\n /** Called when the columns configuration dialog is opened or closed. */\r\n onColumnsConfigVisible?(visible: boolean): void\r\n\r\n /**\r\n * Custom loading indicator. When set, ag-grid's loading overlay is suppressed and this is rendered over the grid\r\n * while data are loading (otherwise a default spinner is shown).\r\n */\r\n loadingOverlayRenderer?(): ReactElement | null\r\n\r\n /** Custom \"no records\" overlay; returning `null` (or omitting it) shows the default empty state with a \"Search\" button. */\r\n noRecordsOverlayRenderer?(): ReactElement | null\r\n\r\n /** Extra content rendered inside the grid panel after the grid, e.g. an absolutely positioned overlay. */\r\n tableOverlayRenderer?(): ReactElement | null\r\n\r\n /** Shows milliseconds in date-time columns (controlled, see {@link DataGridProps.onShowMilliseconds}). */\r\n showMilliseconds?: boolean\r\n\r\n /** Value of `showMilliseconds` restored when the table configuration is reset to defaults. */\r\n defaultShowMilliseconds?: boolean\r\n\r\n /**\r\n * Called when the user toggles milliseconds in the table configuration panel. Update `showMilliseconds` and then\r\n * call `callback` so the grid re-renders its rows with the new format.\r\n */\r\n onShowMilliseconds?(show: boolean, callback: () => void): void\r\n\r\n /** Hides the year in date and date-time columns (controlled, see {@link DataGridProps.onShowYear}). */\r\n hideYear?: boolean\r\n\r\n /** Value of `hideYear` restored when the table configuration is reset to defaults. */\r\n defaultHideYear?: boolean\r\n\r\n /**\r\n * Called when the user toggles the year in the table configuration panel; note that `show` is the inverse of\r\n * `hideYear`. Update `hideYear` and then call `callback` so the grid re-renders its rows.\r\n */\r\n onShowYear?(show: boolean, callback: () => void): void\r\n\r\n /**\r\n * How date-time columns tell apart the instants of the hour repeated at the end of the daylight saving time - see\r\n * `UtcOffsetMode` of `d2core/i18n/localeHolder`; without it the global mode of `LocaleHolder.setUtcOffsetMode`\r\n * applies (controlled, see {@link DataGridProps.onShowUtcOffset}).\r\n */\r\n showUtcOffset?: UtcOffsetMode\r\n\r\n /** Value of `showUtcOffset` restored when the table configuration is reset to defaults. */\r\n defaultShowUtcOffset?: UtcOffsetMode\r\n\r\n /**\r\n * Called when the user toggles the UTC offset in the table configuration panel. Update `showUtcOffset` and then\r\n * call `callback` so the grid re-renders its rows.\r\n */\r\n onShowUtcOffset?(show: UtcOffsetMode, callback: () => void): void\r\n\r\n /** Toolbar export menu customization; the built-in items export all displayed rows to TXT, CSV, PDF or the clipboard. */\r\n exportMenu?: {\r\n /** Transforms the default menu items, e.g. to add or remove entries. */\r\n renderer?(menuElements: MenuElement[]): MenuElement[]\r\n /** Called with the key of every clicked menu item, built-in ones included. */\r\n onClick?(key: string): void\r\n /** Called after an export finishes with the number of exported rows and the file name (or `\"[CLIPBOARD]\"`). */\r\n onExported?(rowCount: number, destination: string): void\r\n }\r\n\r\n /** Toolbar settings menu customization (column filter, autosize, columns configuration, advanced settings). */\r\n settingsMenu?: {\r\n /** Transforms the default menu items, e.g. to add or remove entries. */\r\n renderer?(menuElements: MenuElement[]): MenuElement[]\r\n /** Called with the key of a clicked custom (non built-in) menu item. */\r\n onClick?(key: string): void\r\n }\r\n\r\n /** Row context menu (right click) customization; the built-in items export the selected rows to TXT, CSV, PDF or the clipboard. */\r\n contextMenu?: {\r\n /** Transforms the default menu items, e.g. to add or remove entries. */\r\n renderer?(menuElements: MenuElement[]): MenuElement[]\r\n /** Called with the key of every clicked menu item, built-in ones included. */\r\n onClick?(key: string): void\r\n }\r\n\r\n /** Additional row style merged over the style computed from {@link DataGridProps.rowStyleRules}; may return `undefined`. */\r\n getRowStyle?(params: any): GridRowStyle | undefined\r\n\r\n /** Ref receiving the underlying `AgGridReact` instance. */\r\n gridRef?: React.RefObject<AgGridReact<TData>>\r\n\r\n /**\r\n * Enables an Excel-like fill handle on the focused cell: dragging from its bottom-right corner selects a cell range\r\n * and reports it through {@link DataGridProps.onFillHandleComplete}. The grid does not modify any data itself.\r\n */\r\n showFillHandle?: boolean\r\n\r\n /**\r\n * Called when a fill handle drag ends.\r\n * @param startRow - first row index of the range (inclusive)\r\n * @param endRow - last row index of the range (inclusive)\r\n * @param columns - ids of the displayed columns in the range, in display order\r\n */\r\n onFillHandleComplete?: (startRow: number, endRow: number, columns: string[]) => void\r\n}\r\n\r\ninterface CellCoord {\r\n rowIndex: number;\r\n colId: string;\r\n}\r\n\r\ninterface DataGridState {\r\n pageIndex: number\r\n pageSize: number | null\r\n recordsCount?: number\r\n columnModel: ColumnState[]\r\n sortModel: SortItem[]\r\n tableConfigVisible: boolean\r\n columnsConfigVisible: boolean\r\n fontSize: number\r\n rowHeight: number\r\n // interval of record's indexes currently shown (first record has index 1)\r\n viewport: [number, number]\r\n contextMenuVisible: boolean\r\n loading: boolean\r\n columnTransferHeight: number\r\n pageOrientation: PageOrientation\r\n exporting: boolean\r\n /** Whether the popover with the export and settings buttons of the compact toolbar is open. */\r\n compactMenuOpen?: boolean\r\n\r\n isDragging: boolean\r\n startCoord: CellCoord | null\r\n endCoord: CellCoord | null\r\n focusedCell: CellCoord | null\r\n}\r\n\r\n\r\n/**\r\n * ag-grid (community modules, Balham theme derived from the antd theme tokens unless `theme` is given) wrapped in a\r\n * card with a toolbar: custom buttons,\r\n * export and settings menus, a search box and a pager. Adds D2000 column types (see {@link DataGridColDef}), rule-based\r\n * row styling with configurable font size and row height, a table configuration panel, a columns configuration\r\n * dialog, a row context menu with export, wildcard quick filter and an optional fill handle.\r\n *\r\n * Data are requested through `onLoadData`; use `rowData` (client-side row model) or an ag-grid `datasource`\r\n * (infinite row model). Row objects must have a unique `id`. The grid state (paging, columns, row styles, date format)\r\n * is not persisted by DataGrid itself; it reports changes through callbacks and expects the updated values back in\r\n * props (`ExtendedDataGrid` from `d2coreui/components/grid/extendedDataGrid` keeps this state and reports it as one\r\n * configuration object; storing it is still up to the caller).\r\n *\r\n * Keyboard: PageUp/PageDown/Home/End and arrows at page edges move across pages, Alt+arrows move the open cell editor,\r\n * Ctrl+A selects the displayed rows, Ctrl+C copies the selected rows with a header line (when more than one is\r\n * selected) or the focused cell,\r\n * Ctrl+I / Ctrl+B copy the `objectId`/`id` or `objectName`/`name` column of the focused row.\r\n *\r\n * @example\r\n * <DataGrid\r\n * columnDefs={[{colId: \"name\", field: \"name\", headerName: \"Name\", group: \"Object\", type: \"textColumnFilter\"}]}\r\n * rowData={rows}\r\n * paging={{pageSize: 0}}\r\n * rowStyleRules={rowStyleRules}\r\n * onChangeRowStyleRules={setRowStyleRules}\r\n * onLoadData={(callback) => loadRows().then((rows) => { setRows(rows); callback(rows.length); })}\r\n * />\r\n *\r\n * @typeParam TData - row data type, see {@link DataGridProps}\r\n */\r\nexport default class DataGrid<TData extends { id: number | string } = any> extends React.Component<DataGridProps<TData>, DataGridState> {\r\n /** Default `paging` (automatic page size) and `rowStyleRules` ({@link tableDefaultRowStyleRules}). */\r\n public static defaultProps = {\r\n paging: {\r\n pageSize: 0,\r\n defaultPageSize: 0\r\n },\r\n rowStyleRules: tableDefaultRowStyleRules()\r\n };\r\n\r\n /** Whether the initial `onLoadData` call has already been made. */\r\n firstLoadDone: boolean = false;\r\n /** Engine providing the wildcard (`*`, `?`) quick filter and text filter matching. */\r\n wildcardQuickFilter: WildcardQuickFilterEngine;\r\n /** Custom ag-grid column types registered by the grid (see {@link DataGridColDef}). */\r\n columnTypes: { [key: string]: ColTypeDef<TData> };\r\n /** ag-grid API; `undefined` until the grid is ready. */\r\n gridApi?: GridApi<TData>;\r\n /** Column state saved when the columns configuration dialog opens, restored when it is cancelled. */\r\n columnModelBeforeEdit?: ColumnState[];\r\n /** Row index to focus after the pending page change. */\r\n indexToJump: number | null;\r\n /** Column to focus after the pending page change. */\r\n columnToJump: Column | null;\r\n /** Last `cellFocused` event, used for Shift+arrow range selection. */\r\n lastCellFocus?: CellFocusedEvent;\r\n /** Whether the last navigation was done by keyboard or mouse. */\r\n lastNavigationEvent?: NavigationEventEnum;\r\n /** Pagination event received before the grid API was available, replayed once the grid is ready. */\r\n lastPaginationEvent?: PaginationChangedEvent | null = null;\r\n /**\r\n * Object passed to ag-grid as `context`; the grid's overlays, header and filter components read the overlay\r\n * renderers, `onFilterConfirmed`, `fontSize` and `lineHeight` from it.\r\n */\r\n table_context: any;\r\n\r\n private readonly getTheme;\r\n\r\n constructor(props: Readonly<DataGridProps<TData>>) {\r\n super(props);\r\n this.state = {\r\n pageIndex: 0,\r\n pageSize: null,\r\n recordsCount: undefined,\r\n columnModel: [],\r\n sortModel: [],\r\n tableConfigVisible: !!this.props.tableConfigVisible,\r\n columnsConfigVisible: !!this.props.columnsConfigVisible,\r\n fontSize: GRID_DEFAULT_FONT_SIZE,\r\n rowHeight: calculateRowHeight(GRID_DEFAULT_FONT_SIZE, GRID_DEFAULT_ROW_HEIGHT_DELTA),\r\n viewport: [0, 0],\r\n contextMenuVisible: false,\r\n loading: false,\r\n columnTransferHeight: 500,\r\n pageOrientation: \"PORTRAIT\",\r\n exporting: false,\r\n isDragging: false,\r\n startCoord: null,\r\n endCoord: null,\r\n focusedCell: null,\r\n };\r\n this.indexToJump = null;\r\n this.columnToJump = null;\r\n\r\n this.onGridReady = this.onGridReady.bind(this);\r\n this.onPaginationChanged = this.onPaginationChanged.bind(this);\r\n this.onViewportChanged = this.onViewportChanged.bind(this);\r\n this.onCellContextMenu = this.onCellContextMenu.bind(this);\r\n this.onCellFocused = this.onCellFocused.bind(this);\r\n this.onCellMouseDown = this.onCellMouseDown.bind(this);\r\n this.onCellMouseOver = this.onCellMouseOver.bind(this);\r\n this.onMouseUp = this.onMouseUp.bind(this);\r\n this.setFocusedCellDebounced = debounce(this.setFocusedCellDebounced.bind(this), 200);\r\n this.noRecordsOverlayRenderer = this.noRecordsOverlayRenderer.bind(this);\r\n this.loadingOverlayRenderer = this.loadingOverlayRenderer.bind(this);\r\n this.changePagination = this.changePagination.bind(this);\r\n this.onColumnsChanged = this.onColumnsChanged.bind(this);\r\n this.onNewColumnsLoaded = this.onNewColumnsLoaded.bind(this);\r\n this.onFilterModified = this.onFilterModified.bind(this);\r\n this.onFilterChanged = this.onFilterChanged.bind(this);\r\n this.onFilterConfirmed = this.onFilterConfirmed.bind(this);\r\n this.onSortChanged = this.onSortChanged.bind(this);\r\n this.showTableConfiguration = this.showTableConfiguration.bind(this);\r\n this.showColumnsConfig = this.showColumnsConfig.bind(this);\r\n this.navigateToNextCell = this.navigateToNextCell.bind(this);\r\n this.suppressKeyboardEvent = this.suppressKeyboardEvent.bind(this);\r\n this.onRowDataUpdated = this.onRowDataUpdated.bind(this);\r\n this._getRowStyle = this._getRowStyle.bind(this);\r\n this._getRowHeight = this._getRowHeight.bind(this);\r\n this._getCellStyle = this._getCellStyle.bind(this);\r\n this.textCustomComparator = this.textCustomComparator.bind(this);\r\n this.onPageOrientationChange = this.onPageOrientationChange.bind(this);\r\n this.onExport = this.onExport.bind(this);\r\n this.getExportContent = this.getExportContent.bind(this);\r\n this.getDefaultColDefinition = memoizeOne(this.getDefaultColDefinition.bind(this));\r\n this.getAdaptedColumnDefs = memoizeOne(this.getAdaptedColumnDefs.bind(this));\r\n this.getCustomComponents = memoizeOne(this.getCustomComponents.bind(this));\r\n this.getTheme = memoizeOne(getAgGridThemeFromAntd, agThemeEquals);\r\n\r\n this.table_context = {\r\n loadingOverlayRenderer: this.loadingOverlayRenderer,\r\n noRecordsOverlayRenderer: this.noRecordsOverlayRenderer,\r\n onFilterConfirmed: this.onFilterConfirmed,\r\n fontSize: this.state.fontSize,\r\n lineHeight: getLineHeight(this.state.rowHeight)\r\n };\r\n this.wildcardQuickFilter = new WildcardQuickFilterEngine();\r\n\r\n this.columnTypes = {\r\n \"localizedArrayColumn\": {\r\n cellRenderer: (params: ICellRendererParams): string => {\r\n const value = DataGrid.getCellValue<string[]>(params);\r\n if (value !== undefined) {\r\n return value.map((s) => i18n(s)).join(\",\");\r\n } else {\r\n return \"\";\r\n }\r\n },\r\n filterParams: {\r\n textCustomComparator: this.textCustomComparator\r\n },\r\n filterValueGetter: function (params: ValueGetterParams): string | null {\r\n const value = DataGrid.getCellValue<string[]>(params);\r\n if (value !== undefined) {\r\n return value.map((s) => i18n(s)).join(\",\");\r\n }\r\n return null;\r\n },\r\n getQuickFilterText: function (params: GetQuickFilterTextParams): string {\r\n const value = DataGrid.getCellValue<string[]>(params);\r\n if (value !== undefined) {\r\n return value.map((s) => i18n(s)).join(\",\");\r\n }\r\n return \"\";\r\n }\r\n },\r\n \"numberColumn\": {\r\n cellRenderer: (params: ICellRendererParams): string => {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined && value !== null) {\r\n return LocaleHolder.formatNumber(value, params.colDef?.cellRendererParams?.fractionDigits);\r\n } else {\r\n return \"\";\r\n }\r\n },\r\n valueFormatter: (params: ValueFormatterParams): string => {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined && value !== null) {\r\n return LocaleHolder.formatNumber(value, params.colDef?.cellRendererParams?.fractionDigits);\r\n } else {\r\n return \"\";\r\n }\r\n },\r\n filterParams: {\r\n textCustomComparator: this.textCustomComparator\r\n },\r\n filterValueGetter: function (params: ValueGetterParams): string | null {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value) {\r\n return LocaleHolder.formatNumber(value, params.colDef?.cellRendererParams?.fractionDigits);\r\n } else {\r\n return \"\";\r\n }\r\n },\r\n getQuickFilterText: function (params: GetQuickFilterTextParams): string {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined) {\r\n return LocaleHolder.formatNumber(value, params.colDef?.cellRendererParams?.fractionDigits);\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n },\r\n \"dateColumn\": {\r\n cellRenderer: (params: ICellRendererParams) => {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined) {\r\n if (value === D2000UnixTimeNullValue) {\r\n return \"---\";\r\n }\r\n let tooltipValue: string;\r\n tooltipValue = unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(true, true, true, true));\r\n return <span title={tooltipValue}>{unixTimeToMoment(value).format(LocaleHolder.getDateFormat(!this.props.hideYear))}</span>\r\n } else {\r\n return \"---\";\r\n }\r\n },\r\n valueFormatter: (params: ValueFormatterParams): string => {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateFormat(!this.props.hideYear));\r\n }\r\n return \"---\";\r\n },\r\n filterParams: {\r\n textCustomComparator: this.textCustomComparator\r\n },\r\n filterValueGetter: (params: ValueGetterParams): string | null => {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateFormat(!this.props.hideYear));\r\n }\r\n return null;\r\n },\r\n getQuickFilterText: (params: GetQuickFilterTextParams): string => {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateFormat(!this.props.hideYear));\r\n }\r\n return \"\";\r\n }\r\n },\r\n \"dateTimeColumn\": {\r\n cellRenderer: (params: ICellRendererParams) => {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value) {\r\n if (value === D2000UnixTimeNullValue) {\r\n return \"Null Time\";\r\n }\r\n let tooltipValue: string;\r\n tooltipValue = unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(true, true, true, true));\r\n return <span title={tooltipValue}>{unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds, this.props.showUtcOffset))}</span>;\r\n } else {\r\n return \"---\";\r\n }\r\n },\r\n valueFormatter: (params: ValueFormatterParams): string => {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds, this.props.showUtcOffset));\r\n }\r\n return \"---\";\r\n },\r\n filterParams: {\r\n textCustomComparator: this.textCustomComparator\r\n },\r\n filterValueGetter: (params: ValueGetterParams): string | null => {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds, this.props.showUtcOffset));\r\n }\r\n return null;\r\n },\r\n getQuickFilterText: (params: GetQuickFilterTextParams): string => {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds, this.props.showUtcOffset));\r\n }\r\n return \"\";\r\n }\r\n },\r\n \"fromNowDateTimeColumn\": {\r\n cellRenderer: (params: ICellRendererParams) => {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined) {\r\n let tooltipValue: string;\r\n tooltipValue = unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(true, true, true, true));\r\n return <span title={tooltipValue}>{unixTimeToMoment(value).fromNow()}</span>;\r\n } else {\r\n return \"---\";\r\n }\r\n },\r\n valueFormatter: (params: ValueFormatterParams): string => {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds, this.props.showUtcOffset));\r\n }\r\n return \"---\";\r\n },\r\n filterParams: {\r\n textCustomComparator: this.textCustomComparator\r\n },\r\n filterValueGetter: (params: ValueGetterParams): string | null => {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds, this.props.showUtcOffset));\r\n }\r\n return null;\r\n },\r\n getQuickFilterText: (params: GetQuickFilterTextParams): string => {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds, this.props.showUtcOffset));\r\n }\r\n return \"\";\r\n }\r\n },\r\n \"escapedValueColumn\": {\r\n cellRenderer: (params: ICellRendererParams) => {\r\n const value = DataGrid.getCellValue<any>(params);\r\n if (value !== undefined) {\r\n return <span style={{whiteSpace: \"pre\"}}\r\n title={value}> {typeof value === \"string\" ? value.replace(/[\\r\\n]+/g, ' ') : value}</span>;\r\n } else {\r\n return \"\";\r\n }\r\n },\r\n valueFormatter: (params: ValueFormatterParams): string => {\r\n const value = DataGrid.getCellValue<any>(params);\r\n if (value !== undefined) {\r\n return typeof value === \"string\" ? value.replace(/[\\r\\n]+/g, ' ') : value;\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n },\r\n \"textColumnFilter\": {\r\n filter: \"agTextColumnFilter\",\r\n floatingFilter: true,\r\n floatingFilterComponent: \"textColumnFilter\",\r\n filterParams: {\r\n textCustomComparator: this.textCustomComparator\r\n },\r\n suppressFloatingFilterButton: true,\r\n },\r\n \"textColumnServerFilter\": {\r\n filter: \"agTextColumnFilter\",\r\n floatingFilter: true,\r\n floatingFilterComponent: \"textColumnFilter\",\r\n filterParams: {\r\n buttons: ['apply'],\r\n textCustomComparator: this.textCustomComparator\r\n },\r\n suppressFloatingFilterButton: true,\r\n },\r\n \"customColumnServerFilter\": {\r\n filter: \"agTextColumnFilter\",\r\n floatingFilter: true,\r\n floatingFilterComponent: \"customColumnFilter\",\r\n filterParams: {\r\n buttons: ['apply'],\r\n textCustomComparator: this.textCustomComparator\r\n },\r\n suppressFloatingFilterButton: true,\r\n },\r\n \"alignRight\": {}\r\n };\r\n }\r\n\r\n private static getCellValue<V>(props: any): V | undefined {\r\n if (props) {\r\n if (props.colDef.field && typeof props.getValue === \"function\") {\r\n return props.getValue(props.colDef.field);\r\n }\r\n if (props.data && props.colDef && props.colDef.field) {\r\n return at<V>(props.data, props.colDef.field)[0];\r\n }\r\n if (props.value !== undefined) {\r\n return props.value;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Case-insensitive `textCustomComparator` used by the grid's text filters; `contains` supports `*` and `?` wildcards.\r\n * @param filter - ag-grid text filter type (`contains`, `notContains`, `equals`, `notEqual`, `startsWith`, `endsWith`)\r\n * @returns whether `value` passes the filter\r\n */\r\n textCustomComparator(filter: string, value: any, filterText: string) {\r\n const filterTextLowerCase = filterText.toLowerCase();\r\n const valueLowerCase = value.toString().toLowerCase();\r\n switch (filter) {\r\n case 'contains':\r\n if (filterTextLowerCase.indexOf(\"*\") >= 0 || filterTextLowerCase.indexOf(\"?\") >= 0) {\r\n const wildcardFilterRegExp = this.wildcardQuickFilter.getWildcardFilterRegExp(filterTextLowerCase);\r\n if (typeof wildcardFilterRegExp == \"string\") {\r\n return valueLowerCase.indexOf(filterTextLowerCase) >= 0;\r\n } else {\r\n return wildcardFilterRegExp.test(valueLowerCase);\r\n }\r\n } else {\r\n return valueLowerCase.indexOf(filterTextLowerCase) >= 0;\r\n }\r\n case 'notContains':\r\n return valueLowerCase.indexOf(filterTextLowerCase) === -1;\r\n case 'equals':\r\n return valueLowerCase === filterTextLowerCase;\r\n case 'notEqual':\r\n // noinspection EqualityComparisonWithCoercionJS\r\n return valueLowerCase != filterTextLowerCase;\r\n case 'startsWith':\r\n return valueLowerCase.indexOf(filterTextLowerCase) === 0;\r\n case 'endsWith':\r\n var index = valueLowerCase.lastIndexOf(filterTextLowerCase);\r\n return index >= 0 && index === (valueLowerCase.length - filterTextLowerCase.length);\r\n default:\r\n // should never happen\r\n console.warn('invalid filter type ' + filter);\r\n return false;\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps: DataGridProps<TData>) {\r\n if (this.state.compactMenuOpen && !this.props.toolbar?.compact) {\r\n // the popover is gone with the compact toolbar - it must not open by itself when the toolbar is compact again\r\n this.setState({compactMenuOpen: false});\r\n }\r\n if (!this.gridApi) {\r\n return;\r\n }\r\n if (this.props.filter && prevProps.filter && this.props.filter.columnSearchVisible !== prevProps.filter.columnSearchVisible) {\r\n setTimeout(() => {\r\n if (this.gridApi) {\r\n this.gridApi.refreshHeader();\r\n if (this.props.filter && !this.props.filter.columnSearchVisible) {\r\n this.gridApi.setFilterModel(null);\r\n this.gridApi.onFilterChanged();\r\n }\r\n }\r\n }, 0);\r\n }\r\n // functionality when all data are loaded to table\r\n if (this.props.rowData && this.props.rowData !== prevProps.rowData) {\r\n // keep filter model when data are changed\r\n if (this.props.filter && this.props.filter.getFilterModel) {\r\n this.gridApi.setFilterModel(this.props.filter.getFilterModel());\r\n this.gridApi.onFilterChanged();\r\n }\r\n // keep sorting model when data are changed\r\n this.setSortModel(this.state.sortModel);\r\n this.gridApi.refreshClientSideRowModel(\"group\");\r\n this.gridApi.redrawRows();\r\n\r\n // keep selected rows when data are changed and rows are still present\r\n const selectedObjectsVisibleInGrid = this.props.rowData.filter((object) => {\r\n return this.props.selectedIds ? this.props.selectedIds.indexOf(object.id) >= 0 : false;\r\n });\r\n if (selectedObjectsVisibleInGrid.length > 0) {\r\n selectedObjectsVisibleInGrid.forEach((object) => {\r\n const rowNode = this.gridApi ? this.gridApi.getRowNode(object.id + \"\") : null;\r\n if (rowNode && !rowNode.isSelected()) {\r\n rowNode.setSelected(true, true);\r\n }\r\n });\r\n } else {\r\n this.gridApi.deselectAll();\r\n }\r\n }\r\n // functionality when chunks of data are dynamically loaded from server\r\n if (this.props.datasource && this.props.datasource !== prevProps.datasource) {\r\n // resets grid data\r\n this.gridApi.updateGridOptions({datasource: this.props.datasource});\r\n }\r\n this.updateRowHeight();\r\n }\r\n\r\n componentWillUnmount() {\r\n window.removeEventListener('mouseup', this.onMouseUp);\r\n }\r\n\r\n /**\r\n * Applies a column state (order, width, visibility, pinning, sorting) to the grid, e.g. one saved from\r\n * `onColumnsChanged`. Columns not in the state lose their sorting. No-op until the grid is ready.\r\n * Note: it clears `sort` and `sortIndex` on the passed objects.\r\n */\r\n public setColumnState(columnModel: ColumnState[]) {\r\n const columnStates: ColumnState[] = [];\r\n if (columnModel) {\r\n columnModel.forEach((item: ColumnState) => {\r\n const columnState = {...item};\r\n item.sortIndex = undefined;\r\n item.sort = undefined\r\n columnStates.push(columnState);\r\n });\r\n }\r\n this.gridApi?.applyColumnState({state: columnStates, defaultState: {sort: null}, applyOrder: true});\r\n }\r\n\r\n /**\r\n * Sorts the grid by the given columns; array order defines the sort priority and all other columns are unsorted.\r\n * No-op until the grid is ready.\r\n */\r\n public setSortModel(sortModel: SortItem[]) {\r\n const columnState: ColumnState[] = [];\r\n if (sortModel) {\r\n sortModel.forEach((item: any, index: number) => {\r\n columnState.push({\r\n colId: item.colId,\r\n sort: item.sort,\r\n sortIndex: index\r\n });\r\n });\r\n }\r\n this.gridApi?.applyColumnState({state: columnState, defaultState: {sort: null}, applyOrder: true});\r\n }\r\n\r\n /** Returns the sorted columns ordered by sort priority; empty until the grid is ready. */\r\n public getSortModel(): SortItem[] {\r\n const columnState = this.gridApi?.getColumnState() ?? [];\r\n const filteredStates = columnState?.filter(item => item.sort != null);\r\n const indexes: { [colId: string]: number; } = {};\r\n filteredStates.forEach((state) => {\r\n if (state.colId) {\r\n indexes[state.colId] = state.sortIndex as number;\r\n }\r\n });\r\n const res = filteredStates.map(s => {\r\n return {colId: s.colId, sort: s.sort} as SortItem;\r\n });\r\n res.sort((a: any, b: any) => indexes[a.colId] - indexes[b.colId]);\r\n return res;\r\n\r\n }\r\n\r\n /** Recomputes font size and row height from `rowStyleRules` and applies them if they changed. */\r\n updateRowHeight() {\r\n let rowAndFontHeight = this.calculateRowAndFontHeight(this.props.rowStyleRules);\r\n if (rowAndFontHeight.rowHeight !== this.state.rowHeight) {\r\n this.changeRowHeight(rowAndFontHeight.fontSize, rowAndFontHeight.rowHeight);\r\n }\r\n if (rowAndFontHeight.fontSize !== this.state.fontSize) {\r\n this.setState({fontSize: rowAndFontHeight.fontSize});\r\n }\r\n }\r\n\r\n /**\r\n * Computes the font size and row height (pixels) defined by the `table-font-size` and `table-line-indentation`\r\n * rules, falling back to the grid defaults.\r\n */\r\n calculateRowAndFontHeight(rowStyleRules?: RowStyleRule[]): { fontSize: number, rowHeight: number } {\r\n let rowHeightDelta = GRID_DEFAULT_ROW_HEIGHT_DELTA;\r\n let fontSize = GRID_DEFAULT_FONT_SIZE;\r\n let rowHeight = calculateRowHeight(fontSize, rowHeightDelta);\r\n if (rowStyleRules) {\r\n for (let i = 0; i < rowStyleRules.length; i++) {\r\n if (rowStyleRules[i].key === \"table-font-size\") {\r\n const currentFontSize = rowStyleRules[i].style.fontSize;\r\n fontSize = getFontSize(currentFontSize);\r\n rowHeight = calculateRowHeight(currentFontSize, rowHeightDelta);\r\n }\r\n if (rowStyleRules[i].key === \"table-line-indentation\") {\r\n const currentRowHeightDelta = rowStyleRules[i].style.rowHeightDelta;\r\n rowHeightDelta = getRowHeightDelta(currentRowHeightDelta);\r\n rowHeight = calculateRowHeight(fontSize, currentRowHeightDelta);\r\n }\r\n }\r\n }\r\n return {rowHeight: rowHeight, fontSize: fontSize};\r\n }\r\n\r\n /** Synchronizes the table configuration panel visibility with the `tableConfigVisible` prop when it is set. */\r\n static getDerivedStateFromProps(props: DataGridProps, state: DataGridState) {\r\n const newState: Partial<DataGridState> = {};\r\n if (props.tableConfigVisible === true || props.tableConfigVisible === false) {\r\n if (props.tableConfigVisible !== state.tableConfigVisible) {\r\n newState.tableConfigVisible = props.tableConfigVisible;\r\n }\r\n }\r\n return newState;\r\n }\r\n\r\n /** ag-grid `gridReady` handler: stores the grid API, forwards the event to `props.onGridReady` and initializes sort/column state. */\r\n onGridReady(gridReadyEvent: GridReadyEvent<TData>): void {\r\n const gridApi = gridReadyEvent.api;\r\n if (!this.gridApi || this.gridApi !== gridApi) {\r\n this.gridApi = gridApi;\r\n if (this.props.onGridReady) {\r\n this.props.onGridReady(gridReadyEvent);\r\n }\r\n this.setState({\r\n sortModel: this.getSortModel(),\r\n columnModel: this.gridApi.getColumnState(),\r\n });\r\n this.updateRowHeight();\r\n }\r\n\r\n window.addEventListener('mouseup', this.onMouseUp)\r\n\r\n // fixing some cases when after onGridReady callback no onPaginationChanged callback is called\r\n // and therefore no initial data loading (loadData()) occurs\r\n setTimeout(() => {\r\n if (!!this.lastPaginationEvent) {\r\n this.onPaginationChanged(this.lastPaginationEvent);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * ag-grid `paginationChanged` handler: updates the pager, reports page size changes through\r\n * `paging.onPaginationChanged`, triggers the initial data load and forwards the event to `props.onPaginationChanged`.\r\n */\r\n onPaginationChanged(event: PaginationChangedEvent) {\r\n if (this.gridApi) {\r\n const currentPage = this.gridApi.paginationGetCurrentPage();\r\n const currentPageSize = this.gridApi.paginationGetPageSize();\r\n let recordsCount = this.props.paging.pageSize >= 0 ? (this.gridApi.paginationIsLastPageFound() ? this.gridApi.paginationGetRowCount() : 0) : this.gridApi.getDisplayedRowCount();\r\n // process only when onGridReady passed\r\n if (this.state.pageSize !== currentPageSize) {\r\n if (this.props.paging.onPaginationChanged) {\r\n this.props.paging.onPaginationChanged(currentPageSize, this.props.paging.pageSize);\r\n }\r\n if (!this.firstLoadDone) {\r\n this.loadData();\r\n this.firstLoadDone = true;\r\n }\r\n }\r\n this.setState({pageSize: currentPageSize, recordsCount: recordsCount, pageIndex: currentPage});\r\n if (this.indexToJump !== null && this.columnToJump !== null) {\r\n this.gridApi.setFocusedCell(this.indexToJump, this.columnToJump);\r\n this.indexToJump = null;\r\n }\r\n this.lastPaginationEvent = null;\r\n } else {\r\n this.lastPaginationEvent = event;\r\n }\r\n if (this.props.onPaginationChanged) {\r\n this.props.onPaginationChanged(event);\r\n }\r\n }\r\n\r\n /** ag-grid `viewportChanged` handler: adds `rowsScrollingDelta` (see {@link DataGridViewportChangedEvent}) and forwards the event to `props.onViewportChanged`. */\r\n onViewportChanged(event: ViewportChangedEvent) {\r\n const dataGridEvent = event as DataGridViewportChangedEvent;\r\n // calculation of the flag that last record is shown\r\n const rowsScrollingDelta = this.state.viewport[1] ? event.lastRow + 1 - this.state.viewport[1] : event.lastRow + 1;\r\n dataGridEvent.rowsScrollingDelta = rowsScrollingDelta;\r\n this.setState({viewport: [event.firstRow + 1, event.lastRow + 1]});\r\n if (this.props.onViewportChanged) {\r\n this.props.onViewportChanged(event);\r\n }\r\n }\r\n\r\n /**\r\n * Switches the paging mode at runtime (used by the table configuration panel) and reports it through\r\n * `paging.onPaginationChanged`; the `paging.pageSize` prop is not changed. No-op until the grid is ready.\r\n * @param pageSize - `-1` no paging, `0` automatic page size, positive number fixed rows per page\r\n */\r\n changePagination(pageSize: number): void {\r\n if (!this.gridApi) {\r\n return;\r\n }\r\n const gridApiWithPrivateAccess = this.gridApi as GridApiWithPrivateAccess;\r\n if (pageSize > 0) {\r\n this.gridApi.updateGridOptions({\r\n pagination: true,\r\n paginationAutoPageSize: false,\r\n paginationPageSize: pageSize\r\n });\r\n if (this.props.paging.onPaginationChanged) {\r\n this.props.paging.onPaginationChanged(pageSize, pageSize);\r\n }\r\n } else if (pageSize === 0) {\r\n this.gridApi.updateGridOptions({pagination: true, paginationAutoPageSize: true});\r\n // handling AG-Grid bug caused by different previous pageSize state\r\n const rowHeight = (gridApiWithPrivateAccess.beans.gos as any).getRowHeightAsNumber?.() ?? 1;\r\n // @ts-ignore\r\n const bodyHeight = (gridApiWithPrivateAccess.beans.ctrlsSvc as any).params.center.viewportSizeFeature.getBodyHeight();\r\n let availablePageSize = 1000;\r\n if (bodyHeight > 0) {\r\n availablePageSize = Math.floor(bodyHeight / rowHeight);\r\n }\r\n if (this.props.paging.pageSize > availablePageSize) {\r\n this.gridApi.updateGridOptions({paginationPageSize: 1});\r\n } else {\r\n // special hack to remove setting page size\r\n this.gridApi.updateGridOptions({paginationPageSize: null as unknown as number});\r\n }\r\n if (this.props.paging && this.props.paging.onPaginationChanged) {\r\n this.props.paging.onPaginationChanged(this.state.pageSize, 0);\r\n }\r\n } else {\r\n this.gridApi.updateGridOptions({pagination: false, paginationAutoPageSize: false});\r\n if (this.props.paging && this.props.paging.onPaginationChanged) {\r\n this.props.paging.onPaginationChanged(this.state.pageSize, -1);\r\n }\r\n }\r\n }\r\n\r\n /** Requests showing/hiding milliseconds via `props.onShowMilliseconds` and redraws the rows once the parent calls back. */\r\n showMilliseconds(showMilis: boolean) {\r\n this.props.onShowMilliseconds?.(showMilis, () => {\r\n if (!this.gridApi) {\r\n return;\r\n }\r\n if (!this.props.rowModelType || this.props.rowModelType === \"clientSide\") {\r\n // table is shown\r\n this.gridApi.refreshClientSideRowModel(\"group\");\r\n }\r\n this.gridApi.redrawRows();\r\n });\r\n }\r\n\r\n /** Requests showing/hiding the year via `props.onShowYear` and redraws the rows once the parent calls back. */\r\n showYear(showYear: boolean) {\r\n this.props.onShowYear?.(showYear, () => {\r\n if (!this.gridApi) {\r\n return;\r\n }\r\n if (!this.props.rowModelType || this.props.rowModelType === \"clientSide\") {\r\n // table is shown\r\n this.gridApi.refreshClientSideRowModel(\"group\");\r\n }\r\n this.gridApi.redrawRows();\r\n });\r\n }\r\n\r\n /** Requests showing/hiding the UTC offset via `props.onShowUtcOffset` and redraws the rows once the parent calls back. */\r\n showUtcOffset(showUtcOffset: UtcOffsetMode) {\r\n this.props.onShowUtcOffset?.(showUtcOffset, () => {\r\n if (!this.gridApi) {\r\n return;\r\n }\r\n if (!this.props.rowModelType || this.props.rowModelType === \"clientSide\") {\r\n // table is shown\r\n this.gridApi.refreshClientSideRowModel(\"group\");\r\n }\r\n this.gridApi.redrawRows();\r\n });\r\n }\r\n\r\n /**\r\n * Applies a new row height (and header/floating filter height derived from `fontSize`, unless given in props),\r\n * redraws the grid (reloading an infinite datasource) and calls `props.onRowHeightChanged`.\r\n */\r\n changeRowHeight(fontSize: number, rowHeight: number) {\r\n this.setState({rowHeight: rowHeight}, () => {\r\n if (this.gridApi) {\r\n if (this.props.headerHeight === undefined) {\r\n this.gridApi.updateGridOptions({headerHeight: calculateRowHeight(fontSize, GRID_DEFAULT_ROW_HEIGHT_DELTA + 2)});\r\n }\r\n if (this.props.floatingFiltersHeight === undefined) {\r\n this.gridApi.updateGridOptions({floatingFiltersHeight: calculateRowHeight(fontSize, GRID_DEFAULT_ROW_HEIGHT_DELTA + 2)});\r\n }\r\n this.gridApi.updateGridOptions({rowHeight: rowHeight})\r\n this.gridApi.resetRowHeights();\r\n this.gridApi.refreshHeader();\r\n this.gridApi.redrawRows();\r\n if (this.props.rowModelType === \"infinite\" && this.props.datasource) {\r\n this.gridApi.setGridOption('rowHeight', rowHeight);\r\n // redraws all server side loaded table data\r\n this.gridApi.updateGridOptions({datasource: this.props.datasource});\r\n }\r\n }\r\n if (this.props.onRowHeightChanged) {\r\n this.props.onRowHeightChanged(rowHeight);\r\n }\r\n });\r\n }\r\n\r\n /** Shows the page with the given zero-based index. */\r\n onGoToPage(pageIndex: number) {\r\n if (this.gridApi) {\r\n this.gridApi.paginationGoToPage(pageIndex);\r\n }\r\n }\r\n\r\n /**\r\n * (Re)loads data: shows the loading overlay and calls `props.onLoadData`. No-op until the grid is ready.\r\n * @param callback - called after `onLoadData` reports that loading has finished\r\n */\r\n loadData(callback?: () => void) {\r\n if (!this.gridApi) {\r\n return;\r\n }\r\n this.setState({loading: true});\r\n if (!this.props.loadingOverlayRenderer) {\r\n this.gridApi.setGridOption(\"loading\", true);\r\n }\r\n this.props.onLoadData((totalRecords) => {\r\n if (!this.gridApi) {\r\n return;\r\n }\r\n this.gridApi.setGridOption(\"loading\", false);\r\n this.gridApi.hideOverlay();\r\n this.setState({loading: false});\r\n if (callback) {\r\n callback();\r\n }\r\n if (totalRecords === 0) {\r\n setTimeout(() => {\r\n if (!this.isActive()) {\r\n return;\r\n }\r\n this.gridApi?.showNoRowsOverlay();\r\n }, 400);\r\n }\r\n if (this.props.autofocus) {\r\n this.focus();\r\n }\r\n });\r\n }\r\n\r\n /** Focuses (after a short delay) the first column of the last selected row, or of the first row when nothing is selected. */\r\n public focus() {\r\n setTimeout(() => {\r\n if (!this.isActive()) {\r\n return;\r\n }\r\n const columnModel = this.gridApi?.getColumnState();\r\n let columnIdToFocus = columnModel?.[0]?.colId || \"name\";\r\n const selectedNodes = this.gridApi?.getSelectedNodes();\r\n const selectedRowIndex: number = (selectedNodes && selectedNodes.length > 0 && selectedNodes[selectedNodes.length - 1].rowIndex) || 0;\r\n this.gridApi?.setFocusedCell(selectedRowIndex, columnIdToFocus);\r\n }, 200);\r\n }\r\n\r\n /** Returns `true` when the grid is ready and not destroyed. */\r\n isActive(): boolean {\r\n return !!this.gridApi && !this.gridApi.isDestroyed();\r\n }\r\n\r\n /** Handler of ag-grid column visible/pinned/resized/moved events; stores the column state and calls `props.onColumnsChanged`. */\r\n onColumnsChanged(event: ColumnEvent) {\r\n const columnModel = event.api.getColumnState();\r\n if (this.props.onColumnsChanged) {\r\n this.props.onColumnsChanged(columnModel, event);\r\n }\r\n this.setState({columnModel: columnModel});\r\n }\r\n\r\n /**\r\n * ag-grid `newColumnsLoaded` handler: refreshes the stored column state after `columnDefs` change, without calling\r\n * `props.onColumnsChanged`, and forwards the event to `props.onNewColumnsLoaded`.\r\n */\r\n onNewColumnsLoaded(event: NewColumnsLoadedEvent) {\r\n this.setState({columnModel: event.api.getColumnState()});\r\n this.props.onNewColumnsLoaded?.(event);\r\n }\r\n\r\n /**\r\n * Requests showing/hiding the floating column filters: re-applies `filter.getFilterModel()` and calls\r\n * `filter.onColumnSearchVisible`; the actual visibility follows `filter.columnSearchVisible`.\r\n */\r\n setColumnSearchVisible(visible: boolean) {\r\n if (this.gridApi && this.props.filter && this.props.filter.getFilterModel) {\r\n this.gridApi.setFilterModel(this.props.filter.getFilterModel());\r\n }\r\n if (this.props.filter && this.props.filter.onColumnSearchVisible) {\r\n this.props.filter.onColumnSearchVisible(visible);\r\n }\r\n }\r\n\r\n private onFilterModified(event: FilterModifiedEvent) {\r\n if (this.props.filter && this.props.filter.onFilterModified) {\r\n this.props.filter.onFilterModified(event);\r\n }\r\n }\r\n\r\n private onFilterChanged(event: FilterChangedEvent) {\r\n if (this.props.filter && this.props.filter.onFilterChanged) {\r\n this.props.filter.onFilterChanged(event);\r\n }\r\n }\r\n\r\n private onFilterConfirmed() {\r\n if (this.props.filter && this.props.filter.onFilterConfirmed) {\r\n this.props.filter.onFilterConfirmed();\r\n }\r\n }\r\n\r\n private onSortChanged(event: SortChangedEvent) {\r\n if (this.props.onSortChanged && this.gridApi) {\r\n const currentSortModel = this.getSortModel() as SortItem[];\r\n if (!isEqual(this.state.sortModel, currentSortModel)) {\r\n // propagate only changes to sorting\r\n this.setState({sortModel: currentSortModel}, () => {\r\n if (this.props.onSortChanged) {\r\n this.props.onSortChanged(event);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n /** Requests opening/closing the table configuration panel via `props.onTableConfigVisible`; redraws the rows when it closes. */\r\n showTableConfiguration(show: boolean) {\r\n if (this.props.onTableConfigVisible) {\r\n this.props.onTableConfigVisible(show);\r\n }\r\n this.setState({tableConfigVisible: show}, () => {\r\n if (this.gridApi && !this.state.tableConfigVisible) {\r\n // redrawing rows after closing table configuration panel, probably not required any more,\r\n // because config panel and table is shown simultaneously\r\n if (!this.props.rowModelType || this.props.rowModelType === \"clientSide\") {\r\n // table is shown\r\n this.gridApi.refreshClientSideRowModel(\"group\");\r\n }\r\n this.gridApi.redrawRows();\r\n }\r\n });\r\n }\r\n\r\n /** Opens/closes the columns configuration dialog and calls `props.onColumnsConfigVisible`. */\r\n showColumnsConfig(show: boolean) {\r\n if (this.props.onColumnsConfigVisible) {\r\n this.props.onColumnsConfigVisible(show);\r\n }\r\n this.columnModelBeforeEdit = cloneDeep(this.state.columnModel);\r\n this.setState({columnsConfigVisible: show});\r\n }\r\n\r\n private navigateToNextCell(params: NavigateToNextCellParams): CellPosition {\r\n this.lastNavigationEvent = NavigationEventEnum.KEYBOARD;\r\n var suggestedNextCell = params.nextCellPosition;\r\n if (!this.gridApi) {\r\n return suggestedNextCell ?? params.previousCellPosition;\r\n }\r\n const pageIndex = this.gridApi.paginationGetCurrentPage();\r\n const totalPages = this.gridApi.paginationGetTotalPages();\r\n var previousCell = params.previousCellPosition;\r\n switch (params.event?.code) {\r\n case Key.ArrowDown:\r\n if ((previousCell.rowIndex + 1) >= this.gridApi.getDisplayedRowCount()) {\r\n if (pageIndex < (totalPages - 1)) {\r\n this.onGoToPage(pageIndex + 1);\r\n return {\r\n rowIndex: 0,\r\n column: previousCell.column,\r\n rowPinned: previousCell.rowPinned\r\n };\r\n } else {\r\n return {\r\n rowIndex: previousCell.rowIndex,\r\n column: previousCell.column,\r\n rowPinned: previousCell.rowPinned\r\n };\r\n }\r\n\r\n }\r\n break;\r\n case Key.ArrowUp:\r\n if ((previousCell.rowIndex - 1) < 0) {\r\n if (pageIndex > 0) {\r\n this.onGoToPage(pageIndex - 1);\r\n return {\r\n rowIndex: this.gridApi.getDisplayedRowCount() - 1,\r\n column: previousCell.column,\r\n rowPinned: previousCell.rowPinned\r\n };\r\n } else {\r\n return {\r\n rowIndex: previousCell.rowIndex,\r\n column: previousCell.column,\r\n rowPinned: previousCell.rowPinned\r\n };\r\n }\r\n }\r\n break;\r\n }\r\n return suggestedNextCell ?? params.previousCellPosition;\r\n }\r\n\r\n private suppressKeyboardEvent(params: SuppressKeyboardEventParams): boolean {\r\n if (!this.gridApi || params.event.type === \"keypress\") {\r\n return false;\r\n }\r\n const pageIndex = this.gridApi.paginationGetCurrentPage();\r\n const totalPages = this.gridApi.paginationGetTotalPages();\r\n switch (params.event.code) {\r\n case Key.ArrowDown:\r\n case Key.ArrowUp:\r\n case Key.ArrowLeft:\r\n case Key.ArrowRight:\r\n if (params.editing && params.event.altKey) {\r\n const focusedCell = this.gridApi.getFocusedCell();\r\n if (focusedCell) {\r\n let indexToJump: number;\r\n let columnToJump: Column;\r\n if (params.event.code === Key.ArrowDown) {\r\n indexToJump = focusedCell.rowIndex + 1;\r\n columnToJump = focusedCell.column;\r\n if (indexToJump >= this.gridApi.getDisplayedRowCount()) {\r\n if (pageIndex < (totalPages - 1)) {\r\n this.onGoToPage(pageIndex + 1);\r\n indexToJump = 0\r\n } else {\r\n indexToJump = focusedCell.rowIndex;\r\n }\r\n }\r\n this.lastNavigationEvent = NavigationEventEnum.KEYBOARD;\r\n this.indexToJump = indexToJump;\r\n this.columnToJump = columnToJump;\r\n setTimeout(() => {\r\n this.gridApi?.startEditingCell({\r\n rowIndex: indexToJump,\r\n colKey: columnToJump,\r\n key: Key.Enter\r\n });\r\n }, 0);\r\n return true;\r\n } else if (params.event.code === Key.ArrowUp) {\r\n indexToJump = focusedCell.rowIndex - 1;\r\n columnToJump = focusedCell.column;\r\n if (indexToJump < 0) {\r\n if (pageIndex > 0) {\r\n this.onGoToPage(pageIndex - 1);\r\n indexToJump = this.gridApi.getDisplayedRowCount() - 1;\r\n } else {\r\n indexToJump = focusedCell.rowIndex;\r\n }\r\n }\r\n this.lastNavigationEvent = NavigationEventEnum.KEYBOARD;\r\n this.indexToJump = indexToJump;\r\n this.columnToJump = columnToJump;\r\n setTimeout(() => {\r\n this.gridApi?.startEditingCell({\r\n rowIndex: indexToJump,\r\n colKey: columnToJump,\r\n key: Key.Enter\r\n });\r\n }, 0);\r\n return true;\r\n } else if (params.event.code === Key.ArrowLeft) {\r\n this.gridApi.tabToPreviousCell();\r\n break;\r\n } else /*Key.ArrowRight*/ {\r\n this.gridApi.tabToNextCell();\r\n break;\r\n }\r\n }\r\n }\r\n break;\r\n case Key.PageDown:\r\n this.lastNavigationEvent = NavigationEventEnum.KEYBOARD;\r\n if (pageIndex < (totalPages - 1)) {\r\n this.gridApi.paginationGoToNextPage();\r\n const focusedCell = this.gridApi.getFocusedCell();\r\n if (focusedCell) {\r\n this.indexToJump = Math.min(focusedCell.rowIndex + this.gridApi.paginationGetPageSize(), this.gridApi.paginationGetRowCount());\r\n this.columnToJump = focusedCell.column;\r\n return true;\r\n }\r\n }\r\n break;\r\n case Key.PageUp:\r\n this.lastNavigationEvent = NavigationEventEnum.KEYBOARD;\r\n if (pageIndex > 0) {\r\n this.gridApi.paginationGoToPreviousPage();\r\n const focusedCell = this.gridApi.getFocusedCell();\r\n if (focusedCell) {\r\n this.indexToJump = Math.max(focusedCell.rowIndex - this.gridApi.paginationGetPageSize(), 0);\r\n this.columnToJump = focusedCell.column;\r\n return true;\r\n }\r\n }\r\n break;\r\n case Key.End:\r\n this.lastNavigationEvent = NavigationEventEnum.KEYBOARD;\r\n if (pageIndex < (totalPages - 1)) {\r\n this.gridApi.paginationGoToLastPage();\r\n const focusedCell = this.gridApi.getFocusedCell();\r\n if (focusedCell) {\r\n this.indexToJump = this.gridApi.paginationGetRowCount() - 1;\r\n this.columnToJump = focusedCell.column;\r\n return true;\r\n }\r\n }\r\n break;\r\n case Key.Home:\r\n this.lastNavigationEvent = NavigationEventEnum.KEYBOARD;\r\n if (pageIndex > 0) {\r\n this.gridApi.paginationGoToFirstPage();\r\n const focusedCell = this.gridApi.getFocusedCell();\r\n if (focusedCell) {\r\n this.indexToJump = 0;\r\n this.columnToJump = focusedCell.column;\r\n return true;\r\n }\r\n }\r\n break;\r\n case \"KeyA\":\r\n if (params.event.ctrlKey && !params.editing) {\r\n var firstRow = this.gridApi.getFirstDisplayedRowIndex();\r\n var lastRow = this.gridApi.getLastDisplayedRowIndex();\r\n this.gridApi.deselectAll();\r\n if (this.props.rowModelType === \"infinite\") {\r\n for (let i = firstRow; i <= lastRow; i++) {\r\n this.gridApi.getDisplayedRowAtIndex(i)?.setSelected(true);\r\n }\r\n } else {\r\n this.gridApi.forEachNodeAfterFilter(function (node, index) {\r\n if (index >= firstRow && index <= lastRow) {\r\n node.setSelected(true);\r\n }\r\n });\r\n }\r\n }\r\n break;\r\n case \"KeyI\":\r\n if (params.event.ctrlKey) {\r\n const focusedCell = this.gridApi.getFocusedCell();\r\n const column = this.gridApi?.getColumn(\"objectId\") ?? this.gridApi?.getColumn(\"id\");\r\n if (focusedCell && column) {\r\n const displayedRowAtIndex = this.gridApi.getDisplayedRowAtIndex(focusedCell.rowIndex);\r\n if (displayedRowAtIndex) {\r\n ClipboardUtils.copyToClipboard(this.getValue(column, displayedRowAtIndex));\r\n }\r\n this.gridApi.setFocusedCell(focusedCell.rowIndex, focusedCell.column.getId());\r\n }\r\n }\r\n break;\r\n case \"KeyB\":\r\n if (params.event.ctrlKey) {\r\n const focusedCell = this.gridApi.getFocusedCell();\r\n const column = this.gridApi?.getColumn(\"objectName\") ?? this.gridApi?.getColumn(\"name\");\r\n if (focusedCell && column) {\r\n const displayedRowAtIndex1 = this.gridApi.getDisplayedRowAtIndex(focusedCell.rowIndex);\r\n if (displayedRowAtIndex1) {\r\n ClipboardUtils.copyToClipboard(this.getValue(column, displayedRowAtIndex1));\r\n }\r\n this.gridApi.setFocusedCell(focusedCell.rowIndex, focusedCell.column.getId());\r\n }\r\n }\r\n break;\r\n case \"KeyC\":\r\n if (params.event.ctrlKey && !params.editing) {\r\n if (this.gridApi.getSelectedRows().length > 1) {\r\n const tableContent: string[][] = [];\r\n const convert = (data: string[][]) => data.map((row) => row.join('\\t')).join('\\r\\n');\r\n const columns = this.gridApi.getAllDisplayedColumns().map((column: Column) => {\r\n const columnTypes = column.getColDef().type;\r\n return {\r\n column: column,\r\n displayName: this.gridApi?.getDisplayNameForColumn(column, null) ?? column.getColDef().headerName,\r\n isDateField: columnTypes && columnTypes.indexOf(\"dateColumn\") >= 0,\r\n isDateTimeField: columnTypes && columnTypes.indexOf(\"dateTimeColumn\") >= 0\r\n };\r\n });\r\n let tableNodes: IRowNode[] = [];\r\n\r\n if (columns.length === 0) {\r\n ClipboardUtils.copyToClipboard(convert(tableContent));\r\n }\r\n\r\n tableContent.push(columns.map((column) => column.displayName ?? \"\"));\r\n this.gridApi.forEachNodeAfterFilterAndSort((node) => {\r\n if (node.isSelected()) {\r\n tableNodes.push(node);\r\n }\r\n });\r\n\r\n for (let index = 0; index < tableNodes.length; index++) {\r\n const record: string[] = [];\r\n\r\n columns.forEach((column) => {\r\n let value = this.getValue(column.column, tableNodes[index]);\r\n record.push(value);\r\n });\r\n tableContent.push(record);\r\n }\r\n\r\n ClipboardUtils.copyToClipboard(convert(tableContent));\r\n } else {\r\n const focusedCell = this.gridApi.getFocusedCell();\r\n if (focusedCell) {\r\n const displayedRowAtIndex2 = this.gridApi.getDisplayedRowAtIndex(focusedCell.rowIndex);\r\n if (displayedRowAtIndex2) {\r\n ClipboardUtils.copyToClipboard(this.getValue(focusedCell.column, displayedRowAtIndex2, true));\r\n }\r\n this.gridApi.setFocusedCell(focusedCell.rowIndex, focusedCell.column.getId());\r\n }\r\n }\r\n }\r\n break;\r\n case Key.Enter:\r\n this.props.onEnter?.();\r\n break;\r\n }\r\n this.props.onKeyPressed?.(params.event, params.editing);\r\n return false;\r\n }\r\n\r\n /**\r\n * Returns the cell value as used for clipboard copy and export: the ag-grid cell value passed through the column's\r\n * `valueFormatter` (a string formatter is treated as a field path into the row data).\r\n * @param doNotReplaceNewline - keep line breaks in values containing {@link EXPORT_SEPARATOR} (otherwise replaced by a space)\r\n */\r\n getValue(column: Column, row: IRowNode, doNotReplaceNewline?: boolean): string {\r\n let formattedValue = this.gridApi?.getCellValue({rowNode: row, colKey: column});\r\n if (formattedValue && typeof formattedValue === \"string\" && formattedValue.indexOf(EXPORT_SEPARATOR) > 0 && !doNotReplaceNewline) {\r\n formattedValue = formattedValue.replace(/[\\n\\r]+/g, ' ');\r\n }\r\n const valueFormatter = column.getColDef().valueFormatter;\r\n if (valueFormatter) {\r\n const params: ValueFormatterParams = {\r\n data: row.data,\r\n node: row,\r\n column: column,\r\n colDef: column.getColDef(),\r\n api: this.gridApi as GridApi,\r\n context: this.gridApi?.getGridOption('context'),\r\n value: formattedValue\r\n };\r\n if (typeof valueFormatter === 'function') {\r\n formattedValue = valueFormatter?.(params);\r\n } else if (typeof valueFormatter === 'string') {\r\n formattedValue = at(row.data, valueFormatter)[0];\r\n }\r\n }\r\n return formattedValue;\r\n }\r\n\r\n /**\r\n * Collects the table content for export: a header row with the displayed column names followed by one row of\r\n * {@link DataGrid.getValue} values per record (all filtered and sorted rows, or only the selected ones when\r\n * `props.onlySelectedNodes` is set). With a non client-side row model it waits for rows to be loaded.\r\n * @param progressPopup - optional popup updated with the progress\r\n * @returns rows of cell strings; empty when the grid is not ready\r\n */\r\n async getExportContent(progressPopup: ProgressPopup | null, props: ContextMenuProps): Promise<string[][]> {\r\n if (!this.gridApi) {\r\n return [];\r\n }\r\n\r\n const tableContent: string[][] = [];\r\n const columns = this.gridApi.getAllDisplayedColumns().map((column: Column) => {\r\n const columnTypes = column.getColDef().type;\r\n return {\r\n column: column,\r\n displayName: this.gridApi?.getDisplayNameForColumn(column, null) ?? column.getColDef().headerName,\r\n isDateField: columnTypes && columnTypes.indexOf(\"dateColumn\") >= 0,\r\n isDateTimeField: columnTypes && columnTypes.indexOf(\"dateTimeColumn\") >= 0\r\n };\r\n });\r\n if (columns.length === 0) {\r\n return tableContent;\r\n }\r\n tableContent.push(columns.map((column) => column.displayName ?? \"\"));\r\n\r\n let rowCount: number;\r\n let tableNodes: IRowNode[] = [];\r\n if (this.gridApi.getGridOption('rowModelType') === \"clientSide\") {\r\n if (props.onlySelectedNodes) {\r\n rowCount = 0;\r\n this.gridApi.forEachNodeAfterFilterAndSort((node) => {\r\n if (node.isSelected()) {\r\n tableNodes.push(node);\r\n rowCount++;\r\n }\r\n });\r\n } else {\r\n rowCount = this.gridApi.getDisplayedRowCount();\r\n this.gridApi.forEachNodeAfterFilterAndSort((node) => {\r\n tableNodes.push(node);\r\n });\r\n }\r\n } else {\r\n if (props.onlySelectedNodes) {\r\n const selectedNodes = this.gridApi.getSelectedNodes();\r\n rowCount = selectedNodes.length;\r\n selectedNodes.forEach((node) => {\r\n tableNodes.push(node);\r\n });\r\n tableNodes.sort((a, b) => (a.rowIndex ?? 0) > (b.rowIndex ?? 0) ? 1 : (a.rowIndex === b.rowIndex) ? 0 : -1);\r\n } else {\r\n const virtualRowCount = this.gridApi.getDisplayedRowCount();\r\n rowCount = virtualRowCount ? virtualRowCount : 0;\r\n }\r\n }\r\n progressPopup?.setRecordCount(rowCount);\r\n\r\n let percentStep = Math.floor(rowCount / 100);\r\n if (percentStep < 100) {\r\n percentStep = 100;\r\n }\r\n\r\n if (this.gridApi.getGridOption('rowModelType') === \"clientSide\" || props.onlySelectedNodes) {\r\n for (let index = 0; index < tableNodes.length; index++) {\r\n const record: string[] = [];\r\n columns.forEach((column) => {\r\n let value = this.getValue(column.column, tableNodes[index]);\r\n record.push(value);\r\n });\r\n tableContent.push(record);\r\n if (index % percentStep === 0) {\r\n progressPopup?.update(Math.floor(index / rowCount * 100) - 1);\r\n await TimeUtils.sleep(100);\r\n }\r\n }\r\n } else {\r\n for (let index = 0; index < rowCount; index++) {\r\n let row: RowNode | undefined = undefined;\r\n let record: any[] = [];\r\n do {\r\n record = [];\r\n do {\r\n row = this.gridApi.getDisplayedRowAtIndex(index) as RowNode;\r\n if (!row || !row.data) {\r\n await TimeUtils.sleep(100);\r\n }\r\n } while (!row || !row.data);\r\n columns.forEach((column) => {\r\n record.push(this.getValue(column.column, row as RowNode));\r\n });\r\n if (record.filter((cell) => !!cell).length === 0) {\r\n await TimeUtils.sleep(100);\r\n }\r\n } while (record.filter((cell) => !!cell).length === 0);\r\n tableContent.push(record);\r\n if (index % percentStep === 0) {\r\n // noinspection ES6MissingAwait\r\n progressPopup?.update(Math.floor(index / rowCount * 100) - 1);\r\n await TimeUtils.sleep(100);\r\n }\r\n }\r\n }\r\n // noinspection ES6MissingAwait\r\n progressPopup?.update(99);\r\n await TimeUtils.sleep(300);\r\n return tableContent;\r\n }\r\n\r\n /**\r\n * ag-grid `cellFocused` handler: selects the focused row (Shift+arrow extends/shrinks the selection), tracks the\r\n * fill handle cell and forwards the event to `props.onCellFocused`.\r\n */\r\n onCellFocused(event: CellFocusedEvent) {\r\n const row: IRowNode | undefined = event.rowIndex !== null ? this.gridApi?.getDisplayedRowAtIndex(event.rowIndex) : undefined;\r\n if (row) {\r\n if (this.lastNavigationEvent === NavigationEventEnum.KEYBOARD && KeyboardUtils.isKeyPressed(Key.Shift) && this.lastCellFocus && this.lastCellFocus.rowIndex !== event.rowIndex) {\r\n // focusing new row with SHIFT key pressed\r\n if (!row.isSelected()) {\r\n // add to selection\r\n row.setSelected(true, false);\r\n } else if (this.lastCellFocus?.rowIndex !== null) {\r\n const lastFocusedRow: IRowNode | undefined = this.gridApi?.getDisplayedRowAtIndex(this.lastCellFocus.rowIndex);\r\n if (lastFocusedRow?.isSelected()) {\r\n lastFocusedRow.setSelected(false, false);\r\n }\r\n }\r\n } else if (!row.isSelected() && !KeyboardUtils.isKeyPressed(Key.Control) && !KeyboardUtils.isKeyPressed(Key.Shift)) {\r\n row.setSelected(true, true);\r\n }\r\n }\r\n\r\n if (event.rowIndex !== null && event.column !== null && this.props.showFillHandle) {\r\n const colId = typeof event.column === \"string\" ? event.column : event.column.getColId();\r\n\r\n this.setState({focusedCell: {rowIndex: event.rowIndex, colId: colId}}, () => {\r\n this.gridApi?.refreshCells({force: true});\r\n })\r\n }\r\n\r\n this.props.onCellFocused?.(event);\r\n this.lastCellFocus = event;\r\n }\r\n\r\n /** ag-grid `cellMouseOver` handler: extends the fill handle range while dragging. */\r\n onCellMouseOver(e: CellMouseOverEvent) {\r\n if (this.state.isDragging) {\r\n this.setState({endCoord: {rowIndex: e.rowIndex!, colId: e.column.getColId()}}, () => {\r\n this.gridApi?.refreshCells({force: true});\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * ag-grid `cellMouseDown` handler: focuses the clicked cell, forwards the event to `props.onCellMouseDown` and\r\n * starts a fill handle drag when the bottom-right corner of the cell is pressed.\r\n */\r\n onCellMouseDown(e: CellMouseDownEvent) {\r\n this.lastNavigationEvent = NavigationEventEnum.MOUSE;\r\n // always focus clicked cell (also when using shift key)\r\n if (e.rowIndex !== null) {\r\n this.setFocusedCellDebounced(e.rowIndex, e.column, e.rowPinned !== null ? e.rowPinned : undefined);\r\n }\r\n this.props.onCellMouseDown?.(e);\r\n\r\n if (this.props.showFillHandle) {\r\n const mouseEvent = e.event as MouseEvent;\r\n const cellElement = (mouseEvent.target as HTMLElement).closest<HTMLElement>('.ag-cell');\r\n const rect = cellElement?.getBoundingClientRect();\r\n const isHandleClick = rect !== undefined && (rect.right - mouseEvent.clientX < 10) && (rect.bottom - mouseEvent.clientY < 10);\r\n\r\n if (isHandleClick) {\r\n this.setState({\r\n isDragging: true,\r\n startCoord: {rowIndex: e.rowIndex!, colId: e.column.getColId()},\r\n endCoord: {rowIndex: e.rowIndex!, colId: e.column.getColId()}\r\n });\r\n }\r\n }\r\n }\r\n\r\n /** Window `mouseup` handler: finishes a fill handle drag and calls `props.onFillHandleComplete`. */\r\n onMouseUp() {\r\n if (this.state.isDragging) {\r\n const columns = this.gridApi?.getAllDisplayedColumns().map((c) => c.getColId()) ?? [];\r\n\r\n if (this.state.startCoord && this.state.endCoord) {\r\n const startIndex = columns.findIndex((c) => c === this.state.startCoord?.colId);\r\n const endIndex = columns.findIndex((c) => c === this.state.endCoord?.colId);\r\n\r\n if (startIndex >= 0 && endIndex >= 0) {\r\n const actualStart = Math.min(startIndex, endIndex);\r\n const actualEnd = Math.max(startIndex, endIndex);\r\n const actualRowStart = Math.min(this.state.startCoord.rowIndex, this.state.endCoord.rowIndex);\r\n const actualRowEnd = Math.max(this.state.startCoord.rowIndex, this.state.endCoord.rowIndex);\r\n\r\n this.props.onFillHandleComplete?.(actualRowStart, actualRowEnd, columns.slice(actualStart, actualEnd + 1));\r\n }\r\n }\r\n\r\n this.setState({isDragging: false, startCoord: null, endCoord: null}, () => {\r\n this.gridApi?.refreshCells({force: true});\r\n });\r\n }\r\n };\r\n\r\n /** Focuses the given cell; debounced by 200 ms. */\r\n setFocusedCellDebounced(rowIndex: number, column: string | Column, rowPinned: RowPinnedType) {\r\n this.gridApi?.setFocusedCell(rowIndex, column, rowPinned);\r\n }\r\n\r\n private onCellContextMenu(event: CellContextMenuEvent) {\r\n this.setState({contextMenuVisible: !!event});\r\n if (event.node) {\r\n if (!event.node.isSelected()) {\r\n event.node.setSelected(true, true);\r\n }\r\n }\r\n }\r\n\r\n private loadingOverlayRenderer(): ReactElement {\r\n if (this.props.loadingOverlayRenderer) {\r\n const loadingOverlay = this.props.loadingOverlayRenderer();\r\n if (loadingOverlay) {\r\n return loadingOverlay;\r\n }\r\n }\r\n return <div><LoadingOutlined style={{fontSize: 40, color: \"#1890ff\"}}/></div>;\r\n }\r\n\r\n private noRecordsOverlayRenderer(): ReactElement {\r\n if (this.props.noRecordsOverlayRenderer) {\r\n const noRecordsOverlay = this.props.noRecordsOverlayRenderer();\r\n if (noRecordsOverlay) {\r\n return noRecordsOverlay;\r\n }\r\n }\r\n return (\r\n <Empty description={i18n(\"No records found.\")} styles={{image: {height: \"8vh\"}}}>\r\n <Button type=\"primary\" onClick={() => {\r\n if (this.props.search && this.props.search.onSearch) {\r\n this.props.search.onSearch();\r\n }\r\n }}>\r\n <SearchOutlined/> {i18n(\"Search\")}\r\n </Button>\r\n </Empty>\r\n );\r\n }\r\n\r\n /**\r\n * Replaces the grid's row data (client-side row model) without going through the `rowData` prop; intended for\r\n * {@link DataGridProps.rowDataManualMode}. No-op until the grid is ready.\r\n */\r\n public setRowData(dataArray: any[]): void {\r\n this.gridApi?.updateGridOptions({rowData: dataArray});\r\n }\r\n\r\n private onRowDataUpdated(event: RowDataUpdatedEvent) {\r\n if (!this.gridApi) {\r\n return;\r\n }\r\n const currentPage = this.gridApi.paginationGetCurrentPage();\r\n const recordsCount = this.props.paging.pageSize >= 0 ? (this.gridApi.paginationIsLastPageFound() ? this.gridApi.paginationGetRowCount() : 0) : this.gridApi.getDisplayedRowCount();\r\n this.setState({recordsCount: recordsCount, pageIndex: currentPage});\r\n if (this.props.onRowDataUpdated) {\r\n this.props.onRowDataUpdated(event);\r\n }\r\n }\r\n\r\n private static EMPTY_STYLE: RowStyle = {}\r\n\r\n /** ag-grid `getRowStyle` implementation: merges the matching `rowStyleRules` and then `props.getRowStyle`. */\r\n _getRowStyle(params: RowClassParams): RowStyle {\r\n const rowStyleRules = this.props.rowStyleRules;\r\n if (rowStyleRules) {\r\n const style: any = {};\r\n rowStyleRules.forEach((rowStyleRule) => {\r\n if (rowStyleRule.expression) {\r\n if (!rowStyleRuleCompiledExpressions[rowStyleRule.expression]) {\r\n rowStyleRuleCompiledExpressions[rowStyleRule.expression] = compileExpression(rowStyleRule.expression);\r\n }\r\n if (rowStyleRuleCompiledExpressions[rowStyleRule.expression](params.node.data)) {\r\n Object.assign(style, rowStyleRule.style);\r\n }\r\n } else {\r\n Object.assign(style, rowStyleRule.style);\r\n }\r\n });\r\n if (!style.color) {\r\n style.color = null;\r\n } else if (typeof style.color === \"object\") {\r\n style.color = `rgba(${style.color.r},${style.color.g},${style.color.b},${style.color.a})`;\r\n }\r\n if (!style.backgroundColor) {\r\n // \"\" removes a stale inline color (ag-grid skips null) without overriding the theme's odd-row background\r\n style.backgroundColor = \"\";\r\n } else if (typeof style.backgroundColor === \"object\") {\r\n style.backgroundColor = `rgba(${style.backgroundColor.r},${style.backgroundColor.g},${style.backgroundColor.b},${style.backgroundColor.a})`;\r\n }\r\n if (!style.fontWeight) {\r\n style.fontWeight = \"inherit\";\r\n }\r\n const fontSize = style.fontSize;\r\n if (style.fontSize) {\r\n style.fontSize = style.fontSize + \"px\";\r\n } else {\r\n style.fontSize = \"inherit\";\r\n }\r\n if (style.rowHeightDelta) {\r\n const lineHeight = calculateLineHeight(fontSize, style.rowHeightDelta);\r\n if (style.rowHeightDelta) {\r\n delete style.rowHeightDelta;\r\n }\r\n style.lineHeight = lineHeight + \"px\";\r\n } else {\r\n const lineHeight = calculateLineHeight(fontSize, GRID_DEFAULT_ROW_HEIGHT_DELTA);\r\n style.lineHeight = lineHeight + \"px\";\r\n }\r\n if (this.props.getRowStyle) {\r\n const rowStyle = this.props.getRowStyle(params);\r\n if (rowStyle) {\r\n return Object.assign(style, rowStyle) as RowStyle;\r\n }\r\n }\r\n return style as RowStyle;\r\n }\r\n return DataGrid.EMPTY_STYLE;\r\n }\r\n\r\n /** ag-grid `getRowHeight` implementation: the current row height in pixels. */\r\n _getRowHeight(): number {\r\n return this.state.rowHeight;\r\n }\r\n\r\n /** Cell style applied to every adapted column: font size, right alignment for `alignRight` and the column's own `cellStyle`. */\r\n _getCellStyle(params: { colDef: ColDef }) {\r\n const fontSize = this.state.fontSize;\r\n const cellStyles: { [key: string]: any } = {\"fontSize\": fontSize + \"px\"};\r\n if (params.colDef.type && params.colDef.type.indexOf(\"alignRight\") >= 0) {\r\n cellStyles[\"textAlign\"] = \"right\";\r\n }\r\n if (params.colDef.cellRendererParams?.originalCellStyle) {\r\n const originalCellStylesOrHandler = params.colDef.cellRendererParams.originalCellStyle as {} | ((params: any) => {});\r\n if (typeof originalCellStylesOrHandler === \"object\") {\r\n Object.assign(cellStyles, originalCellStylesOrHandler);\r\n } else if (typeof originalCellStylesOrHandler === \"function\") {\r\n const originalCellStyles = originalCellStylesOrHandler(params);\r\n if (originalCellStyles) {\r\n Object.assign(cellStyles, originalCellStyles);\r\n }\r\n }\r\n }\r\n return cellStyles;\r\n }\r\n\r\n /** Returns `props.defaultColDef` extended with the grid's keyboard handling (`suppressKeyboardEvent` is always overridden). */\r\n getDefaultColDefinition(colDef: ColDef | undefined): ColDef {\r\n if (colDef) {\r\n return {...colDef, suppressKeyboardEvent: this.suppressKeyboardEvent} as ColDef;\r\n } else {\r\n return {suppressKeyboardEvent: this.suppressKeyboardEvent} as ColDef;\r\n }\r\n }\r\n\r\n private getCustomComponents(components: any) {\r\n let customComponents = gridFrameworkComponents;\r\n if (components) {\r\n customComponents = Object.assign(gridFrameworkComponents, components);\r\n }\r\n return customComponents;\r\n }\r\n\r\n private onPageOrientationChange(pageOrientation: PageOrientation) {\r\n this.setState({pageOrientation: pageOrientation});\r\n }\r\n\r\n private onExport(start: boolean) {\r\n this.setState({exporting: start});\r\n }\r\n\r\n /** Renders the toolbar row: toolbar with search, pager (or record range when paging is disabled) and `toolbar.extraContent`. */\r\n renderNavigationPanel(): ReactElement {\r\n return (\r\n <React.Fragment>\r\n {this.props.toolbar && this.props.toolbar.renderToolbar ? this.props.toolbar.renderToolbar(this.renderToolBarWithSearch()) : this.renderToolBarWithSearch()}\r\n {this.props.paging.pageSize >= 0 &&\r\n <DataGridPagination\r\n disabled={this.state.loading}\r\n current={this.state.pageIndex ? this.state.pageIndex + 1 : 1}\r\n pageSize={this.state.pageSize ? this.state.pageSize : 20}\r\n total={this.state.recordsCount ?? 1}\r\n compact={this.props.toolbar?.compact}\r\n onGoToPage={page => {\r\n this.onGoToPage(page - 1);\r\n }}\r\n />}\r\n {this.props.paging.pageSize < 0 && this.state.recordsCount && !this.props.toolbar?.hideRecordCount ?\r\n <WithCss useStyles={useStyles}>\r\n {({styles}) =>\r\n <span className={styles.recordRange}\r\n style={{\r\n flex: \"0 1 auto\",\r\n textAlign: \"right\",\r\n whiteSpace: \"nowrap\",\r\n margin: \"0 12px\",\r\n }}>{`${this.state.viewport[0]}-${this.state.viewport[1]} ${i18n('of')} ${this.state.recordsCount}`}</span>}\r\n </WithCss>\r\n : undefined}\r\n {this.props.toolbar?.extraContent}\r\n </React.Fragment>\r\n );\r\n }\r\n\r\n /**\r\n * Renders the default toolbar: `toolbar.toolbarButtons`, export and settings menus, search field and search button.\r\n * With `toolbar.compact` the export and settings buttons move into a popover opened by one button.\r\n */\r\n renderToolBarWithSearch(): ReactElement {\r\n const compact = this.props.toolbar?.compact;\r\n const search = this.props.search;\r\n\r\n return (\r\n <Space.Compact key=\"filter-panel\"\r\n className=\"datagrid-autocomplete-input-group\"\r\n style={{whiteSpace: \"nowrap\", flexGrow: 1, display: \"flex\"}}>\r\n {this.props.toolbar?.toolbarButtons}\r\n {compact ? this.renderCompactMenu() : <>\r\n {this.renderExportButton()}\r\n {this.renderSettingsButton()}\r\n </>}\r\n {!search?.hidden && !search?.searchRenderer && <AutoCompleteInput\r\n style={{minWidth: 100, flexGrow: 1}}\r\n placeholder={search?.placeholder}\r\n stringFormatter={search?.stringFormatter}\r\n value={search?.searchString}\r\n options={search?.searchHistory}\r\n onChange={search?.onChange}\r\n onSearch={search?.onSearch}\r\n disabled={this.state.loading || this.props.filter?.columnSearchVisible}\r\n />}\r\n {search?.searchRenderer?.()}\r\n {!search?.searchButtonHidden && this.renderSearchButton()}\r\n </Space.Compact>\r\n );\r\n }\r\n\r\n /**\r\n * Button of the compact toolbar opening a popover with the export and settings buttons, so that a phone screen\r\n * keeps room for the pager. The popover closes once one of their menu items is used.\r\n */\r\n private renderCompactMenu(): ReactElement {\r\n const close = () => this.setState({compactMenuOpen: false});\r\n\r\n return (\r\n <Popover open={this.state.compactMenuOpen}\r\n onOpenChange={open => this.setState({compactMenuOpen: open})}\r\n trigger=\"click\"\r\n placement=\"bottomLeft\"\r\n // the menus are built only while the popover is open - the grid renders often, e.g. while scrolling\r\n destroyOnHidden\r\n content={\r\n <RenderLater>{() =>\r\n <Space.Compact>\r\n {this.renderExportButton(close)}\r\n {this.renderSettingsButton(close)}\r\n </Space.Compact>\r\n }</RenderLater>\r\n }>\r\n <Button title={i18n(\"Extended table features\")}>\r\n {this.state.loading ? <LoadingOutlined/> : <EllipsisOutlined/>}\r\n </Button>\r\n </Popover>\r\n );\r\n }\r\n\r\n /** Export button with the export menu; `onUsed` is called after a menu item is clicked. */\r\n private renderExportButton(onUsed?: () => void): ReactElement {\r\n const exportMenu = getContextMenu({\r\n showMilliseconds: !!this.props.showMilliseconds,\r\n showYear: !this.props.hideYear,\r\n showUtcOffset: LocaleHolder.resolveUtcOffsetMode(this.props.showUtcOffset),\r\n renderer: this.props.exportMenu?.renderer,\r\n onClick: this.props.exportMenu?.onClick,\r\n onExported: this.props.exportMenu?.onExported,\r\n getExportContent: this.getExportContent,\r\n pageOrientation: this.state.pageOrientation,\r\n exporting: this.state.exporting,\r\n onPageOrientationChange: this.onPageOrientationChange,\r\n onExport: this.onExport\r\n });\r\n\r\n return (\r\n <Dropdown trigger={[\"click\"]}\r\n menu={withOnUsed(exportMenu, onUsed)}\r\n disabled={this.state.loading}>\r\n <Button title={i18n(\"Export\")}>\r\n <DownloadOutlined/>\r\n </Button>\r\n </Dropdown>\r\n );\r\n }\r\n\r\n /** Table settings button with the settings menu; `onUsed` is called after a menu item is clicked. */\r\n private renderSettingsButton(onUsed?: () => void): ReactElement {\r\n const settingsMenu = this.getSettingsMenu();\r\n\r\n return (\r\n <Dropdown trigger={[\"click\"]}\r\n menu={withOnUsed(settingsMenu, onUsed)}>\r\n <Button\r\n title={i18n(\"Extended table features\")}\r\n disabled={this.state.loading}>\r\n <TableOutlined/>\r\n </Button>\r\n </Dropdown>\r\n );\r\n }\r\n\r\n /** The primary search button - a refresh button when the search field is hidden. */\r\n private renderSearchButton(): ReactElement {\r\n const search = this.props.search;\r\n\r\n return (\r\n <Button title={search?.hidden ? i18n(\"Refresh\") : i18n(\"Search\")}\r\n className={\"search-btn \" + (search?.searchButtonClassName ?? \"\")}\r\n disabled={search?.searchButtonDisabled}\r\n type=\"primary\"\r\n danger={search?.searchButtonDanger}\r\n onClick={() => {\r\n this.setState({compactMenuOpen: false});\r\n search?.onSearch?.();\r\n }}>\r\n {this.state.loading ? <LoadingOutlined/> : (search?.searchButtonIcon ?? (search?.hidden ? <ReloadOutlined/> :\r\n <SearchOutlined/>))}\r\n </Button>\r\n );\r\n }\r\n\r\n /** Builds the toolbar settings menu (keys `columnFilter`, `autosizeAllColumns`, `columnsConfig`, `advancedConfig`), passed through `settingsMenu.renderer`. */\r\n getSettingsMenu(): MenuProps {\r\n let menuItems: MenuElement[] = [\r\n {\r\n key: \"columnFilter\",\r\n icon: <FileSearchOutlined/>,\r\n className: this.props.filter && this.props.filter.columnSearchVisible ? \"ant-dropdown-menu-item-selected\" : \"\",\r\n title: i18n(\"Turn on/off column filter\"),\r\n label: i18n(\"Column Filter\"),\r\n },\r\n {\r\n key: \"autosizeAllColumns\",\r\n icon: <ColumnWidthOutlined/>,\r\n label: i18n(\"Autosize All Columns\"),\r\n },\r\n {\r\n key: \"columnsConfig\",\r\n icon: <ControlOutlined/>,\r\n label: i18n(\"Columns Configuration\"),\r\n },\r\n {\r\n key: \"columnsAndAdvancedConfigDivider\",\r\n type: \"divider\"\r\n },\r\n {\r\n key: \"advancedConfig\",\r\n icon: <SettingOutlined/>,\r\n label: i18n(\"Advanced Settings\"),\r\n }\r\n ];\r\n\r\n if (this.props.settingsMenu?.renderer) {\r\n menuItems = this.props.settingsMenu.renderer(menuItems);\r\n }\r\n\r\n return {\r\n items: menuItems,\r\n onClick: (menuInfo) => {\r\n switch (menuInfo.key) {\r\n case \"columnFilter\":\r\n const visible = !(this.props.filter && this.props.filter.columnSearchVisible);\r\n this.setColumnSearchVisible(visible);\r\n break;\r\n case \"autosizeAllColumns\":\r\n this.gridApi?.autoSizeAllColumns();\r\n break;\r\n case \"columnsConfig\":\r\n this.showColumnsConfig(true);\r\n break;\r\n case \"advancedConfig\":\r\n this.showTableConfiguration(true);\r\n break;\r\n default:\r\n if (this.props.settingsMenu?.onClick) {\r\n this.props.settingsMenu.onClick(menuInfo.key + \"\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n private getAdaptedColumnDefs(columnDefs: (DataGridColDef | DataGridColGroupDef)[], floatingFilterEnabled: boolean | undefined, disableColumnDefsPreprocessing: boolean) {\r\n if (columnDefs.length === 0) {\r\n return undefined;\r\n }\r\n if (disableColumnDefsPreprocessing) {\r\n return columnDefs;\r\n }\r\n const adaptColumnDefs = (columnDefs: (DataGridColDef | DataGridColGroupDef)[]): (ColDef | ColGroupDef)[] => columnDefs.map((columnDef) => {\r\n if (\"children\" in columnDef) {\r\n return {...columnDef, children: adaptColumnDefs(columnDef.children)};\r\n }\r\n const {group, floatingFilter, hide, cellEditorPopup, editable, headerComponent, headerComponentParams, ...rest} = columnDef;\r\n let floatingFilterEnabledForColumn = !!floatingFilter;\r\n if (typeof columnDef.type === \"string\") {\r\n if (!!(this.columnTypes[columnDef.type]?.floatingFilter)) {\r\n floatingFilterEnabledForColumn = true;\r\n }\r\n } else {\r\n columnDef.type?.forEach((type) => {\r\n if (!!(this.columnTypes[type]?.floatingFilter)) {\r\n floatingFilterEnabledForColumn = true;\r\n }\r\n });\r\n\r\n }\r\n return {\r\n ...rest,\r\n floatingFilter: floatingFilterEnabledForColumn && floatingFilterEnabled,\r\n resizable: true,\r\n headerComponent: headerComponent ?? \"simpleHeader\",\r\n headerComponentParams: headerComponentParams ?? {\r\n onColumnsConfigVisible: this.showColumnsConfig\r\n },\r\n hide: this.state.columnModel.find((c) => c.colId === columnDef.colId)?.hide ?? (hide === undefined ? rest.initialHide : hide),\r\n cellStyle: this._getCellStyle,\r\n cellRendererParams: columnDef.cellStyle ? Object.assign(columnDef.cellRendererParams !== undefined ? columnDef.cellRendererParams : {}, {originalCellStyle: columnDef.cellStyle}) : columnDef.cellRendererParams,\r\n editable: editable,\r\n cellEditorPopup: !editable ? undefined : cellEditorPopup !== false,\r\n cellClassRules: {\r\n 'cell-has-handle': (p: any) => this.state.focusedCell?.rowIndex === p.rowIndex && this.state.focusedCell?.colId === p.colDef.colId && !this.state.isDragging,\r\n 'cell-drag-selected': (params: any) => (this.state.startCoord !== null && this.state.endCoord !== null) ? this.isInRange(params.rowIndex, params.colDef.colId) : false,\r\n },\r\n };\r\n });\r\n const adaptedColumnDefs = adaptColumnDefs(columnDefs);\r\n setTimeout(() => {\r\n this.props.onColumnDefsAdapted?.(adaptedColumnDefs);\r\n }, 0);\r\n return adaptedColumnDefs;\r\n }\r\n\r\n private isInRange(rowIndex: number, colId: string): boolean {\r\n const {startCoord, endCoord} = this.state;\r\n if (startCoord === null || endCoord === null) return false;\r\n\r\n const allCols = this.gridApi!.getAllDisplayedColumns().map(c => c.getColId());\r\n const startColIdx = allCols.indexOf(startCoord.colId);\r\n const endColIdx = allCols.indexOf(endCoord.colId);\r\n const currentColIdx = allCols.indexOf(colId);\r\n\r\n const minRow = Math.min(startCoord.rowIndex, endCoord.rowIndex);\r\n const maxRow = Math.max(startCoord.rowIndex, endCoord.rowIndex);\r\n const minCol = Math.min(startColIdx, endColIdx);\r\n const maxCol = Math.max(startColIdx, endColIdx);\r\n\r\n return rowIndex >= minRow && rowIndex <= maxRow && currentColIdx >= minCol && currentColIdx <= maxCol;\r\n };\r\n\r\n render() {\r\n const {\r\n onGridReady,\r\n columnDefs, disableColumnDefsPreprocessing, onColumnsChanged,\r\n paging, onPaginationChanged, onViewportChanged,\r\n selectedIds,\r\n search, toolbar,\r\n filter, onFilterChanged, onFilterModified, onCellFocused,\r\n onSortChanged, components,\r\n tableConfigVisible, onTableConfigVisible,\r\n noRecordsOverlayRenderer, loadingOverlayRenderer, onRowDataUpdated,\r\n onLoadData, rowStyleRules, defaultRowStyleRules, onChangeRowStyleRules,\r\n showMilliseconds, defaultShowMilliseconds, onShowMilliseconds, hideYear, defaultHideYear, onShowYear,\r\n showUtcOffset, defaultShowUtcOffset, onShowUtcOffset,\r\n suppressLoadingOverlay, defaultColDef, headerHeight,\r\n rowData,\r\n rowDataManualMode,\r\n gridRef,\r\n quickFilterParser, quickFilterMatcher,\r\n rowSelection,\r\n contextMenu,\r\n settingsMenu,\r\n exportMenu,\r\n panelStyle,\r\n tablePanelStyle,\r\n onColumnDefsAdapted,\r\n tableOverlayRenderer,\r\n onKeyPressed,\r\n theme,\r\n ...passedProperties\r\n } = this.props;\r\n let key: string;\r\n let paginationPageSize: number | undefined = undefined;\r\n if (paging.pageSize > 0) {\r\n paginationPageSize = paging.pageSize;\r\n passedProperties.pagination = true;\r\n key = \"paginated-table\";\r\n } else if (paging.pageSize === 0) {\r\n passedProperties.paginationAutoPageSize = true;\r\n passedProperties.pagination = true;\r\n key = \"paginated-table\";\r\n } else {\r\n // pagination is disabled\r\n passedProperties.pagination = false;\r\n key = \"non-paginated-table\";\r\n }\r\n\r\n // nejde\r\n const floatingFilterEnabled = !!filter && !!filter.columnSearchVisible;\r\n const adaptedColumnDefs = this.getAdaptedColumnDefs(columnDefs, floatingFilterEnabled, !!disableColumnDefsPreprocessing);\r\n // the configuration dialogs list columns only, groups are just headers in the grid\r\n const leafColumnDefs = ColumnUtils.getLeafColumnDefs(columnDefs);\r\n\r\n const customComponents = this.getCustomComponents(components);\r\n const debugMode = process.env.NODE_ENV === 'development';\r\n const bodyStyle = {\r\n display: \"flex\",\r\n flexFlow: \"column\",\r\n height: \"100%\",\r\n width: \"100%\",\r\n paddingBottom: 8,\r\n };\r\n if (panelStyle) {\r\n Object.assign(bodyStyle, panelStyle);\r\n }\r\n const tPanelStyle = {flex: \"1 1 auto\", marginTop: 16, overflow: \"auto\"};\r\n if (tablePanelStyle) {\r\n Object.assign(tPanelStyle, tablePanelStyle);\r\n }\r\n const headerFilterRowHeight = calculateRowHeight(this.state.fontSize, GRID_DEFAULT_ROW_HEIGHT_DELTA + 2);\r\n\r\n return (\r\n <React.Fragment>\r\n <Card size=\"small\"\r\n variant={\"borderless\"}\r\n style={{height: \"100%\"}}\r\n styles={{body: bodyStyle}}>\r\n {/* aligned to the top: the pager and the record range (as high as a button) stay on the line of the\r\n toolbar buttons also when filters are under them (`toolbar.renderToolbar`); a compact (mobile) pager\r\n that does not fit moves to a line of its own */}\r\n <div style={{display: \"flex\", alignItems: \"flex-start\", ...(this.props.toolbar?.compact && paging.pageSize >= 0 ? {flexWrap: \"wrap\", gap: 8} : {})}}>\r\n {this.renderNavigationPanel()}\r\n </div>\r\n <div style={tPanelStyle}>\r\n <WithCss useStyles={useStyles}>\r\n {(styles) =>\r\n <Dropdown trigger={[\"contextMenu\"]}\r\n getPopupContainer={(triggerNode) => {\r\n // very nasty trick how remove error of ResizeObservers infinite cycling - because popover (with dynamic size) is placed in in resizable panel\r\n const parentNode = (triggerNode?.parentNode ?? document.body) as HTMLElement;\r\n return parentNode;\r\n }}\r\n menu={getContextMenu({\r\n onlySelectedNodes: true,\r\n showMilliseconds: !!this.props.showMilliseconds,\r\n showYear: !this.props.hideYear,\r\n showUtcOffset: LocaleHolder.resolveUtcOffsetMode(this.props.showUtcOffset),\r\n renderer: this.props.contextMenu?.renderer,\r\n onClick: this.props.contextMenu?.onClick,\r\n getExportContent: this.getExportContent,\r\n hideNotificationOnClipboardCopy: true,\r\n pageOrientation: this.state.pageOrientation,\r\n exporting: this.state.exporting,\r\n onPageOrientationChange: this.onPageOrientationChange,\r\n onExport: this.onExport\r\n })}\r\n open={this.state.contextMenuVisible}\r\n onOpenChange={(visible) => {\r\n if (!visible) {\r\n this.setState({contextMenuVisible: false});\r\n }\r\n }}\r\n >\r\n <div className={\"ag-theme-balham \" + styles.styles.baseLayout} style={{width: \"100%\", height: \"100%\"}}>\r\n <ConfigProvider.ConfigContext.Consumer>\r\n {(context) => {\r\n const defaultTheme = theme ?? this.getTheme(context.theme?.algorithm, styles.theme);\r\n return (\r\n <AgGridReact\r\n key={key}\r\n debug={debugMode}\r\n ref={gridRef}\r\n theme={defaultTheme}\r\n paginationPageSize={paginationPageSize}\r\n maxConcurrentDatasourceRequests={this.props.rowModelType === \"infinite\" ? 1 : undefined}\r\n onGridReady={this.onGridReady}\r\n onPaginationChanged={this.onPaginationChanged}\r\n onFilterModified={this.onFilterModified}\r\n onFilterChanged={this.onFilterChanged}\r\n onSortChanged={this.onSortChanged}\r\n defaultColDef={this.getDefaultColDefinition(defaultColDef)}\r\n columnDefs={adaptedColumnDefs as ColDef[]}\r\n rowData={!rowDataManualMode ? rowData : undefined}\r\n {...passedProperties}\r\n onCellFocused={this.onCellFocused}\r\n cellSelection={rowSelection === \"multiple\" || (rowSelection as RowSelectionOptions)?.mode === \"multiRow\"}\r\n rowSelection={rowSelection}\r\n suppressRowClickSelection={rowSelection === \"multiple\" || (rowSelection as RowSelectionOptions)?.mode === \"multiRow\"}\r\n suppressRowDeselection={rowSelection === \"multiple\" || (rowSelection as RowSelectionOptions)?.mode === \"multiRow\"}\r\n suppressPaginationPanel={true}\r\n getRowId={getRowId}\r\n maintainColumnOrder\r\n components={customComponents}\r\n columnTypes={this.columnTypes}\r\n onColumnVisible={this.onColumnsChanged}\r\n onColumnPinned={this.onColumnsChanged}\r\n onColumnResized={this.onColumnsChanged}\r\n onColumnMoved={this.onColumnsChanged}\r\n onNewColumnsLoaded={this.onNewColumnsLoaded}\r\n onCellMouseOver={this.onCellMouseOver}\r\n onCellMouseDown={this.onCellMouseDown}\r\n navigateToNextCell={this.navigateToNextCell}\r\n onViewportChanged={this.onViewportChanged}\r\n onCellContextMenu={this.onCellContextMenu}\r\n loadingOverlayComponent='loadingOverlay'\r\n noRowsOverlayComponent='noRecordsOverlay'\r\n onRowDataUpdated={this.onRowDataUpdated}\r\n context={this.table_context}\r\n rowHeight={this.state.rowHeight}\r\n getRowStyle={this._getRowStyle}\r\n getRowHeight={this._getRowHeight}\r\n headerHeight={headerHeight !== undefined ? headerHeight : headerFilterRowHeight}\r\n floatingFiltersHeight={headerFilterRowHeight}\r\n suppressLoadingOverlay={this.props.loadingOverlayRenderer ? true : this.props.suppressLoadingOverlay}\r\n quickFilterParser={this.wildcardQuickFilter.quickFilterParser}\r\n quickFilterMatcher={this.wildcardQuickFilter.quickFilterMatcher}\r\n >\r\n </AgGridReact>\r\n )\r\n }}\r\n </ConfigProvider.ConfigContext.Consumer>\r\n {this.state.loading && this.props.loadingOverlayRenderer &&\r\n <div className=\"ag-overlay\" aria-hidden=\"true\">\r\n <div className=\"ag-overlay-panel\">\r\n <div\r\n className=\"ag-overlay-wrapper ag-layout-normal ag-overlay-loading-wrapper\">\r\n <div className=\"ag-react-container\">\r\n {this.props.loadingOverlayRenderer?.()}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </Dropdown>\r\n }\r\n </WithCss>\r\n {tableOverlayRenderer?.()}\r\n </div>\r\n </Card>\r\n\r\n {!!this.gridApi && !!this.gridApi && this.state.pageSize !== null &&\r\n <DataGridEditor dataGrid={this}\r\n gridApi={this.gridApi}\r\n columnDefinitions={leafColumnDefs}\r\n columnModel={this.state.columnModel}\r\n visible={!!this.props.tableConfigVisible}\r\n onTableConfigVisible={this.showTableConfiguration}\r\n paginationPageSize={paging.pageSize}\r\n paginationDefaultPageSize={paging.defaultPageSize}\r\n currentPageSize={this.state.pageSize}\r\n showMilliseconds={!!this.props.showMilliseconds}\r\n defaultShowMilliseconds={!!this.props.defaultShowMilliseconds}\r\n showYear={!this.props.hideYear}\r\n defaultShowYear={!this.props.defaultHideYear}\r\n showUtcOffset={LocaleHolder.resolveUtcOffsetMode(this.props.showUtcOffset)}\r\n defaultShowUtcOffset={LocaleHolder.resolveUtcOffsetMode(this.props.defaultShowUtcOffset)}\r\n rowStyleRules={this.props.rowStyleRules}\r\n defaultRowStyleRules={this.props.defaultRowStyleRules}\r\n onChangeRowStyleRules={onChangeRowStyleRules}\r\n />}\r\n\r\n\r\n {!!this.gridApi && <ModalDialog\r\n mode={ModalDialogMode.OK_CANCEL}\r\n open={this.state.columnsConfigVisible}\r\n initialWidth={700}\r\n initialHeight={this.state.columnTransferHeight}\r\n title={<span><ControlOutlined style={{\r\n color: \"#faad14\",\r\n fontSize: 22,\r\n marginRight: 16\r\n }}/>{i18n(\"Columns Configuration\")}</span>}\r\n cancelText={i18n(\"Cancel\")}\r\n onCancel={() => {\r\n if (this.gridApi && this.columnModelBeforeEdit) {\r\n this.gridApi.applyColumnState({state: this.columnModelBeforeEdit, applyOrder: true});\r\n delete this.columnModelBeforeEdit;\r\n this.showColumnsConfig(false);\r\n }\r\n }}\r\n onOk={() => {\r\n delete this.columnModelBeforeEdit;\r\n this.showColumnsConfig(false);\r\n }}\r\n onResize={({height}) => {\r\n this.setState({columnTransferHeight: height});\r\n }}\r\n >\r\n <ColumnTransfer\r\n columnDefinitions={leafColumnDefs as ColDef[]}\r\n columnModel={this.state.columnModel}\r\n gridApi={this.gridApi}\r\n height={this.state.columnTransferHeight - 154}\r\n />\r\n </ModalDialog>}\r\n\r\n </React.Fragment>\r\n );\r\n }\r\n}\r\n\r\n/** Renders `children()` - defers building content until React renders it, e.g. until a popover opens. */\r\nfunction RenderLater({children}: { children: () => React.ReactNode }) {\r\n return <>{children()}</>;\r\n}\r\n\r\n/** The menu with `onUsed` called after its own `onClick`, i.e. after any of its items is clicked. */\r\nfunction withOnUsed(menu: MenuProps, onUsed?: () => void): MenuProps {\r\n return onUsed ? {\r\n ...menu,\r\n onClick: info => {\r\n menu.onClick?.(info);\r\n onUsed();\r\n }\r\n } : menu;\r\n}\r\n\r\nfunction getAgGridThemeFromAntd(algorithm: MappingAlgorithm | MappingAlgorithm[] | undefined, token: AliasToken) {\r\n const isDark = algorithm === theme.darkAlgorithm;\r\n let agTheme = isDark ? themeBalham.withPart(colorSchemeDark) : themeBalham;\r\n\r\n return agTheme.withParams({\r\n accentColor: token.colorPrimary,\r\n backgroundColor: token.colorBgContainer,\r\n oddRowBackgroundColor: token.gridOddRowBg ?? token.colorBgContainer,\r\n foregroundColor: token.colorText,\r\n selectedRowBackgroundColor: token.controlItemBgActive,\r\n rowHoverColor: token.controlItemBgHover,\r\n borderColor: token.colorBorder,\r\n headerBackgroundColor: token.colorFillAlter,\r\n });\r\n}\r\n\r\nfunction agThemeEquals(newArgs: [MappingAlgorithm | MappingAlgorithm[] | undefined, AliasToken], lastArgs: [MappingAlgorithm | MappingAlgorithm[] | undefined, AliasToken]) {\r\n const [newAlgo, newToken] = newArgs;\r\n const [lastAlgo, lastToken] = lastArgs;\r\n\r\n // Check algorithm reference (usually stable constants in Antd)\r\n if (newAlgo !== lastAlgo) return false;\r\n\r\n // Only compare the tokens you actually use in your function\r\n return (\r\n newToken.colorPrimary === lastToken.colorPrimary &&\r\n newToken.colorBgContainer === lastToken.colorBgContainer &&\r\n newToken.gridOddRowBg === lastToken.gridOddRowBg &&\r\n newToken.colorText === lastToken.colorText &&\r\n newToken.controlItemBgActive === lastToken.controlItemBgActive &&\r\n newToken.controlItemBgHover === lastToken.controlItemBgHover &&\r\n newToken.colorBorder === lastToken.colorBorder &&\r\n newToken.colorFillAlter === lastToken.colorFillAlter\r\n );\r\n}"]}
|
|
1
|
+
{"version":3,"file":"dataGrid.js","sourceRoot":"","sources":["../../../../components/grid/dataGrid.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAC,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChN,OAAO,EAAC,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,EAA+B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,MAAM,CAAC;AACvH,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,+CAA+C,CAAA;AACtD,OAAO,gBAAgB,MAAM,kDAAkD,CAAA;AAC/E,OAAO,kBAAkB,MAAM,oDAAoD,CAAA;AACnF,OAAO,YAAY,MAAM,8CAA8C,CAAA;AACvE,OAAO,cAAc,MAAM,gDAAgD,CAAC;AAC5E,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,iBAAiB,MAAM,6CAA6C,CAAC;AAC5E,OAAO,OAAO,MAAM,gBAAgB,CAAA;AACpC,OAAO,cAAc,EAAE,EAAgD,SAAS,EAAC,MAAM,6CAA6C,CAAC;AACrI,OAAO,cAAc,MAAM,+CAA+C,CAAC;AAC3E,OAAO,gBAAgB,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,MAAM,WAAW,CAAA;AAC1B,OAAO,cAAc,MAAM,gDAAgD,CAAC;AAC5E,OAAO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CAAC,mBAAmB;QAC9D,QAAQ,CAAC,kBAAkB,KAAK,SAAS,CAAC,kBAAkB;QAC5D,QAAQ,CAAC,WAAW,KAAK,SAAS,CAAC,WAAW;QAC9C,QAAQ,CAAC,cAAc,KAAK,SAAS,CAAC,cAAc,CACvD,CAAC;AACN,CAAC","sourcesContent":["import React, {ReactElement} from \"react\";\r\n\r\nimport {ColumnWidthOutlined, ControlOutlined, DownloadOutlined, EllipsisOutlined, FileSearchOutlined, LoadingOutlined, ReloadOutlined, SearchOutlined, SettingOutlined, TableOutlined} from \"@ant-design/icons\";\r\nimport {Button, Card, ConfigProvider, Dropdown, Empty, MappingAlgorithm, MenuProps, Popover, Space, theme} from \"antd\";\r\nimport {AgGridReact} from \"ag-grid-react\";\r\nimport 'd2coreui/style/ag-grid/aggrid-adaptations.css'\r\nimport TextColumnFilter from \"d2coreui/components/grid/filter/textColumnFilter\"\r\nimport CustomColumnFilter from \"d2coreui/components/grid/filter/customColumnFilter\"\r\nimport SimpleHeader from \"d2coreui/components/grid/header/simpleHeader\"\r\nimport DataGridEditor from \"d2coreui/components/grid/config/dataGridEditor\";\r\nimport i18n from \"d2core/i18n/i18n\";\r\nimport AutoCompleteInput from \"d2coreui/components/input/autoCompleteInput\";\r\nimport isEqual from \"lodash/isEqual\"\r\nimport getContextMenu, {ContextMenuProps, ExportType, PageOrientation, runExport} from \"d2coreui/components/grid/export/contextMenu\";\r\nimport LoadingOverlay from \"d2coreui/components/grid/panel/loadingOverlay\";\r\nimport NoRecordsOverlay from \"d2coreui/components/grid/panel/noRecordsOverlay\";\r\nimport at from \"lodash/at\"\r\nimport ColumnTransfer from \"d2coreui/components/grid/config/columnTransfer\";\r\nimport {ColumnUtils} from \"d2coreui/components/grid/columnUtils\";\r\nimport cloneDeep from \"lodash/cloneDeep\";\r\nimport {RangeSelector} from \"d2coreui/components/grid/cell/rangeSelector\";\r\nimport {CellControl} from \"d2coreui/components/grid/cell/cellControl\";\r\nimport {\r\n _ModuleWithoutApi,\r\n AllCommunityModule,\r\n CellClassParams,\r\n CellContextMenuEvent,\r\n CellFocusedEvent,\r\n CellMouseDownEvent,\r\n CellMouseOverEvent,\r\n CellPosition,\r\n ColDef,\r\n ColTypeDef,\r\n ColGroupDef,\r\n Column,\r\n ColumnEvent,\r\n NewColumnsLoadedEvent,\r\n ColumnState,\r\n FilterChangedEvent,\r\n FilterModifiedEvent,\r\n GetQuickFilterTextParams,\r\n GetRowIdParams,\r\n GridApi,\r\n GridOptions,\r\n GridReadyEvent,\r\n ICellRendererParams,\r\n IRowNode,\r\n ModuleRegistry,\r\n NavigateToNextCellParams,\r\n PaginationChangedEvent,\r\n provideGlobalGridOptions,\r\n RowClassParams,\r\n RowDataUpdatedEvent,\r\n RowNode,\r\n RowPinnedType, RowSelectionOptions,\r\n RowStyle,\r\n SortChangedEvent,\r\n SuppressKeyboardEventParams,\r\n ValueFormatterParams,\r\n ValueGetterParams,\r\n ViewportChangedEvent\r\n} from \"ag-grid-community\";\r\nimport {LocaleHolder, UtcOffsetMode} from \"d2core/i18n/localeHolder\";\r\nimport tableDefaultRowStyleRules, {GridRowStyle, RowStyleRule} from \"d2coreui/components/grid/cell/tableDefaultRowStyleRules\";\r\nimport {ModalDialog, ModalDialogMode} from \"d2coreui/components/modal/modalDialog\";\r\nimport debounce from \"lodash/debounce\";\r\nimport {Key} from \"ts-key-enum\";\r\nimport {ClipboardUtils} from \"d2coreui/components/clipboard/clipboardUtils\";\r\nimport ProgressPopup from \"d2coreui/components/grid/export/progressPopup\";\r\nimport TimeUtils from \"d2core/utils/timeUtils\";\r\nimport KeyboardUtils from \"d2coreui/components/keyboard/keyboardUtils\";\r\nimport NumberCellEditor from \"d2coreui/components/grid/cell/numberCellEditor\";\r\nimport BigNumberCellEditor from \"d2coreui/components/grid/cell/bigNumberCellEditor\";\r\nimport TextCellEditor from \"d2coreui/components/grid/cell/textCellEditor\";\r\nimport StatusTextCellEditor from \"d2coreui/components/grid/cell/statusTextCellEditor\";\r\nimport DateCellEditor from \"d2coreui/components/grid/cell/dateCellEditor\";\r\nimport memoizeOne from \"memoize-one\";\r\nimport SimpleStatusTextCellEditor from \"d2coreui/components/grid/cell/simpleStatusTextCellEditor\";\r\nimport DurationCellEditor from \"d2coreui/components/grid/cell/durationCellEditor\";\r\nimport CustomEnumCellEditor from \"d2coreui/components/grid/cell/customEnumCellEditor\";\r\nimport HexaValueCellEditor from \"d2coreui/components/grid/cell/hexaValueCellEditor\";\r\nimport HexaOctetStringCellEditor from \"d2coreui/components/grid/cell/hexaOctetStringCellEditor\";\r\nimport {D2000UnixTimeNullValue, unixTimeToMoment} from \"d2core/types/unixTimeUtils\";\r\nimport {compileExpression} from \"filtrex\";\r\nimport DataGridPagination from \"./panel/dataGridPagination\";\r\nimport {calculateLineHeight, calculateRowHeight, getFontSize, getLineHeight, getRowHeightDelta, GRID_DEFAULT_FONT_SIZE, GRID_DEFAULT_ROW_HEIGHT_DELTA} from \"./config/rowHeightCalculator\";\r\nimport BeanAccessor, {GridApiWithPrivateAccess} from \"./cell/beanAccessor\";\r\nimport WildcardQuickFilterEngine from \"./filter/wildcardQuickFilterEngine\";\r\nimport {colorSchemeDark, themeBalham} from \"ag-grid-community\";\r\nimport {AliasToken} from \"antd/es/theme/interface\";\r\nimport WithCss, {WithCssInjectedProps} from \"../style/withCss\";\r\nimport {createStyles} from \"antd-style\";\r\n\r\ndeclare module \"antd/es/theme/interface/alias\" {\r\n interface AliasToken {\r\n /**\r\n * Background of the odd rows of `DataGrid` / `ExtendedDataGrid` with the default theme, set through\r\n * `ConfigProvider` `theme.token`. Unset, odd rows have `colorBgContainer` like the even ones (no striping).\r\n */\r\n gridOddRowBg?: string\r\n }\r\n}\r\n\r\nconst useStyles = createStyles(({css, token}, props?: WithCssInjectedProps) => {\r\n const controlHeight = {small: token.controlHeightSM, middle: token.controlHeight, large: token.controlHeightLG}[props?.size ?? \"middle\"];\r\n\r\n return {\r\n baseLayout: css`\r\n width: 100%;\r\n height: 100%;\r\n `,\r\n // as high as a toolbar button, so that the text is in the middle of the toolbar line\r\n recordRange: css`\r\n line-height: ${controlHeight}px;\r\n `\r\n }\r\n});\r\n\r\nconst gridFrameworkComponents = {\r\n customColumnFilter: CustomColumnFilter,\r\n textColumnFilter: TextColumnFilter,\r\n numberCellEditor: NumberCellEditor,\r\n bigNumberCellEditor: BigNumberCellEditor,\r\n textCellEditor: TextCellEditor,\r\n simpleStatusTextCellEditor: SimpleStatusTextCellEditor,\r\n statusTextCellEditor: StatusTextCellEditor,\r\n dateCellEditor: DateCellEditor,\r\n durationCellEditor: DurationCellEditor,\r\n customEnumCellEditor: CustomEnumCellEditor,\r\n hexaValueCellEditor: HexaValueCellEditor,\r\n hexaOctetStringCellEditor: HexaOctetStringCellEditor,\r\n simpleHeader: SimpleHeader,\r\n loadingOverlay: LoadingOverlay,\r\n noRecordsOverlay: NoRecordsOverlay\r\n};\r\n\r\nconst DataGridModule: _ModuleWithoutApi = {\r\n version: \"34.3.1\",\r\n // @ts-ignore\r\n moduleName: `dataGridModule`,\r\n beans: [RangeSelector, CellControl, BeanAccessor],\r\n dependantModules: [],\r\n}\r\n\r\nModuleRegistry.registerModules([AllCommunityModule, DataGridModule]);\r\n\r\nfunction getRowId(item: GetRowIdParams): string {\r\n return item.data.id + \"\";\r\n}\r\n\r\nprovideGlobalGridOptions({\r\n theme: \"legacy\"\r\n})\r\n\r\nconst rowStyleRuleCompiledExpressions: { [key: string]: (parameters: any) => any } = {};\r\n\r\n/**\r\n * Separator for joining several parts into one cell value (e.g. name and status).\r\n * When a string cell value contains it (after the first character), clipboard copy of several rows and export\r\n * replace every run of line breaks with a single space; copying a single focused cell keeps the line breaks.\r\n */\r\nexport const EXPORT_SEPARATOR = \"\\n\";\r\n\r\n/** A single (non-null) antd menu item as used by the export, settings and context menus of {@link DataGrid}. */\r\nexport type MenuElement = Exclude<Exclude<MenuProps[\"items\"], undefined>[number], null>;\r\n\r\nconst enum NavigationEventEnum {\r\n KEYBOARD,\r\n MOUSE\r\n}\r\n\r\n/**\r\n * ag-grid's `viewportChanged` event enriched by {@link DataGrid}. The object passed to\r\n * `DataGridProps.onViewportChanged` is actually of this type (cast it to read the extra field).\r\n */\r\nexport interface DataGridViewportChangedEvent extends ViewportChangedEvent {\r\n /**\r\n * Number of rows the last displayed row moved by since the previous viewport change: negative when\r\n * scrolled/paged backwards (towards the first record), positive when forwards (towards the last record).\r\n * On the first event it equals the number of displayed rows (`lastRow + 1`).\r\n */\r\n rowsScrollingDelta: number\r\n}\r\n\r\n/** Sort direction of a column. */\r\nexport type SortMode = \"asc\" | \"desc\"\r\n\r\n/**\r\n * Sorting of one column. A sort model is an array of these, ordered by sort priority\r\n * (see {@link DataGrid.getSortModel} and {@link DataGrid.setSortModel}).\r\n */\r\nexport interface SortItem {\r\n /** Column id (`ColDef.colId`). */\r\n colId: string;\r\n /** Sort direction. */\r\n sort: SortMode;\r\n}\r\n\r\n/**\r\n * Renders a custom floating filter for a column (see {@link DataGridColDef.renderFilter}).\r\n * @param value - current filter text (empty string when no filter is set)\r\n * @param changeValue - updates the filter text in the ag-grid filter model without applying it\r\n * @param onSearch - applies the current filter text (use e.g. on Enter)\r\n * @returns the filter UI rendered beneath the column header\r\n */\r\nexport type FilterRenderer = (value: string, changeValue: (newValue: string) => void, onSearch: () => void) => React.ReactNode\r\n\r\n/*\r\n * Extended table column definition\r\n */\r\n/**\r\n * Column definition accepted by {@link DataGrid}: an ag-grid `ColDef` with a few extra fields.\r\n *\r\n * Unless `DataGridProps.disableColumnDefsPreprocessing` is set, DataGrid adapts every definition: it makes the column\r\n * resizable, uses the built-in `simpleHeader` header component (column menu with pin/autosize/hide/reset/columns\r\n * configuration), enables the floating filter only when the column (or one of its `type`s) defines one and the column\r\n * search is visible, and takes `hide` from the current column state when the column is already known.\r\n * ag-grid's `lockVisible` is honoured by the grid's own column menu and columns configuration dialog.\r\n *\r\n * Besides ag-grid's own, these values can be used in `type`: `numberColumn` (localized number, fraction digits from\r\n * `cellRendererParams.fractionDigits`), `dateColumn`, `dateTimeColumn`, `fromNowDateTimeColumn` (D2000 unix time values,\r\n * formatted according to `hideYear`/`showMilliseconds`/`showUtcOffset`), `localizedArrayColumn` (array of i18n keys),\r\n * `escapedValueColumn` (line breaks shown as spaces), `alignRight`, and the filter types `textColumnFilter`\r\n * (client-side text filter), `textColumnServerFilter` and `customColumnServerFilter` (filter applied explicitly, the latter\r\n * rendered by {@link DataGridColDef.renderFilter}). Text filters are case-insensitive and `contains` supports `*` and `?` wildcards.\r\n */\r\nexport interface DataGridColDef extends Omit<ColDef, \"cellStyle\"> {\r\n /** Localized name of the column group; columns are grouped by it in the columns configuration dialog. */\r\n group: string\r\n /** Arbitrary user data attached to the column definition. */\r\n context?: any\r\n\r\n /**\r\n * Cell style (object or function), like ag-grid's `cellStyle` but a function may return `undefined`.\r\n * It is merged over the grid's own cell style (font size, right alignment).\r\n */\r\n cellStyle?: { [cssProperty: string]: string | number | null } | ((cellClassParams: CellClassParams) => {\r\n [cssProperty: string]: string | number | null\r\n } | undefined);\r\n\r\n\r\n /** Custom floating filter renderer; used by columns of type `customColumnServerFilter`. */\r\n renderFilter?: FilterRenderer\r\n}\r\n\r\n/**\r\n * Column group of {@link DataGrid}: a common header above its children, which are adapted like top-level columns.\r\n * Not to be confused with {@link DataGridColDef.group}, which is the column's category in the columns configuration dialog.\r\n */\r\nexport interface DataGridColGroupDef extends Omit<ColGroupDef, \"children\"> {\r\n children: (DataGridColDef | DataGridColGroupDef)[]\r\n}\r\n\r\n// removal of console warnings of our properties\r\n// COL_DEF_VALIDATORS.allProperties?.push(\"group\", \"context\", \"cellStyle\", \"renderFilter\");\r\n\r\n\r\n/** Column (floating) filter configuration of {@link DataGrid}, see `DataGridProps.filter`. */\r\nexport interface DataGridFilterProps {\r\n /**\r\n * Whether the floating filters beneath the column headers are visible (controlled). Hiding them clears the\r\n * filter model. While visible, the search box is disabled.\r\n */\r\n columnSearchVisible?: boolean\r\n /** Called when the user toggles the column filter in the settings menu; update `columnSearchVisible` in response. */\r\n onColumnSearchVisible?: (visible: boolean) => void\r\n\r\n /**\r\n * Returns the ag-grid filter model to apply. It is re-applied whenever the `rowData` prop changes and when the\r\n * column filter is toggled, so filters stay pre-filled (e.g. from the search box).\r\n */\r\n getFilterModel?(): any\r\n\r\n /** Forwarded ag-grid `filterChanged` event (a filter was applied, e.g. Enter in a floating filter). */\r\n onFilterChanged?(event: FilterChangedEvent): void;\r\n\r\n /** Forwarded ag-grid `filterModified` event (a filter value was edited but not necessarily applied). */\r\n onFilterModified?(event: FilterModifiedEvent): void;\r\n\r\n /** Called when Enter is pressed in a text floating filter. */\r\n onFilterConfirmed?(): void\r\n}\r\n\r\n/** Search box and search button configuration of the {@link DataGrid} toolbar, see `DataGridProps.search`. */\r\nexport interface DataGridSearchProps {\r\n /** Placeholder of the empty search field. */\r\n placeholder?: string\r\n /** Current search text (controlled, update it from {@link DataGridSearchProps.onChange}). */\r\n searchString?: string\r\n /** Previous searches offered in the search field's popup. */\r\n searchHistory?: string[]\r\n /** Extra CSS class of the search button. */\r\n searchButtonClassName?: string\r\n /** Disables the search button. */\r\n searchButtonDisabled?: boolean\r\n /** Hides the search button. */\r\n searchButtonHidden?: boolean\r\n /** Icon of the search button (replaced by a spinner while loading). */\r\n searchButtonIcon?: React.ReactNode\r\n /** Renders the search button as antd `danger`. */\r\n searchButtonDanger?: boolean\r\n /** Hides the search field; the search button then acts as a \"Refresh\" button with a reload icon. */\r\n hidden?: boolean\r\n\r\n /** Renders a custom search field in place of the built-in one. */\r\n searchRenderer?(): React.ReactNode\r\n\r\n /** Formats strings displayed in the search field and its history. */\r\n stringFormatter?(rawString: string): string\r\n\r\n /** Called when the search field text changes. */\r\n onChange?(searchString: string): void\r\n\r\n /**\r\n * Called when a search is invoked: search button, Enter in the search field, or the \"Search\" button of the\r\n * default no-records overlay.\r\n */\r\n onSearch?(): void\r\n}\r\n\r\n/**\r\n * Callback handed to `DataGridProps.onLoadData`; call it once the data are loaded. It hides the loading overlay,\r\n * shows the no-records overlay when `totalRecords` is 0 and focuses the grid when `autofocus` is set.\r\n */\r\nexport type OnLoadDataCallback = (totalRecords: number) => void\r\n\r\n/**\r\n * Props of {@link DataGrid}. All other ag-grid `GridOptions` are passed through to `AgGridReact`, with these differences:\r\n * - `columnDefs` are {@link DataGridColDef}s, optionally wrapped in {@link DataGridColGroupDef}s;\r\n * - `paginationPageSize` is not available, use `paging.pageSize`;\r\n * - `getRowStyle` is combined with {@link DataGridProps.rowStyleRules};\r\n * - `getRowId` is fixed to `String(data.id)`, so every row object must have a unique `id`;\r\n * - the pagination panel, overlays, header component, column types, `context` and several event handlers are provided\r\n * by DataGrid (the handlers listed here are still called).\r\n *\r\n * @typeParam TData - row data type, passed to the ag-grid `GridOptions` (`rowData`, `getRowId`, events, ...)\r\n */\r\nexport interface DataGridProps<TData = any> extends Omit<GridOptions<TData>, \"columnDefs\" | \"paginationPageSize\" | \"getRowStyle\" | \"cellStyle\"> {\r\n /** ag-grid options object passed to `AgGridReact`, e.g. to link grids for the aligned grids feature. */\r\n gridOptions?: GridOptions<TData>\r\n /** Column definitions; see {@link DataGridColDef} for how they are adapted. Columns may be wrapped in {@link DataGridColGroupDef}s. */\r\n columnDefs: (DataGridColDef | DataGridColGroupDef)[]\r\n /** Passes `columnDefs` to ag-grid unchanged (no header component, cell style or floating filter adaptation); used for aligned grids. */\r\n disableColumnDefsPreprocessing?: boolean\r\n\r\n /** Called asynchronously with the adapted column definitions each time they are rebuilt (not called when preprocessing is disabled). */\r\n onColumnDefsAdapted?(columnDefs: (ColDef | ColGroupDef)[]): void\r\n\r\n /**\r\n * Visibility of the advanced table configuration panel (page size, date format, row styles). Controlled: the panel\r\n * is shown only while this is `true`; update it from {@link DataGridProps.onTableConfigVisible}.\r\n */\r\n tableConfigVisible?: boolean,\r\n /** Initial visibility of the columns configuration dialog; afterwards the dialog is managed internally. */\r\n columnsConfigVisible?: boolean,\r\n /** Style merged into the body of the card wrapping the toolbar and the grid. */\r\n panelStyle?: React.CSSProperties,\r\n /** Style merged into the panel wrapping the grid itself (below the toolbar). */\r\n tablePanelStyle?: React.CSSProperties,\r\n /** Column (floating) filter configuration. */\r\n filter?: DataGridFilterProps\r\n /** Toolbar search box configuration. */\r\n search?: DataGridSearchProps\r\n /**\r\n * Paging configuration.\r\n * @default {pageSize: 0, defaultPageSize: 0}\r\n */\r\n paging: {\r\n /* current size of table page:\r\n - value -1 means no paging at all (scrollbar only)\r\n - value 0 means automatic paging (page size automatically adjusted based on available height for table)\r\n - value >0 defines statically defined page size (number of rows) for the table\r\n */\r\n /**\r\n * Page size: `-1` disables paging (scrolling only, the toolbar shows the visible range instead of the pager),\r\n * `0` sizes pages automatically to the available height, a positive number is a fixed number of rows per page.\r\n */\r\n pageSize: number,\r\n /** Page size restored when the table configuration is reset to defaults. */\r\n defaultPageSize?: number,\r\n /**\r\n * Called when the effective page size changes (reported by ag-grid) or when the user changes the paging in the\r\n * table configuration panel. The grid does not store the new setting in `pageSize`; persist it if needed.\r\n * @param currentPageSize - number of rows per page currently used by ag-grid (`null` before it is known)\r\n * @param definedPageSize - configured page size with the same meaning as {@link pageSize} (`-1`, `0` or rows per page)\r\n */\r\n onPaginationChanged?: (currentPageSize: number | null, definedPageSize: number) => void;\r\n }\r\n\r\n /**\r\n * When `true`, the `rowData` prop is not passed to ag-grid; supply data through {@link DataGrid.setRowData} or\r\n * ag-grid transactions instead (avoids comparing large `rowData` arrays on every render).\r\n */\r\n rowDataManualMode?: boolean\r\n\r\n /**\r\n * Called when the grid needs data: once after the grid is ready and its page size is known, and on every\r\n * {@link DataGrid.loadData} call. A loading overlay is shown until `callback` is called.\r\n */\r\n onLoadData(callback: OnLoadDataCallback): void\r\n\r\n /** Focuses the first column of the (last) selected row, or the first row, after each data load. */\r\n autofocus?: boolean\r\n\r\n /** Called for every key down in a grid cell, after the built-in keyboard handling; `editing` is `true` while a cell editor is open. */\r\n onKeyPressed?(event: KeyboardEvent, editing: boolean): void\r\n\r\n /** Called when Enter is pressed in a grid cell. */\r\n onEnter?: () => void;\r\n\r\n /**\r\n * Ids of the rows to keep selected. Applied only when the `rowData` prop changes: matching rows are selected,\r\n * and if none of them is present the selection is cleared.\r\n */\r\n selectedIds?: (number | string)[]\r\n\r\n /**\r\n * Row styling rules. A rule applies to rows whose data match its `expression` (a filtrex expression evaluated on the\r\n * row data) or to all rows when it has none; matching styles are merged in order. The rules with keys\r\n * `table-font-size` and `table-line-indentation` also determine the font size and the row, header and floating\r\n * filter heights.\r\n * @default tableDefaultRowStyleRules()\r\n */\r\n rowStyleRules: RowStyleRule[]\r\n\r\n /** Row styling rules restored when the table configuration is reset to defaults. */\r\n defaultRowStyleRules?: RowStyleRule[]\r\n\r\n /** Called when the user edits the row styling rules in the table configuration panel; update `rowStyleRules` in response. */\r\n onChangeRowStyleRules?(rowStyleRules: RowStyleRule[]): void\r\n\r\n /** Toolbar customization. The toolbar contains the extra buttons, export and settings menus, the search box and the pager. */\r\n toolbar?: {\r\n /** Renders the toolbar part left of the pager; receives the default one (buttons, menus and search box) to wrap or replace. */\r\n renderToolbar?(originalSearchBar: ReactElement): ReactElement\r\n\r\n /** Extra buttons rendered at the start of the toolbar, before the export menu button. */\r\n toolbarButtons?: ReactElement\r\n\r\n /** Hides the \"first-last of total\" record range shown when paging is disabled (`pageSize` -1). */\r\n hideRecordCount?: boolean\r\n\r\n /**\r\n * Hides the export menu button, e.g. when the export is started by a custom button through\r\n * {@link DataGrid.exportData}. The row context menu keeps its export items.\r\n */\r\n hideExportButton?: boolean\r\n\r\n /** Extra content rendered at the end of the toolbar, after the pager or record count. */\r\n extraContent?: React.ReactNode\r\n\r\n /**\r\n * Compact toolbar for a narrow (mobile) screen: the export and settings buttons move into a popover opened by\r\n * one button, and the pager has only the previous, \"page / pages\" and next buttons. A pager that still does not fit\r\n * moves to a line of its own under the toolbar.\r\n */\r\n compact?: boolean\r\n }\r\n\r\n /** Called with the new row height in pixels when it changes because of the font size/line indentation rules. */\r\n onRowHeightChanged?(rowHeight: number): void\r\n\r\n /** Called with the full ag-grid column state when a column is shown/hidden, pinned, resized or moved; persist it to restore the layout. */\r\n onColumnsChanged?(columnModel: ColumnState[], event: ColumnEvent): void\r\n\r\n /** Called when the table configuration panel is requested to open (settings menu) or close. */\r\n onTableConfigVisible?(visible: boolean): void\r\n\r\n /** Called when the columns configuration dialog is opened or closed. */\r\n onColumnsConfigVisible?(visible: boolean): void\r\n\r\n /**\r\n * Custom loading indicator. When set, ag-grid's loading overlay is suppressed and this is rendered over the grid\r\n * while data are loading (otherwise a default spinner is shown).\r\n */\r\n loadingOverlayRenderer?(): ReactElement | null\r\n\r\n /** Custom \"no records\" overlay; returning `null` (or omitting it) shows the default empty state with a \"Search\" button. */\r\n noRecordsOverlayRenderer?(): ReactElement | null\r\n\r\n /** Extra content rendered inside the grid panel after the grid, e.g. an absolutely positioned overlay. */\r\n tableOverlayRenderer?(): ReactElement | null\r\n\r\n /** Shows milliseconds in date-time columns (controlled, see {@link DataGridProps.onShowMilliseconds}). */\r\n showMilliseconds?: boolean\r\n\r\n /** Value of `showMilliseconds` restored when the table configuration is reset to defaults. */\r\n defaultShowMilliseconds?: boolean\r\n\r\n /**\r\n * Called when the user toggles milliseconds in the table configuration panel. Update `showMilliseconds` and then\r\n * call `callback` so the grid re-renders its rows with the new format.\r\n */\r\n onShowMilliseconds?(show: boolean, callback: () => void): void\r\n\r\n /** Hides the year in date and date-time columns (controlled, see {@link DataGridProps.onShowYear}). */\r\n hideYear?: boolean\r\n\r\n /** Value of `hideYear` restored when the table configuration is reset to defaults. */\r\n defaultHideYear?: boolean\r\n\r\n /**\r\n * Called when the user toggles the year in the table configuration panel; note that `show` is the inverse of\r\n * `hideYear`. Update `hideYear` and then call `callback` so the grid re-renders its rows.\r\n */\r\n onShowYear?(show: boolean, callback: () => void): void\r\n\r\n /**\r\n * How date-time columns tell apart the instants of the hour repeated at the end of the daylight saving time - see\r\n * `UtcOffsetMode` of `d2core/i18n/localeHolder`; without it the global mode of `LocaleHolder.setUtcOffsetMode`\r\n * applies (controlled, see {@link DataGridProps.onShowUtcOffset}).\r\n */\r\n showUtcOffset?: UtcOffsetMode\r\n\r\n /** Value of `showUtcOffset` restored when the table configuration is reset to defaults. */\r\n defaultShowUtcOffset?: UtcOffsetMode\r\n\r\n /**\r\n * Called when the user toggles the UTC offset in the table configuration panel. Update `showUtcOffset` and then\r\n * call `callback` so the grid re-renders its rows.\r\n */\r\n onShowUtcOffset?(show: UtcOffsetMode, callback: () => void): void\r\n\r\n /** Toolbar export menu customization; the built-in items export all displayed rows to TXT, CSV, PDF or the clipboard. */\r\n exportMenu?: {\r\n /** Transforms the default menu items, e.g. to add or remove entries. */\r\n renderer?(menuElements: MenuElement[]): MenuElement[]\r\n /** Called with the key of every clicked menu item, built-in ones included. */\r\n onClick?(key: string): void\r\n /** Called after an export finishes with the number of exported rows and the file name (or `\"[CLIPBOARD]\"`). */\r\n onExported?(rowCount: number, destination: string): void\r\n }\r\n\r\n /** Toolbar settings menu customization (column filter, autosize, columns configuration, advanced settings). */\r\n settingsMenu?: {\r\n /** Transforms the default menu items, e.g. to add or remove entries. */\r\n renderer?(menuElements: MenuElement[]): MenuElement[]\r\n /** Called with the key of a clicked custom (non built-in) menu item. */\r\n onClick?(key: string): void\r\n }\r\n\r\n /** Row context menu (right click) customization; the built-in items export the selected rows to TXT, CSV, PDF or the clipboard. */\r\n contextMenu?: {\r\n /** Transforms the default menu items, e.g. to add or remove entries. */\r\n renderer?(menuElements: MenuElement[]): MenuElement[]\r\n /** Called with the key of every clicked menu item, built-in ones included. */\r\n onClick?(key: string): void\r\n }\r\n\r\n /** Additional row style merged over the style computed from {@link DataGridProps.rowStyleRules}; may return `undefined`. */\r\n getRowStyle?(params: any): GridRowStyle | undefined\r\n\r\n /** Ref receiving the underlying `AgGridReact` instance. */\r\n gridRef?: React.RefObject<AgGridReact<TData>>\r\n\r\n /**\r\n * Enables an Excel-like fill handle on the focused cell: dragging from its bottom-right corner selects a cell range\r\n * and reports it through {@link DataGridProps.onFillHandleComplete}. The grid does not modify any data itself.\r\n */\r\n showFillHandle?: boolean\r\n\r\n /**\r\n * Called when a fill handle drag ends.\r\n * @param startRow - first row index of the range (inclusive)\r\n * @param endRow - last row index of the range (inclusive)\r\n * @param columns - ids of the displayed columns in the range, in display order\r\n */\r\n onFillHandleComplete?: (startRow: number, endRow: number, columns: string[]) => void\r\n}\r\n\r\ninterface CellCoord {\r\n rowIndex: number;\r\n colId: string;\r\n}\r\n\r\ninterface DataGridState {\r\n pageIndex: number\r\n pageSize: number | null\r\n recordsCount?: number\r\n columnModel: ColumnState[]\r\n sortModel: SortItem[]\r\n tableConfigVisible: boolean\r\n columnsConfigVisible: boolean\r\n fontSize: number\r\n rowHeight: number\r\n // interval of record's indexes currently shown (first record has index 1)\r\n viewport: [number, number]\r\n contextMenuVisible: boolean\r\n loading: boolean\r\n columnTransferHeight: number\r\n pageOrientation: PageOrientation\r\n exporting: boolean\r\n /** Whether the popover with the export and settings buttons of the compact toolbar is open. */\r\n compactMenuOpen?: boolean\r\n\r\n isDragging: boolean\r\n startCoord: CellCoord | null\r\n endCoord: CellCoord | null\r\n focusedCell: CellCoord | null\r\n}\r\n\r\n\r\n/**\r\n * ag-grid (community modules, Balham theme derived from the antd theme tokens unless `theme` is given) wrapped in a\r\n * card with a toolbar: custom buttons,\r\n * export and settings menus, a search box and a pager. Adds D2000 column types (see {@link DataGridColDef}), rule-based\r\n * row styling with configurable font size and row height, a table configuration panel, a columns configuration\r\n * dialog, a row context menu with export, wildcard quick filter and an optional fill handle.\r\n *\r\n * Data are requested through `onLoadData`; use `rowData` (client-side row model) or an ag-grid `datasource`\r\n * (infinite row model). Row objects must have a unique `id`. The grid state (paging, columns, row styles, date format)\r\n * is not persisted by DataGrid itself; it reports changes through callbacks and expects the updated values back in\r\n * props (`ExtendedDataGrid` from `d2coreui/components/grid/extendedDataGrid` keeps this state and reports it as one\r\n * configuration object; storing it is still up to the caller).\r\n *\r\n * Keyboard: PageUp/PageDown/Home/End and arrows at page edges move across pages, Alt+arrows move the open cell editor,\r\n * Ctrl+A selects the displayed rows, Ctrl+C copies the selected rows with a header line (when more than one is\r\n * selected) or the focused cell,\r\n * Ctrl+I / Ctrl+B copy the `objectId`/`id` or `objectName`/`name` column of the focused row.\r\n *\r\n * @example\r\n * <DataGrid\r\n * columnDefs={[{colId: \"name\", field: \"name\", headerName: \"Name\", group: \"Object\", type: \"textColumnFilter\"}]}\r\n * rowData={rows}\r\n * paging={{pageSize: 0}}\r\n * rowStyleRules={rowStyleRules}\r\n * onChangeRowStyleRules={setRowStyleRules}\r\n * onLoadData={(callback) => loadRows().then((rows) => { setRows(rows); callback(rows.length); })}\r\n * />\r\n *\r\n * @typeParam TData - row data type, see {@link DataGridProps}\r\n */\r\nexport default class DataGrid<TData extends { id: number | string } = any> extends React.Component<DataGridProps<TData>, DataGridState> {\r\n /** Default `paging` (automatic page size) and `rowStyleRules` ({@link tableDefaultRowStyleRules}). */\r\n public static defaultProps = {\r\n paging: {\r\n pageSize: 0,\r\n defaultPageSize: 0\r\n },\r\n rowStyleRules: tableDefaultRowStyleRules()\r\n };\r\n\r\n /** Whether the initial `onLoadData` call has already been made. */\r\n firstLoadDone: boolean = false;\r\n /** Engine providing the wildcard (`*`, `?`) quick filter and text filter matching. */\r\n wildcardQuickFilter: WildcardQuickFilterEngine;\r\n /** Custom ag-grid column types registered by the grid (see {@link DataGridColDef}). */\r\n columnTypes: { [key: string]: ColTypeDef<TData> };\r\n /** ag-grid API; `undefined` until the grid is ready. */\r\n gridApi?: GridApi<TData>;\r\n /** Column state saved when the columns configuration dialog opens, restored when it is cancelled. */\r\n columnModelBeforeEdit?: ColumnState[];\r\n /** Row index to focus after the pending page change. */\r\n indexToJump: number | null;\r\n /** Column to focus after the pending page change. */\r\n columnToJump: Column | null;\r\n /** Last `cellFocused` event, used for Shift+arrow range selection. */\r\n lastCellFocus?: CellFocusedEvent;\r\n /** Whether the last navigation was done by keyboard or mouse. */\r\n lastNavigationEvent?: NavigationEventEnum;\r\n /** Pagination event received before the grid API was available, replayed once the grid is ready. */\r\n lastPaginationEvent?: PaginationChangedEvent | null = null;\r\n /**\r\n * Whether an export is running; unlike `state.exporting` it is set synchronously, so two {@link exportData}\r\n * calls in one tick do not both start an export.\r\n */\r\n private exportRunning = false;\r\n /**\r\n * Object passed to ag-grid as `context`; the grid's overlays, header and filter components read the overlay\r\n * renderers, `onFilterConfirmed`, `fontSize` and `lineHeight` from it.\r\n */\r\n table_context: any;\r\n\r\n private readonly getTheme;\r\n\r\n constructor(props: Readonly<DataGridProps<TData>>) {\r\n super(props);\r\n this.state = {\r\n pageIndex: 0,\r\n pageSize: null,\r\n recordsCount: undefined,\r\n columnModel: [],\r\n sortModel: [],\r\n tableConfigVisible: !!this.props.tableConfigVisible,\r\n columnsConfigVisible: !!this.props.columnsConfigVisible,\r\n fontSize: GRID_DEFAULT_FONT_SIZE,\r\n rowHeight: calculateRowHeight(GRID_DEFAULT_FONT_SIZE, GRID_DEFAULT_ROW_HEIGHT_DELTA),\r\n viewport: [0, 0],\r\n contextMenuVisible: false,\r\n loading: false,\r\n columnTransferHeight: 500,\r\n pageOrientation: \"PORTRAIT\",\r\n exporting: false,\r\n isDragging: false,\r\n startCoord: null,\r\n endCoord: null,\r\n focusedCell: null,\r\n };\r\n this.indexToJump = null;\r\n this.columnToJump = null;\r\n\r\n this.onGridReady = this.onGridReady.bind(this);\r\n this.onPaginationChanged = this.onPaginationChanged.bind(this);\r\n this.onViewportChanged = this.onViewportChanged.bind(this);\r\n this.onCellContextMenu = this.onCellContextMenu.bind(this);\r\n this.onCellFocused = this.onCellFocused.bind(this);\r\n this.onCellMouseDown = this.onCellMouseDown.bind(this);\r\n this.onCellMouseOver = this.onCellMouseOver.bind(this);\r\n this.onMouseUp = this.onMouseUp.bind(this);\r\n this.setFocusedCellDebounced = debounce(this.setFocusedCellDebounced.bind(this), 200);\r\n this.noRecordsOverlayRenderer = this.noRecordsOverlayRenderer.bind(this);\r\n this.loadingOverlayRenderer = this.loadingOverlayRenderer.bind(this);\r\n this.changePagination = this.changePagination.bind(this);\r\n this.onColumnsChanged = this.onColumnsChanged.bind(this);\r\n this.onNewColumnsLoaded = this.onNewColumnsLoaded.bind(this);\r\n this.onFilterModified = this.onFilterModified.bind(this);\r\n this.onFilterChanged = this.onFilterChanged.bind(this);\r\n this.onFilterConfirmed = this.onFilterConfirmed.bind(this);\r\n this.onSortChanged = this.onSortChanged.bind(this);\r\n this.showTableConfiguration = this.showTableConfiguration.bind(this);\r\n this.showColumnsConfig = this.showColumnsConfig.bind(this);\r\n this.navigateToNextCell = this.navigateToNextCell.bind(this);\r\n this.suppressKeyboardEvent = this.suppressKeyboardEvent.bind(this);\r\n this.onRowDataUpdated = this.onRowDataUpdated.bind(this);\r\n this._getRowStyle = this._getRowStyle.bind(this);\r\n this._getRowHeight = this._getRowHeight.bind(this);\r\n this._getCellStyle = this._getCellStyle.bind(this);\r\n this.textCustomComparator = this.textCustomComparator.bind(this);\r\n this.onPageOrientationChange = this.onPageOrientationChange.bind(this);\r\n this.onExport = this.onExport.bind(this);\r\n this.getExportContent = this.getExportContent.bind(this);\r\n this.getDefaultColDefinition = memoizeOne(this.getDefaultColDefinition.bind(this));\r\n this.getAdaptedColumnDefs = memoizeOne(this.getAdaptedColumnDefs.bind(this));\r\n this.getCustomComponents = memoizeOne(this.getCustomComponents.bind(this));\r\n this.getTheme = memoizeOne(getAgGridThemeFromAntd, agThemeEquals);\r\n\r\n this.table_context = {\r\n loadingOverlayRenderer: this.loadingOverlayRenderer,\r\n noRecordsOverlayRenderer: this.noRecordsOverlayRenderer,\r\n onFilterConfirmed: this.onFilterConfirmed,\r\n fontSize: this.state.fontSize,\r\n lineHeight: getLineHeight(this.state.rowHeight)\r\n };\r\n this.wildcardQuickFilter = new WildcardQuickFilterEngine();\r\n\r\n this.columnTypes = {\r\n \"localizedArrayColumn\": {\r\n cellRenderer: (params: ICellRendererParams): string => {\r\n const value = DataGrid.getCellValue<string[]>(params);\r\n if (value !== undefined) {\r\n return value.map((s) => i18n(s)).join(\",\");\r\n } else {\r\n return \"\";\r\n }\r\n },\r\n filterParams: {\r\n textCustomComparator: this.textCustomComparator\r\n },\r\n filterValueGetter: function (params: ValueGetterParams): string | null {\r\n const value = DataGrid.getCellValue<string[]>(params);\r\n if (value !== undefined) {\r\n return value.map((s) => i18n(s)).join(\",\");\r\n }\r\n return null;\r\n },\r\n getQuickFilterText: function (params: GetQuickFilterTextParams): string {\r\n const value = DataGrid.getCellValue<string[]>(params);\r\n if (value !== undefined) {\r\n return value.map((s) => i18n(s)).join(\",\");\r\n }\r\n return \"\";\r\n }\r\n },\r\n \"numberColumn\": {\r\n cellRenderer: (params: ICellRendererParams): string => {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined && value !== null) {\r\n return LocaleHolder.formatNumber(value, params.colDef?.cellRendererParams?.fractionDigits);\r\n } else {\r\n return \"\";\r\n }\r\n },\r\n valueFormatter: (params: ValueFormatterParams): string => {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined && value !== null) {\r\n return LocaleHolder.formatNumber(value, params.colDef?.cellRendererParams?.fractionDigits);\r\n } else {\r\n return \"\";\r\n }\r\n },\r\n filterParams: {\r\n textCustomComparator: this.textCustomComparator\r\n },\r\n filterValueGetter: function (params: ValueGetterParams): string | null {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value) {\r\n return LocaleHolder.formatNumber(value, params.colDef?.cellRendererParams?.fractionDigits);\r\n } else {\r\n return \"\";\r\n }\r\n },\r\n getQuickFilterText: function (params: GetQuickFilterTextParams): string {\r\n const value = DataGrid.getCellValue<number>(params);\r\n if (value !== undefined) {\r\n return LocaleHolder.formatNumber(value, params.colDef?.cellRendererParams?.fractionDigits);\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n },\r\n \"dateColumn\": {\r\n cellRenderer: (params: ICellRendererParams) => {\r\n const value = DataGrid.getTimeCellValue(params);\r\n if (value !== undefined) {\r\n let tooltipValue: string;\r\n tooltipValue = unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(true, true, true, true));\r\n return <span title={tooltipValue}>{unixTimeToMoment(value).format(LocaleHolder.getDateFormat(!this.props.hideYear))}</span>\r\n } else {\r\n return \"\";\r\n }\r\n },\r\n valueFormatter: (params: ValueFormatterParams): string => {\r\n const value = DataGrid.getTimeCellValue(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateFormat(!this.props.hideYear));\r\n }\r\n return \"\";\r\n },\r\n filterParams: {\r\n textCustomComparator: this.textCustomComparator\r\n },\r\n filterValueGetter: (params: ValueGetterParams): string | null => {\r\n const value = DataGrid.getTimeCellValue(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateFormat(!this.props.hideYear));\r\n }\r\n return null;\r\n },\r\n getQuickFilterText: (params: GetQuickFilterTextParams): string => {\r\n const value = DataGrid.getTimeCellValue(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateFormat(!this.props.hideYear));\r\n }\r\n return \"\";\r\n }\r\n },\r\n \"dateTimeColumn\": {\r\n cellRenderer: (params: ICellRendererParams) => {\r\n const value = DataGrid.getTimeCellValue(params);\r\n if (value !== undefined) {\r\n let tooltipValue: string;\r\n tooltipValue = unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(true, true, true, true));\r\n return <span title={tooltipValue}>{unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds, this.props.showUtcOffset))}</span>;\r\n } else {\r\n return \"\";\r\n }\r\n },\r\n valueFormatter: (params: ValueFormatterParams): string => {\r\n const value = DataGrid.getTimeCellValue(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds, this.props.showUtcOffset));\r\n }\r\n return \"\";\r\n },\r\n filterParams: {\r\n textCustomComparator: this.textCustomComparator\r\n },\r\n filterValueGetter: (params: ValueGetterParams): string | null => {\r\n const value = DataGrid.getTimeCellValue(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds, this.props.showUtcOffset));\r\n }\r\n return null;\r\n },\r\n getQuickFilterText: (params: GetQuickFilterTextParams): string => {\r\n const value = DataGrid.getTimeCellValue(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds, this.props.showUtcOffset));\r\n }\r\n return \"\";\r\n }\r\n },\r\n \"fromNowDateTimeColumn\": {\r\n cellRenderer: (params: ICellRendererParams) => {\r\n const value = DataGrid.getTimeCellValue(params);\r\n if (value !== undefined) {\r\n let tooltipValue: string;\r\n tooltipValue = unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(true, true, true, true));\r\n return <span title={tooltipValue}>{unixTimeToMoment(value).fromNow()}</span>;\r\n } else {\r\n return \"\";\r\n }\r\n },\r\n valueFormatter: (params: ValueFormatterParams): string => {\r\n const value = DataGrid.getTimeCellValue(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds, this.props.showUtcOffset));\r\n }\r\n return \"\";\r\n },\r\n filterParams: {\r\n textCustomComparator: this.textCustomComparator\r\n },\r\n filterValueGetter: (params: ValueGetterParams): string | null => {\r\n const value = DataGrid.getTimeCellValue(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds, this.props.showUtcOffset));\r\n }\r\n return null;\r\n },\r\n getQuickFilterText: (params: GetQuickFilterTextParams): string => {\r\n const value = DataGrid.getTimeCellValue(params);\r\n if (value !== undefined) {\r\n return unixTimeToMoment(value).format(LocaleHolder.getDateTimeFormat(!this.props.hideYear, true, this.props.showMilliseconds, this.props.showUtcOffset));\r\n }\r\n return \"\";\r\n }\r\n },\r\n \"escapedValueColumn\": {\r\n cellRenderer: (params: ICellRendererParams) => {\r\n const value = DataGrid.getCellValue<any>(params);\r\n if (value !== undefined) {\r\n return <span style={{whiteSpace: \"pre\"}}\r\n title={value}> {typeof value === \"string\" ? value.replace(/[\\r\\n]+/g, ' ') : value}</span>;\r\n } else {\r\n return \"\";\r\n }\r\n },\r\n valueFormatter: (params: ValueFormatterParams): string => {\r\n const value = DataGrid.getCellValue<any>(params);\r\n if (value !== undefined) {\r\n return typeof value === \"string\" ? value.replace(/[\\r\\n]+/g, ' ') : value;\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n },\r\n \"textColumnFilter\": {\r\n filter: \"agTextColumnFilter\",\r\n floatingFilter: true,\r\n floatingFilterComponent: \"textColumnFilter\",\r\n filterParams: {\r\n textCustomComparator: this.textCustomComparator\r\n },\r\n suppressFloatingFilterButton: true,\r\n },\r\n \"textColumnServerFilter\": {\r\n filter: \"agTextColumnFilter\",\r\n floatingFilter: true,\r\n floatingFilterComponent: \"textColumnFilter\",\r\n filterParams: {\r\n buttons: ['apply'],\r\n textCustomComparator: this.textCustomComparator\r\n },\r\n suppressFloatingFilterButton: true,\r\n },\r\n \"customColumnServerFilter\": {\r\n filter: \"agTextColumnFilter\",\r\n floatingFilter: true,\r\n floatingFilterComponent: \"customColumnFilter\",\r\n filterParams: {\r\n buttons: ['apply'],\r\n textCustomComparator: this.textCustomComparator\r\n },\r\n suppressFloatingFilterButton: true,\r\n },\r\n \"alignRight\": {}\r\n };\r\n }\r\n\r\n private static getTimeCellValue(props: any): number | undefined {\r\n const value = DataGrid.getCellValue<number | null>(props);\r\n return value === undefined || value === null || value === D2000UnixTimeNullValue ? undefined : value;\r\n }\r\n\r\n private static getCellValue<V>(props: any): V | undefined {\r\n if (props) {\r\n if (props.colDef.field && typeof props.getValue === \"function\") {\r\n return props.getValue(props.colDef.field);\r\n }\r\n if (props.data && props.colDef && props.colDef.field) {\r\n return at<V>(props.data, props.colDef.field)[0];\r\n }\r\n if (props.value !== undefined) {\r\n return props.value;\r\n }\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Case-insensitive `textCustomComparator` used by the grid's text filters; `contains` supports `*` and `?` wildcards.\r\n * @param filter - ag-grid text filter type (`contains`, `notContains`, `equals`, `notEqual`, `startsWith`, `endsWith`)\r\n * @returns whether `value` passes the filter\r\n */\r\n textCustomComparator(filter: string, value: any, filterText: string) {\r\n const filterTextLowerCase = filterText.toLowerCase();\r\n const valueLowerCase = value.toString().toLowerCase();\r\n switch (filter) {\r\n case 'contains':\r\n if (filterTextLowerCase.indexOf(\"*\") >= 0 || filterTextLowerCase.indexOf(\"?\") >= 0) {\r\n const wildcardFilterRegExp = this.wildcardQuickFilter.getWildcardFilterRegExp(filterTextLowerCase);\r\n if (typeof wildcardFilterRegExp == \"string\") {\r\n return valueLowerCase.indexOf(filterTextLowerCase) >= 0;\r\n } else {\r\n return wildcardFilterRegExp.test(valueLowerCase);\r\n }\r\n } else {\r\n return valueLowerCase.indexOf(filterTextLowerCase) >= 0;\r\n }\r\n case 'notContains':\r\n return valueLowerCase.indexOf(filterTextLowerCase) === -1;\r\n case 'equals':\r\n return valueLowerCase === filterTextLowerCase;\r\n case 'notEqual':\r\n // noinspection EqualityComparisonWithCoercionJS\r\n return valueLowerCase != filterTextLowerCase;\r\n case 'startsWith':\r\n return valueLowerCase.indexOf(filterTextLowerCase) === 0;\r\n case 'endsWith':\r\n var index = valueLowerCase.lastIndexOf(filterTextLowerCase);\r\n return index >= 0 && index === (valueLowerCase.length - filterTextLowerCase.length);\r\n default:\r\n // should never happen\r\n console.warn('invalid filter type ' + filter);\r\n return false;\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps: DataGridProps<TData>) {\r\n if (this.state.compactMenuOpen && !this.props.toolbar?.compact) {\r\n // the popover is gone with the compact toolbar - it must not open by itself when the toolbar is compact again\r\n this.setState({compactMenuOpen: false});\r\n }\r\n if (!this.gridApi) {\r\n return;\r\n }\r\n if (this.props.filter && prevProps.filter && this.props.filter.columnSearchVisible !== prevProps.filter.columnSearchVisible) {\r\n setTimeout(() => {\r\n if (this.gridApi) {\r\n this.gridApi.refreshHeader();\r\n if (this.props.filter && !this.props.filter.columnSearchVisible) {\r\n this.gridApi.setFilterModel(null);\r\n this.gridApi.onFilterChanged();\r\n }\r\n }\r\n }, 0);\r\n }\r\n // functionality when all data are loaded to table\r\n if (this.props.rowData && this.props.rowData !== prevProps.rowData) {\r\n // keep filter model when data are changed\r\n if (this.props.filter && this.props.filter.getFilterModel) {\r\n this.gridApi.setFilterModel(this.props.filter.getFilterModel());\r\n this.gridApi.onFilterChanged();\r\n }\r\n // keep sorting model when data are changed\r\n this.setSortModel(this.state.sortModel);\r\n this.gridApi.refreshClientSideRowModel(\"group\");\r\n this.gridApi.redrawRows();\r\n\r\n // keep selected rows when data are changed and rows are still present\r\n const selectedObjectsVisibleInGrid = this.props.rowData.filter((object) => {\r\n return this.props.selectedIds ? this.props.selectedIds.indexOf(object.id) >= 0 : false;\r\n });\r\n if (selectedObjectsVisibleInGrid.length > 0) {\r\n selectedObjectsVisibleInGrid.forEach((object) => {\r\n const rowNode = this.gridApi ? this.gridApi.getRowNode(object.id + \"\") : null;\r\n if (rowNode && !rowNode.isSelected()) {\r\n rowNode.setSelected(true, true);\r\n }\r\n });\r\n } else {\r\n this.gridApi.deselectAll();\r\n }\r\n }\r\n // functionality when chunks of data are dynamically loaded from server\r\n if (this.props.datasource && this.props.datasource !== prevProps.datasource) {\r\n // resets grid data\r\n this.gridApi.updateGridOptions({datasource: this.props.datasource});\r\n }\r\n this.updateRowHeight();\r\n }\r\n\r\n componentWillUnmount() {\r\n window.removeEventListener('mouseup', this.onMouseUp);\r\n }\r\n\r\n /**\r\n * Applies a column state (order, width, visibility, pinning, sorting) to the grid, e.g. one saved from\r\n * `onColumnsChanged`. Columns not in the state lose their sorting. No-op until the grid is ready.\r\n * Note: it clears `sort` and `sortIndex` on the passed objects.\r\n */\r\n public setColumnState(columnModel: ColumnState[]) {\r\n const columnStates: ColumnState[] = [];\r\n if (columnModel) {\r\n columnModel.forEach((item: ColumnState) => {\r\n const columnState = {...item};\r\n item.sortIndex = undefined;\r\n item.sort = undefined\r\n columnStates.push(columnState);\r\n });\r\n }\r\n this.gridApi?.applyColumnState({state: columnStates, defaultState: {sort: null}, applyOrder: true});\r\n }\r\n\r\n /**\r\n * Sorts the grid by the given columns; array order defines the sort priority and all other columns are unsorted.\r\n * No-op until the grid is ready.\r\n */\r\n public setSortModel(sortModel: SortItem[]) {\r\n const columnState: ColumnState[] = [];\r\n if (sortModel) {\r\n sortModel.forEach((item: any, index: number) => {\r\n columnState.push({\r\n colId: item.colId,\r\n sort: item.sort,\r\n sortIndex: index\r\n });\r\n });\r\n }\r\n this.gridApi?.applyColumnState({state: columnState, defaultState: {sort: null}, applyOrder: true});\r\n }\r\n\r\n /** Returns the sorted columns ordered by sort priority; empty until the grid is ready. */\r\n public getSortModel(): SortItem[] {\r\n const columnState = this.gridApi?.getColumnState() ?? [];\r\n const filteredStates = columnState?.filter(item => item.sort != null);\r\n const indexes: { [colId: string]: number; } = {};\r\n filteredStates.forEach((state) => {\r\n if (state.colId) {\r\n indexes[state.colId] = state.sortIndex as number;\r\n }\r\n });\r\n const res = filteredStates.map(s => {\r\n return {colId: s.colId, sort: s.sort} as SortItem;\r\n });\r\n res.sort((a: any, b: any) => indexes[a.colId] - indexes[b.colId]);\r\n return res;\r\n\r\n }\r\n\r\n /** Recomputes font size and row height from `rowStyleRules` and applies them if they changed. */\r\n updateRowHeight() {\r\n let rowAndFontHeight = this.calculateRowAndFontHeight(this.props.rowStyleRules);\r\n if (rowAndFontHeight.rowHeight !== this.state.rowHeight) {\r\n this.changeRowHeight(rowAndFontHeight.fontSize, rowAndFontHeight.rowHeight);\r\n }\r\n if (rowAndFontHeight.fontSize !== this.state.fontSize) {\r\n this.setState({fontSize: rowAndFontHeight.fontSize});\r\n }\r\n }\r\n\r\n /**\r\n * Computes the font size and row height (pixels) defined by the `table-font-size` and `table-line-indentation`\r\n * rules, falling back to the grid defaults.\r\n */\r\n calculateRowAndFontHeight(rowStyleRules?: RowStyleRule[]): { fontSize: number, rowHeight: number } {\r\n let rowHeightDelta = GRID_DEFAULT_ROW_HEIGHT_DELTA;\r\n let fontSize = GRID_DEFAULT_FONT_SIZE;\r\n let rowHeight = calculateRowHeight(fontSize, rowHeightDelta);\r\n if (rowStyleRules) {\r\n for (let i = 0; i < rowStyleRules.length; i++) {\r\n if (rowStyleRules[i].key === \"table-font-size\") {\r\n const currentFontSize = rowStyleRules[i].style.fontSize;\r\n fontSize = getFontSize(currentFontSize);\r\n rowHeight = calculateRowHeight(currentFontSize, rowHeightDelta);\r\n }\r\n if (rowStyleRules[i].key === \"table-line-indentation\") {\r\n const currentRowHeightDelta = rowStyleRules[i].style.rowHeightDelta;\r\n rowHeightDelta = getRowHeightDelta(currentRowHeightDelta);\r\n rowHeight = calculateRowHeight(fontSize, currentRowHeightDelta);\r\n }\r\n }\r\n }\r\n return {rowHeight: rowHeight, fontSize: fontSize};\r\n }\r\n\r\n /** Synchronizes the table configuration panel visibility with the `tableConfigVisible` prop when it is set. */\r\n static getDerivedStateFromProps(props: DataGridProps, state: DataGridState) {\r\n const newState: Partial<DataGridState> = {};\r\n if (props.tableConfigVisible === true || props.tableConfigVisible === false) {\r\n if (props.tableConfigVisible !== state.tableConfigVisible) {\r\n newState.tableConfigVisible = props.tableConfigVisible;\r\n }\r\n }\r\n return newState;\r\n }\r\n\r\n /** ag-grid `gridReady` handler: stores the grid API, forwards the event to `props.onGridReady` and initializes sort/column state. */\r\n onGridReady(gridReadyEvent: GridReadyEvent<TData>): void {\r\n const gridApi = gridReadyEvent.api;\r\n if (!this.gridApi || this.gridApi !== gridApi) {\r\n this.gridApi = gridApi;\r\n if (this.props.onGridReady) {\r\n this.props.onGridReady(gridReadyEvent);\r\n }\r\n this.setState({\r\n sortModel: this.getSortModel(),\r\n columnModel: this.gridApi.getColumnState(),\r\n });\r\n this.updateRowHeight();\r\n }\r\n\r\n window.addEventListener('mouseup', this.onMouseUp)\r\n\r\n // fixing some cases when after onGridReady callback no onPaginationChanged callback is called\r\n // and therefore no initial data loading (loadData()) occurs\r\n setTimeout(() => {\r\n if (!!this.lastPaginationEvent) {\r\n this.onPaginationChanged(this.lastPaginationEvent);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * ag-grid `paginationChanged` handler: updates the pager, reports page size changes through\r\n * `paging.onPaginationChanged`, triggers the initial data load and forwards the event to `props.onPaginationChanged`.\r\n */\r\n onPaginationChanged(event: PaginationChangedEvent) {\r\n if (this.gridApi) {\r\n const currentPage = this.gridApi.paginationGetCurrentPage();\r\n const currentPageSize = this.gridApi.paginationGetPageSize();\r\n let recordsCount = this.props.paging.pageSize >= 0 ? (this.gridApi.paginationIsLastPageFound() ? this.gridApi.paginationGetRowCount() : 0) : this.gridApi.getDisplayedRowCount();\r\n // process only when onGridReady passed\r\n if (this.state.pageSize !== currentPageSize) {\r\n if (this.props.paging.onPaginationChanged) {\r\n this.props.paging.onPaginationChanged(currentPageSize, this.props.paging.pageSize);\r\n }\r\n if (!this.firstLoadDone) {\r\n this.loadData();\r\n this.firstLoadDone = true;\r\n }\r\n }\r\n this.setState({pageSize: currentPageSize, recordsCount: recordsCount, pageIndex: currentPage});\r\n if (this.indexToJump !== null && this.columnToJump !== null) {\r\n this.gridApi.setFocusedCell(this.indexToJump, this.columnToJump);\r\n this.indexToJump = null;\r\n }\r\n this.lastPaginationEvent = null;\r\n } else {\r\n this.lastPaginationEvent = event;\r\n }\r\n if (this.props.onPaginationChanged) {\r\n this.props.onPaginationChanged(event);\r\n }\r\n }\r\n\r\n /** ag-grid `viewportChanged` handler: adds `rowsScrollingDelta` (see {@link DataGridViewportChangedEvent}) and forwards the event to `props.onViewportChanged`. */\r\n onViewportChanged(event: ViewportChangedEvent) {\r\n const dataGridEvent = event as DataGridViewportChangedEvent;\r\n // calculation of the flag that last record is shown\r\n const rowsScrollingDelta = this.state.viewport[1] ? event.lastRow + 1 - this.state.viewport[1] : event.lastRow + 1;\r\n dataGridEvent.rowsScrollingDelta = rowsScrollingDelta;\r\n this.setState({viewport: [event.firstRow + 1, event.lastRow + 1]});\r\n if (this.props.onViewportChanged) {\r\n this.props.onViewportChanged(event);\r\n }\r\n }\r\n\r\n /**\r\n * Switches the paging mode at runtime (used by the table configuration panel) and reports it through\r\n * `paging.onPaginationChanged`; the `paging.pageSize` prop is not changed. No-op until the grid is ready.\r\n * @param pageSize - `-1` no paging, `0` automatic page size, positive number fixed rows per page\r\n */\r\n changePagination(pageSize: number): void {\r\n if (!this.gridApi) {\r\n return;\r\n }\r\n const gridApiWithPrivateAccess = this.gridApi as GridApiWithPrivateAccess;\r\n if (pageSize > 0) {\r\n this.gridApi.updateGridOptions({\r\n pagination: true,\r\n paginationAutoPageSize: false,\r\n paginationPageSize: pageSize\r\n });\r\n if (this.props.paging.onPaginationChanged) {\r\n this.props.paging.onPaginationChanged(pageSize, pageSize);\r\n }\r\n } else if (pageSize === 0) {\r\n this.gridApi.updateGridOptions({pagination: true, paginationAutoPageSize: true});\r\n // handling AG-Grid bug caused by different previous pageSize state\r\n const rowHeight = (gridApiWithPrivateAccess.beans.gos as any).getRowHeightAsNumber?.() ?? 1;\r\n // @ts-ignore\r\n const bodyHeight = (gridApiWithPrivateAccess.beans.ctrlsSvc as any).params.center.viewportSizeFeature.getBodyHeight();\r\n let availablePageSize = 1000;\r\n if (bodyHeight > 0) {\r\n availablePageSize = Math.floor(bodyHeight / rowHeight);\r\n }\r\n if (this.props.paging.pageSize > availablePageSize) {\r\n this.gridApi.updateGridOptions({paginationPageSize: 1});\r\n } else {\r\n // special hack to remove setting page size\r\n this.gridApi.updateGridOptions({paginationPageSize: null as unknown as number});\r\n }\r\n if (this.props.paging && this.props.paging.onPaginationChanged) {\r\n this.props.paging.onPaginationChanged(this.state.pageSize, 0);\r\n }\r\n } else {\r\n this.gridApi.updateGridOptions({pagination: false, paginationAutoPageSize: false});\r\n if (this.props.paging && this.props.paging.onPaginationChanged) {\r\n this.props.paging.onPaginationChanged(this.state.pageSize, -1);\r\n }\r\n }\r\n }\r\n\r\n /** Requests showing/hiding milliseconds via `props.onShowMilliseconds` and redraws the rows once the parent calls back. */\r\n showMilliseconds(showMilis: boolean) {\r\n this.props.onShowMilliseconds?.(showMilis, () => {\r\n if (!this.gridApi) {\r\n return;\r\n }\r\n if (!this.props.rowModelType || this.props.rowModelType === \"clientSide\") {\r\n // table is shown\r\n this.gridApi.refreshClientSideRowModel(\"group\");\r\n }\r\n this.gridApi.redrawRows();\r\n });\r\n }\r\n\r\n /** Requests showing/hiding the year via `props.onShowYear` and redraws the rows once the parent calls back. */\r\n showYear(showYear: boolean) {\r\n this.props.onShowYear?.(showYear, () => {\r\n if (!this.gridApi) {\r\n return;\r\n }\r\n if (!this.props.rowModelType || this.props.rowModelType === \"clientSide\") {\r\n // table is shown\r\n this.gridApi.refreshClientSideRowModel(\"group\");\r\n }\r\n this.gridApi.redrawRows();\r\n });\r\n }\r\n\r\n /** Requests showing/hiding the UTC offset via `props.onShowUtcOffset` and redraws the rows once the parent calls back. */\r\n showUtcOffset(showUtcOffset: UtcOffsetMode) {\r\n this.props.onShowUtcOffset?.(showUtcOffset, () => {\r\n if (!this.gridApi) {\r\n return;\r\n }\r\n if (!this.props.rowModelType || this.props.rowModelType === \"clientSide\") {\r\n // table is shown\r\n this.gridApi.refreshClientSideRowModel(\"group\");\r\n }\r\n this.gridApi.redrawRows();\r\n });\r\n }\r\n\r\n /**\r\n * Applies a new row height (and header/floating filter height derived from `fontSize`, unless given in props),\r\n * redraws the grid (reloading an infinite datasource) and calls `props.onRowHeightChanged`.\r\n */\r\n changeRowHeight(fontSize: number, rowHeight: number) {\r\n this.setState({rowHeight: rowHeight}, () => {\r\n if (this.gridApi) {\r\n if (this.props.headerHeight === undefined) {\r\n this.gridApi.updateGridOptions({headerHeight: calculateRowHeight(fontSize, GRID_DEFAULT_ROW_HEIGHT_DELTA + 2)});\r\n }\r\n if (this.props.floatingFiltersHeight === undefined) {\r\n this.gridApi.updateGridOptions({floatingFiltersHeight: calculateRowHeight(fontSize, GRID_DEFAULT_ROW_HEIGHT_DELTA + 2)});\r\n }\r\n this.gridApi.updateGridOptions({rowHeight: rowHeight})\r\n this.gridApi.resetRowHeights();\r\n this.gridApi.refreshHeader();\r\n this.gridApi.redrawRows();\r\n if (this.props.rowModelType === \"infinite\" && this.props.datasource) {\r\n this.gridApi.setGridOption('rowHeight', rowHeight);\r\n // redraws all server side loaded table data\r\n this.gridApi.updateGridOptions({datasource: this.props.datasource});\r\n }\r\n }\r\n if (this.props.onRowHeightChanged) {\r\n this.props.onRowHeightChanged(rowHeight);\r\n }\r\n });\r\n }\r\n\r\n /** Shows the page with the given zero-based index. */\r\n onGoToPage(pageIndex: number) {\r\n if (this.gridApi) {\r\n this.gridApi.paginationGoToPage(pageIndex);\r\n }\r\n }\r\n\r\n /**\r\n * (Re)loads data: shows the loading overlay and calls `props.onLoadData`. No-op until the grid is ready.\r\n * @param callback - called after `onLoadData` reports that loading has finished\r\n */\r\n loadData(callback?: () => void) {\r\n if (!this.gridApi) {\r\n return;\r\n }\r\n this.setState({loading: true});\r\n if (!this.props.loadingOverlayRenderer) {\r\n this.gridApi.setGridOption(\"loading\", true);\r\n }\r\n this.props.onLoadData((totalRecords) => {\r\n if (!this.gridApi) {\r\n return;\r\n }\r\n this.gridApi.setGridOption(\"loading\", false);\r\n this.gridApi.hideOverlay();\r\n this.setState({loading: false});\r\n if (callback) {\r\n callback();\r\n }\r\n if (totalRecords === 0) {\r\n setTimeout(() => {\r\n if (!this.isActive()) {\r\n return;\r\n }\r\n this.gridApi?.showNoRowsOverlay();\r\n }, 400);\r\n }\r\n if (this.props.autofocus) {\r\n this.focus();\r\n }\r\n });\r\n }\r\n\r\n /** Focuses (after a short delay) the first column of the last selected row, or of the first row when nothing is selected. */\r\n public focus() {\r\n setTimeout(() => {\r\n if (!this.isActive()) {\r\n return;\r\n }\r\n const columnModel = this.gridApi?.getColumnState();\r\n let columnIdToFocus = columnModel?.[0]?.colId || \"name\";\r\n const selectedNodes = this.gridApi?.getSelectedNodes();\r\n const selectedRowIndex: number = (selectedNodes && selectedNodes.length > 0 && selectedNodes[selectedNodes.length - 1].rowIndex) || 0;\r\n this.gridApi?.setFocusedCell(selectedRowIndex, columnIdToFocus);\r\n }, 200);\r\n }\r\n\r\n /** Returns `true` when the grid is ready and not destroyed. */\r\n isActive(): boolean {\r\n return !!this.gridApi && !this.gridApi.isDestroyed();\r\n }\r\n\r\n /** Handler of ag-grid column visible/pinned/resized/moved events; stores the column state and calls `props.onColumnsChanged`. */\r\n onColumnsChanged(event: ColumnEvent) {\r\n const columnModel = event.api.getColumnState();\r\n if (this.props.onColumnsChanged) {\r\n this.props.onColumnsChanged(columnModel, event);\r\n }\r\n this.setState({columnModel: columnModel});\r\n }\r\n\r\n /**\r\n * ag-grid `newColumnsLoaded` handler: refreshes the stored column state after `columnDefs` change, without calling\r\n * `props.onColumnsChanged`, and forwards the event to `props.onNewColumnsLoaded`.\r\n */\r\n onNewColumnsLoaded(event: NewColumnsLoadedEvent) {\r\n this.setState({columnModel: event.api.getColumnState()});\r\n this.props.onNewColumnsLoaded?.(event);\r\n }\r\n\r\n /**\r\n * Requests showing/hiding the floating column filters: re-applies `filter.getFilterModel()` and calls\r\n * `filter.onColumnSearchVisible`; the actual visibility follows `filter.columnSearchVisible`.\r\n */\r\n setColumnSearchVisible(visible: boolean) {\r\n if (this.gridApi && this.props.filter && this.props.filter.getFilterModel) {\r\n this.gridApi.setFilterModel(this.props.filter.getFilterModel());\r\n }\r\n if (this.props.filter && this.props.filter.onColumnSearchVisible) {\r\n this.props.filter.onColumnSearchVisible(visible);\r\n }\r\n }\r\n\r\n private onFilterModified(event: FilterModifiedEvent) {\r\n if (this.props.filter && this.props.filter.onFilterModified) {\r\n this.props.filter.onFilterModified(event);\r\n }\r\n }\r\n\r\n private onFilterChanged(event: FilterChangedEvent) {\r\n if (this.props.filter && this.props.filter.onFilterChanged) {\r\n this.props.filter.onFilterChanged(event);\r\n }\r\n }\r\n\r\n private onFilterConfirmed() {\r\n if (this.props.filter && this.props.filter.onFilterConfirmed) {\r\n this.props.filter.onFilterConfirmed();\r\n }\r\n }\r\n\r\n private onSortChanged(event: SortChangedEvent) {\r\n if (this.props.onSortChanged && this.gridApi) {\r\n const currentSortModel = this.getSortModel() as SortItem[];\r\n if (!isEqual(this.state.sortModel, currentSortModel)) {\r\n // propagate only changes to sorting\r\n this.setState({sortModel: currentSortModel}, () => {\r\n if (this.props.onSortChanged) {\r\n this.props.onSortChanged(event);\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n /** Requests opening/closing the table configuration panel via `props.onTableConfigVisible`; redraws the rows when it closes. */\r\n showTableConfiguration(show: boolean) {\r\n if (this.props.onTableConfigVisible) {\r\n this.props.onTableConfigVisible(show);\r\n }\r\n this.setState({tableConfigVisible: show}, () => {\r\n if (this.gridApi && !this.state.tableConfigVisible) {\r\n // redrawing rows after closing table configuration panel, probably not required any more,\r\n // because config panel and table is shown simultaneously\r\n if (!this.props.rowModelType || this.props.rowModelType === \"clientSide\") {\r\n // table is shown\r\n this.gridApi.refreshClientSideRowModel(\"group\");\r\n }\r\n this.gridApi.redrawRows();\r\n }\r\n });\r\n }\r\n\r\n /** Opens/closes the columns configuration dialog and calls `props.onColumnsConfigVisible`. */\r\n showColumnsConfig(show: boolean) {\r\n if (this.props.onColumnsConfigVisible) {\r\n this.props.onColumnsConfigVisible(show);\r\n }\r\n this.columnModelBeforeEdit = cloneDeep(this.state.columnModel);\r\n this.setState({columnsConfigVisible: show});\r\n }\r\n\r\n private navigateToNextCell(params: NavigateToNextCellParams): CellPosition {\r\n this.lastNavigationEvent = NavigationEventEnum.KEYBOARD;\r\n var suggestedNextCell = params.nextCellPosition;\r\n if (!this.gridApi) {\r\n return suggestedNextCell ?? params.previousCellPosition;\r\n }\r\n const pageIndex = this.gridApi.paginationGetCurrentPage();\r\n const totalPages = this.gridApi.paginationGetTotalPages();\r\n var previousCell = params.previousCellPosition;\r\n switch (params.event?.code) {\r\n case Key.ArrowDown:\r\n if ((previousCell.rowIndex + 1) >= this.gridApi.getDisplayedRowCount()) {\r\n if (pageIndex < (totalPages - 1)) {\r\n this.onGoToPage(pageIndex + 1);\r\n return {\r\n rowIndex: 0,\r\n column: previousCell.column,\r\n rowPinned: previousCell.rowPinned\r\n };\r\n } else {\r\n return {\r\n rowIndex: previousCell.rowIndex,\r\n column: previousCell.column,\r\n rowPinned: previousCell.rowPinned\r\n };\r\n }\r\n\r\n }\r\n break;\r\n case Key.ArrowUp:\r\n if ((previousCell.rowIndex - 1) < 0) {\r\n if (pageIndex > 0) {\r\n this.onGoToPage(pageIndex - 1);\r\n return {\r\n rowIndex: this.gridApi.getDisplayedRowCount() - 1,\r\n column: previousCell.column,\r\n rowPinned: previousCell.rowPinned\r\n };\r\n } else {\r\n return {\r\n rowIndex: previousCell.rowIndex,\r\n column: previousCell.column,\r\n rowPinned: previousCell.rowPinned\r\n };\r\n }\r\n }\r\n break;\r\n }\r\n return suggestedNextCell ?? params.previousCellPosition;\r\n }\r\n\r\n private suppressKeyboardEvent(params: SuppressKeyboardEventParams): boolean {\r\n if (!this.gridApi || params.event.type === \"keypress\") {\r\n return false;\r\n }\r\n if (params.editing && params.event.key === Key.Enter && (params.event.ctrlKey || params.event.metaKey)) {\r\n // ag-grid's Ctrl+Enter bulk edit writes the value into every cell of the cell ranges and RangeSelector ranges always\r\n // span whole rows, so the key is replayed as a plain Enter\r\n params.event.target?.dispatchEvent(new KeyboardEvent(\"keydown\", {\r\n key: Key.Enter,\r\n code: params.event.code,\r\n shiftKey: params.event.shiftKey,\r\n bubbles: true,\r\n cancelable: true\r\n }));\r\n return true;\r\n }\r\n const pageIndex = this.gridApi.paginationGetCurrentPage();\r\n const totalPages = this.gridApi.paginationGetTotalPages();\r\n switch (params.event.code) {\r\n case Key.ArrowDown:\r\n case Key.ArrowUp:\r\n case Key.ArrowLeft:\r\n case Key.ArrowRight:\r\n if (params.editing && params.event.altKey) {\r\n const focusedCell = this.gridApi.getFocusedCell();\r\n if (focusedCell) {\r\n let indexToJump: number;\r\n let columnToJump: Column;\r\n if (params.event.code === Key.ArrowDown) {\r\n indexToJump = focusedCell.rowIndex + 1;\r\n columnToJump = focusedCell.column;\r\n if (indexToJump >= this.gridApi.getDisplayedRowCount()) {\r\n if (pageIndex < (totalPages - 1)) {\r\n this.onGoToPage(pageIndex + 1);\r\n indexToJump = 0\r\n } else {\r\n indexToJump = focusedCell.rowIndex;\r\n }\r\n }\r\n this.lastNavigationEvent = NavigationEventEnum.KEYBOARD;\r\n this.indexToJump = indexToJump;\r\n this.columnToJump = columnToJump;\r\n setTimeout(() => {\r\n this.gridApi?.startEditingCell({\r\n rowIndex: indexToJump,\r\n colKey: columnToJump,\r\n key: Key.Enter\r\n });\r\n }, 0);\r\n return true;\r\n } else if (params.event.code === Key.ArrowUp) {\r\n indexToJump = focusedCell.rowIndex - 1;\r\n columnToJump = focusedCell.column;\r\n if (indexToJump < 0) {\r\n if (pageIndex > 0) {\r\n this.onGoToPage(pageIndex - 1);\r\n indexToJump = this.gridApi.getDisplayedRowCount() - 1;\r\n } else {\r\n indexToJump = focusedCell.rowIndex;\r\n }\r\n }\r\n this.lastNavigationEvent = NavigationEventEnum.KEYBOARD;\r\n this.indexToJump = indexToJump;\r\n this.columnToJump = columnToJump;\r\n setTimeout(() => {\r\n this.gridApi?.startEditingCell({\r\n rowIndex: indexToJump,\r\n colKey: columnToJump,\r\n key: Key.Enter\r\n });\r\n }, 0);\r\n return true;\r\n } else if (params.event.code === Key.ArrowLeft) {\r\n this.gridApi.tabToPreviousCell();\r\n break;\r\n } else /*Key.ArrowRight*/ {\r\n this.gridApi.tabToNextCell();\r\n break;\r\n }\r\n }\r\n }\r\n break;\r\n case Key.PageDown:\r\n this.lastNavigationEvent = NavigationEventEnum.KEYBOARD;\r\n if (pageIndex < (totalPages - 1)) {\r\n this.gridApi.paginationGoToNextPage();\r\n const focusedCell = this.gridApi.getFocusedCell();\r\n if (focusedCell) {\r\n this.indexToJump = Math.min(focusedCell.rowIndex + this.gridApi.paginationGetPageSize(), this.gridApi.paginationGetRowCount());\r\n this.columnToJump = focusedCell.column;\r\n return true;\r\n }\r\n }\r\n break;\r\n case Key.PageUp:\r\n this.lastNavigationEvent = NavigationEventEnum.KEYBOARD;\r\n if (pageIndex > 0) {\r\n this.gridApi.paginationGoToPreviousPage();\r\n const focusedCell = this.gridApi.getFocusedCell();\r\n if (focusedCell) {\r\n this.indexToJump = Math.max(focusedCell.rowIndex - this.gridApi.paginationGetPageSize(), 0);\r\n this.columnToJump = focusedCell.column;\r\n return true;\r\n }\r\n }\r\n break;\r\n case Key.End:\r\n this.lastNavigationEvent = NavigationEventEnum.KEYBOARD;\r\n if (pageIndex < (totalPages - 1)) {\r\n this.gridApi.paginationGoToLastPage();\r\n const focusedCell = this.gridApi.getFocusedCell();\r\n if (focusedCell) {\r\n this.indexToJump = this.gridApi.paginationGetRowCount() - 1;\r\n this.columnToJump = focusedCell.column;\r\n return true;\r\n }\r\n }\r\n break;\r\n case Key.Home:\r\n this.lastNavigationEvent = NavigationEventEnum.KEYBOARD;\r\n if (pageIndex > 0) {\r\n this.gridApi.paginationGoToFirstPage();\r\n const focusedCell = this.gridApi.getFocusedCell();\r\n if (focusedCell) {\r\n this.indexToJump = 0;\r\n this.columnToJump = focusedCell.column;\r\n return true;\r\n }\r\n }\r\n break;\r\n case \"KeyA\":\r\n if (params.event.ctrlKey && !params.editing) {\r\n var firstRow = this.gridApi.getFirstDisplayedRowIndex();\r\n var lastRow = this.gridApi.getLastDisplayedRowIndex();\r\n this.gridApi.deselectAll();\r\n if (this.props.rowModelType === \"infinite\") {\r\n for (let i = firstRow; i <= lastRow; i++) {\r\n this.gridApi.getDisplayedRowAtIndex(i)?.setSelected(true);\r\n }\r\n } else {\r\n this.gridApi.forEachNodeAfterFilter(function (node, index) {\r\n if (index >= firstRow && index <= lastRow) {\r\n node.setSelected(true);\r\n }\r\n });\r\n }\r\n }\r\n break;\r\n case \"KeyI\":\r\n if (params.event.ctrlKey) {\r\n const focusedCell = this.gridApi.getFocusedCell();\r\n const column = this.gridApi?.getColumn(\"objectId\") ?? this.gridApi?.getColumn(\"id\");\r\n if (focusedCell && column) {\r\n const displayedRowAtIndex = this.gridApi.getDisplayedRowAtIndex(focusedCell.rowIndex);\r\n if (displayedRowAtIndex) {\r\n ClipboardUtils.copyToClipboard(this.getValue(column, displayedRowAtIndex));\r\n }\r\n this.gridApi.setFocusedCell(focusedCell.rowIndex, focusedCell.column.getId());\r\n }\r\n }\r\n break;\r\n case \"KeyB\":\r\n if (params.event.ctrlKey) {\r\n const focusedCell = this.gridApi.getFocusedCell();\r\n const column = this.gridApi?.getColumn(\"objectName\") ?? this.gridApi?.getColumn(\"name\");\r\n if (focusedCell && column) {\r\n const displayedRowAtIndex1 = this.gridApi.getDisplayedRowAtIndex(focusedCell.rowIndex);\r\n if (displayedRowAtIndex1) {\r\n ClipboardUtils.copyToClipboard(this.getValue(column, displayedRowAtIndex1));\r\n }\r\n this.gridApi.setFocusedCell(focusedCell.rowIndex, focusedCell.column.getId());\r\n }\r\n }\r\n break;\r\n case \"KeyC\":\r\n if (params.event.ctrlKey && !params.editing) {\r\n if (this.gridApi.getSelectedRows().length > 1) {\r\n const tableContent: string[][] = [];\r\n const convert = (data: string[][]) => data.map((row) => row.join('\\t')).join('\\r\\n');\r\n const columns = this.gridApi.getAllDisplayedColumns().map((column: Column) => {\r\n const columnTypes = column.getColDef().type;\r\n return {\r\n column: column,\r\n displayName: this.gridApi?.getDisplayNameForColumn(column, null) ?? column.getColDef().headerName,\r\n isDateField: columnTypes && columnTypes.indexOf(\"dateColumn\") >= 0,\r\n isDateTimeField: columnTypes && columnTypes.indexOf(\"dateTimeColumn\") >= 0\r\n };\r\n });\r\n let tableNodes: IRowNode[] = [];\r\n\r\n if (columns.length === 0) {\r\n ClipboardUtils.copyToClipboard(convert(tableContent));\r\n }\r\n\r\n tableContent.push(columns.map((column) => column.displayName ?? \"\"));\r\n this.gridApi.forEachNodeAfterFilterAndSort((node) => {\r\n if (node.isSelected()) {\r\n tableNodes.push(node);\r\n }\r\n });\r\n\r\n for (let index = 0; index < tableNodes.length; index++) {\r\n const record: string[] = [];\r\n\r\n columns.forEach((column) => {\r\n let value = this.getValue(column.column, tableNodes[index]);\r\n record.push(value);\r\n });\r\n tableContent.push(record);\r\n }\r\n\r\n ClipboardUtils.copyToClipboard(convert(tableContent));\r\n } else {\r\n const focusedCell = this.gridApi.getFocusedCell();\r\n if (focusedCell) {\r\n const displayedRowAtIndex2 = this.gridApi.getDisplayedRowAtIndex(focusedCell.rowIndex);\r\n if (displayedRowAtIndex2) {\r\n ClipboardUtils.copyToClipboard(this.getValue(focusedCell.column, displayedRowAtIndex2, true));\r\n }\r\n this.gridApi.setFocusedCell(focusedCell.rowIndex, focusedCell.column.getId());\r\n }\r\n }\r\n }\r\n break;\r\n case Key.Enter:\r\n this.props.onEnter?.();\r\n break;\r\n }\r\n this.props.onKeyPressed?.(params.event, params.editing);\r\n return false;\r\n }\r\n\r\n /**\r\n * Returns the cell value as used for clipboard copy and export: the ag-grid cell value passed through the column's\r\n * `valueFormatter` (a string formatter is treated as a field path into the row data).\r\n * @param doNotReplaceNewline - keep line breaks in values containing {@link EXPORT_SEPARATOR} (otherwise replaced by a space)\r\n */\r\n getValue(column: Column, row: IRowNode, doNotReplaceNewline?: boolean): string {\r\n let formattedValue = this.gridApi?.getCellValue({rowNode: row, colKey: column});\r\n if (formattedValue && typeof formattedValue === \"string\" && formattedValue.indexOf(EXPORT_SEPARATOR) > 0 && !doNotReplaceNewline) {\r\n formattedValue = formattedValue.replace(/[\\n\\r]+/g, ' ');\r\n }\r\n const valueFormatter = column.getColDef().valueFormatter;\r\n if (valueFormatter) {\r\n const params: ValueFormatterParams = {\r\n data: row.data,\r\n node: row,\r\n column: column,\r\n colDef: column.getColDef(),\r\n api: this.gridApi as GridApi,\r\n context: this.gridApi?.getGridOption('context'),\r\n value: formattedValue\r\n };\r\n if (typeof valueFormatter === 'function') {\r\n formattedValue = valueFormatter?.(params);\r\n } else if (typeof valueFormatter === 'string') {\r\n formattedValue = at(row.data, valueFormatter)[0];\r\n }\r\n }\r\n return formattedValue;\r\n }\r\n\r\n /**\r\n * Collects the table content for export: a header row with the displayed column names followed by one row of\r\n * {@link DataGrid.getValue} values per record (all filtered and sorted rows, or only the selected ones when\r\n * `props.onlySelectedNodes` is set). With a non client-side row model it waits for rows to be loaded.\r\n * @param progressPopup - optional popup updated with the progress\r\n * @returns rows of cell strings; empty when the grid is not ready\r\n */\r\n async getExportContent(progressPopup: ProgressPopup | null, props: ContextMenuProps): Promise<string[][]> {\r\n if (!this.gridApi) {\r\n return [];\r\n }\r\n\r\n const tableContent: string[][] = [];\r\n const columns = this.gridApi.getAllDisplayedColumns().map((column: Column) => {\r\n const columnTypes = column.getColDef().type;\r\n return {\r\n column: column,\r\n displayName: this.gridApi?.getDisplayNameForColumn(column, null) ?? column.getColDef().headerName,\r\n isDateField: columnTypes && columnTypes.indexOf(\"dateColumn\") >= 0,\r\n isDateTimeField: columnTypes && columnTypes.indexOf(\"dateTimeColumn\") >= 0\r\n };\r\n });\r\n if (columns.length === 0) {\r\n return tableContent;\r\n }\r\n tableContent.push(columns.map((column) => column.displayName ?? \"\"));\r\n\r\n let rowCount: number;\r\n let tableNodes: IRowNode[] = [];\r\n if (this.gridApi.getGridOption('rowModelType') === \"clientSide\") {\r\n if (props.onlySelectedNodes) {\r\n rowCount = 0;\r\n this.gridApi.forEachNodeAfterFilterAndSort((node) => {\r\n if (node.isSelected()) {\r\n tableNodes.push(node);\r\n rowCount++;\r\n }\r\n });\r\n } else {\r\n rowCount = this.gridApi.getDisplayedRowCount();\r\n this.gridApi.forEachNodeAfterFilterAndSort((node) => {\r\n tableNodes.push(node);\r\n });\r\n }\r\n } else {\r\n if (props.onlySelectedNodes) {\r\n const selectedNodes = this.gridApi.getSelectedNodes();\r\n rowCount = selectedNodes.length;\r\n selectedNodes.forEach((node) => {\r\n tableNodes.push(node);\r\n });\r\n tableNodes.sort((a, b) => (a.rowIndex ?? 0) > (b.rowIndex ?? 0) ? 1 : (a.rowIndex === b.rowIndex) ? 0 : -1);\r\n } else {\r\n const virtualRowCount = this.gridApi.getDisplayedRowCount();\r\n rowCount = virtualRowCount ? virtualRowCount : 0;\r\n }\r\n }\r\n progressPopup?.setRecordCount(rowCount);\r\n\r\n let percentStep = Math.floor(rowCount / 100);\r\n if (percentStep < 100) {\r\n percentStep = 100;\r\n }\r\n\r\n if (this.gridApi.getGridOption('rowModelType') === \"clientSide\" || props.onlySelectedNodes) {\r\n for (let index = 0; index < tableNodes.length; index++) {\r\n const record: string[] = [];\r\n columns.forEach((column) => {\r\n let value = this.getValue(column.column, tableNodes[index]);\r\n record.push(value);\r\n });\r\n tableContent.push(record);\r\n if (index % percentStep === 0) {\r\n progressPopup?.update(Math.floor(index / rowCount * 100) - 1);\r\n await TimeUtils.sleep(100);\r\n }\r\n }\r\n } else {\r\n for (let index = 0; index < rowCount; index++) {\r\n let row: RowNode | undefined = undefined;\r\n let record: any[] = [];\r\n do {\r\n record = [];\r\n do {\r\n row = this.gridApi.getDisplayedRowAtIndex(index) as RowNode;\r\n if (!row || !row.data) {\r\n await TimeUtils.sleep(100);\r\n }\r\n } while (!row || !row.data);\r\n columns.forEach((column) => {\r\n record.push(this.getValue(column.column, row as RowNode));\r\n });\r\n if (record.filter((cell) => !!cell).length === 0) {\r\n await TimeUtils.sleep(100);\r\n }\r\n } while (record.filter((cell) => !!cell).length === 0);\r\n tableContent.push(record);\r\n if (index % percentStep === 0) {\r\n // noinspection ES6MissingAwait\r\n progressPopup?.update(Math.floor(index / rowCount * 100) - 1);\r\n await TimeUtils.sleep(100);\r\n }\r\n }\r\n }\r\n // noinspection ES6MissingAwait\r\n progressPopup?.update(99);\r\n await TimeUtils.sleep(300);\r\n return tableContent;\r\n }\r\n\r\n /**\r\n * ag-grid `cellFocused` handler: selects the focused row (Shift+arrow extends/shrinks the selection), tracks the\r\n * fill handle cell and forwards the event to `props.onCellFocused`.\r\n */\r\n onCellFocused(event: CellFocusedEvent) {\r\n const row: IRowNode | undefined = event.rowIndex !== null ? this.gridApi?.getDisplayedRowAtIndex(event.rowIndex) : undefined;\r\n if (row) {\r\n if (this.lastNavigationEvent === NavigationEventEnum.KEYBOARD && KeyboardUtils.isKeyPressed(Key.Shift) && this.lastCellFocus && this.lastCellFocus.rowIndex !== event.rowIndex) {\r\n // focusing new row with SHIFT key pressed\r\n if (!row.isSelected()) {\r\n // add to selection\r\n row.setSelected(true, false);\r\n } else if (this.lastCellFocus?.rowIndex !== null) {\r\n const lastFocusedRow: IRowNode | undefined = this.gridApi?.getDisplayedRowAtIndex(this.lastCellFocus.rowIndex);\r\n if (lastFocusedRow?.isSelected()) {\r\n lastFocusedRow.setSelected(false, false);\r\n }\r\n }\r\n } else if (!row.isSelected() && !KeyboardUtils.isKeyPressed(Key.Control) && !KeyboardUtils.isKeyPressed(Key.Shift)) {\r\n row.setSelected(true, true);\r\n }\r\n }\r\n\r\n if (event.rowIndex !== null && event.column !== null && this.props.showFillHandle) {\r\n const colId = typeof event.column === \"string\" ? event.column : event.column.getColId();\r\n\r\n this.setState({focusedCell: {rowIndex: event.rowIndex, colId: colId}}, () => {\r\n this.gridApi?.refreshCells({force: true});\r\n })\r\n }\r\n\r\n this.props.onCellFocused?.(event);\r\n this.lastCellFocus = event;\r\n }\r\n\r\n /** ag-grid `cellMouseOver` handler: extends the fill handle range while dragging. */\r\n onCellMouseOver(e: CellMouseOverEvent) {\r\n if (this.state.isDragging) {\r\n this.setState({endCoord: {rowIndex: e.rowIndex!, colId: e.column.getColId()}}, () => {\r\n this.gridApi?.refreshCells({force: true});\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * ag-grid `cellMouseDown` handler: focuses the clicked cell, forwards the event to `props.onCellMouseDown` and\r\n * starts a fill handle drag when the bottom-right corner of the cell is pressed.\r\n */\r\n onCellMouseDown(e: CellMouseDownEvent) {\r\n this.lastNavigationEvent = NavigationEventEnum.MOUSE;\r\n // always focus clicked cell (also when using shift key)\r\n if (e.rowIndex !== null) {\r\n this.setFocusedCellDebounced(e.rowIndex, e.column, e.rowPinned !== null ? e.rowPinned : undefined);\r\n }\r\n this.props.onCellMouseDown?.(e);\r\n\r\n if (this.props.showFillHandle) {\r\n const mouseEvent = e.event as MouseEvent;\r\n const cellElement = (mouseEvent.target as HTMLElement).closest<HTMLElement>('.ag-cell');\r\n const rect = cellElement?.getBoundingClientRect();\r\n const isHandleClick = rect !== undefined && (rect.right - mouseEvent.clientX < 10) && (rect.bottom - mouseEvent.clientY < 10);\r\n\r\n if (isHandleClick) {\r\n this.setState({\r\n isDragging: true,\r\n startCoord: {rowIndex: e.rowIndex!, colId: e.column.getColId()},\r\n endCoord: {rowIndex: e.rowIndex!, colId: e.column.getColId()}\r\n });\r\n }\r\n }\r\n }\r\n\r\n /** Window `mouseup` handler: finishes a fill handle drag and calls `props.onFillHandleComplete`. */\r\n onMouseUp() {\r\n if (this.state.isDragging) {\r\n const columns = this.gridApi?.getAllDisplayedColumns().map((c) => c.getColId()) ?? [];\r\n\r\n if (this.state.startCoord && this.state.endCoord) {\r\n const startIndex = columns.findIndex((c) => c === this.state.startCoord?.colId);\r\n const endIndex = columns.findIndex((c) => c === this.state.endCoord?.colId);\r\n\r\n if (startIndex >= 0 && endIndex >= 0) {\r\n const actualStart = Math.min(startIndex, endIndex);\r\n const actualEnd = Math.max(startIndex, endIndex);\r\n const actualRowStart = Math.min(this.state.startCoord.rowIndex, this.state.endCoord.rowIndex);\r\n const actualRowEnd = Math.max(this.state.startCoord.rowIndex, this.state.endCoord.rowIndex);\r\n\r\n this.props.onFillHandleComplete?.(actualRowStart, actualRowEnd, columns.slice(actualStart, actualEnd + 1));\r\n }\r\n }\r\n\r\n this.setState({isDragging: false, startCoord: null, endCoord: null}, () => {\r\n this.gridApi?.refreshCells({force: true});\r\n });\r\n }\r\n };\r\n\r\n /** Focuses the given cell; debounced by 200 ms. */\r\n setFocusedCellDebounced(rowIndex: number, column: string | Column, rowPinned: RowPinnedType) {\r\n this.gridApi?.setFocusedCell(rowIndex, column, rowPinned);\r\n }\r\n\r\n private onCellContextMenu(event: CellContextMenuEvent) {\r\n this.setState({contextMenuVisible: !!event});\r\n if (event.node) {\r\n if (!event.node.isSelected()) {\r\n event.node.setSelected(true, true);\r\n }\r\n }\r\n }\r\n\r\n private loadingOverlayRenderer(): ReactElement {\r\n if (this.props.loadingOverlayRenderer) {\r\n const loadingOverlay = this.props.loadingOverlayRenderer();\r\n if (loadingOverlay) {\r\n return loadingOverlay;\r\n }\r\n }\r\n return <div><LoadingOutlined style={{fontSize: 40, color: \"#1890ff\"}}/></div>;\r\n }\r\n\r\n private noRecordsOverlayRenderer(): ReactElement {\r\n if (this.props.noRecordsOverlayRenderer) {\r\n const noRecordsOverlay = this.props.noRecordsOverlayRenderer();\r\n if (noRecordsOverlay) {\r\n return noRecordsOverlay;\r\n }\r\n }\r\n return (\r\n <Empty description={i18n(\"No records found.\")} styles={{image: {height: \"8vh\"}}}>\r\n <Button type=\"primary\" onClick={() => {\r\n if (this.props.search && this.props.search.onSearch) {\r\n this.props.search.onSearch();\r\n }\r\n }}>\r\n <SearchOutlined/> {i18n(\"Search\")}\r\n </Button>\r\n </Empty>\r\n );\r\n }\r\n\r\n /**\r\n * Replaces the grid's row data (client-side row model) without going through the `rowData` prop; intended for\r\n * {@link DataGridProps.rowDataManualMode}. No-op until the grid is ready.\r\n */\r\n public setRowData(dataArray: any[]): void {\r\n this.gridApi?.updateGridOptions({rowData: dataArray});\r\n }\r\n\r\n private onRowDataUpdated(event: RowDataUpdatedEvent) {\r\n if (!this.gridApi) {\r\n return;\r\n }\r\n const currentPage = this.gridApi.paginationGetCurrentPage();\r\n const recordsCount = this.props.paging.pageSize >= 0 ? (this.gridApi.paginationIsLastPageFound() ? this.gridApi.paginationGetRowCount() : 0) : this.gridApi.getDisplayedRowCount();\r\n this.setState({recordsCount: recordsCount, pageIndex: currentPage});\r\n if (this.props.onRowDataUpdated) {\r\n this.props.onRowDataUpdated(event);\r\n }\r\n }\r\n\r\n private static EMPTY_STYLE: RowStyle = {}\r\n\r\n /** ag-grid `getRowStyle` implementation: merges the matching `rowStyleRules` and then `props.getRowStyle`. */\r\n _getRowStyle(params: RowClassParams): RowStyle {\r\n const rowStyleRules = this.props.rowStyleRules;\r\n if (rowStyleRules) {\r\n const style: any = {};\r\n rowStyleRules.forEach((rowStyleRule) => {\r\n if (rowStyleRule.expression) {\r\n if (!rowStyleRuleCompiledExpressions[rowStyleRule.expression]) {\r\n rowStyleRuleCompiledExpressions[rowStyleRule.expression] = compileExpression(rowStyleRule.expression);\r\n }\r\n if (rowStyleRuleCompiledExpressions[rowStyleRule.expression](params.node.data)) {\r\n Object.assign(style, rowStyleRule.style);\r\n }\r\n } else {\r\n Object.assign(style, rowStyleRule.style);\r\n }\r\n });\r\n if (!style.color) {\r\n style.color = null;\r\n } else if (typeof style.color === \"object\") {\r\n style.color = `rgba(${style.color.r},${style.color.g},${style.color.b},${style.color.a})`;\r\n }\r\n if (!style.backgroundColor) {\r\n // \"\" removes a stale inline color (ag-grid skips null) without overriding the theme's odd-row background\r\n style.backgroundColor = \"\";\r\n } else if (typeof style.backgroundColor === \"object\") {\r\n style.backgroundColor = `rgba(${style.backgroundColor.r},${style.backgroundColor.g},${style.backgroundColor.b},${style.backgroundColor.a})`;\r\n }\r\n if (!style.fontWeight) {\r\n style.fontWeight = \"inherit\";\r\n }\r\n const fontSize = style.fontSize;\r\n if (style.fontSize) {\r\n style.fontSize = style.fontSize + \"px\";\r\n } else {\r\n style.fontSize = \"inherit\";\r\n }\r\n if (style.rowHeightDelta) {\r\n const lineHeight = calculateLineHeight(fontSize, style.rowHeightDelta);\r\n if (style.rowHeightDelta) {\r\n delete style.rowHeightDelta;\r\n }\r\n style.lineHeight = lineHeight + \"px\";\r\n } else {\r\n const lineHeight = calculateLineHeight(fontSize, GRID_DEFAULT_ROW_HEIGHT_DELTA);\r\n style.lineHeight = lineHeight + \"px\";\r\n }\r\n if (this.props.getRowStyle) {\r\n const rowStyle = this.props.getRowStyle(params);\r\n if (rowStyle) {\r\n return Object.assign(style, rowStyle) as RowStyle;\r\n }\r\n }\r\n return style as RowStyle;\r\n }\r\n return DataGrid.EMPTY_STYLE;\r\n }\r\n\r\n /** ag-grid `getRowHeight` implementation: the current row height in pixels. */\r\n _getRowHeight(): number {\r\n return this.state.rowHeight;\r\n }\r\n\r\n /** Cell style applied to every adapted column: font size, right alignment for `alignRight` and the column's own `cellStyle`. */\r\n _getCellStyle(params: { colDef: ColDef }) {\r\n const fontSize = this.state.fontSize;\r\n const cellStyles: { [key: string]: any } = {\"fontSize\": fontSize + \"px\"};\r\n if (params.colDef.type && params.colDef.type.indexOf(\"alignRight\") >= 0) {\r\n cellStyles[\"textAlign\"] = \"right\";\r\n }\r\n if (params.colDef.cellRendererParams?.originalCellStyle) {\r\n const originalCellStylesOrHandler = params.colDef.cellRendererParams.originalCellStyle as {} | ((params: any) => {});\r\n if (typeof originalCellStylesOrHandler === \"object\") {\r\n Object.assign(cellStyles, originalCellStylesOrHandler);\r\n } else if (typeof originalCellStylesOrHandler === \"function\") {\r\n const originalCellStyles = originalCellStylesOrHandler(params);\r\n if (originalCellStyles) {\r\n Object.assign(cellStyles, originalCellStyles);\r\n }\r\n }\r\n }\r\n return cellStyles;\r\n }\r\n\r\n /** Returns `props.defaultColDef` extended with the grid's keyboard handling (`suppressKeyboardEvent` is always overridden). */\r\n getDefaultColDefinition(colDef: ColDef | undefined): ColDef {\r\n if (colDef) {\r\n return {...colDef, suppressKeyboardEvent: this.suppressKeyboardEvent} as ColDef;\r\n } else {\r\n return {suppressKeyboardEvent: this.suppressKeyboardEvent} as ColDef;\r\n }\r\n }\r\n\r\n private getCustomComponents(components: any) {\r\n let customComponents = gridFrameworkComponents;\r\n if (components) {\r\n customComponents = Object.assign(gridFrameworkComponents, components);\r\n }\r\n return customComponents;\r\n }\r\n\r\n private onPageOrientationChange(pageOrientation: PageOrientation) {\r\n this.setState({pageOrientation: pageOrientation});\r\n }\r\n\r\n private onExport(start: boolean) {\r\n this.exportRunning = start;\r\n this.setState({exporting: start});\r\n }\r\n\r\n /**\r\n * Properties of an export menu or of {@link runExport}: the date-time format of the grid, its export content and\r\n * export state, with `overrides` applied.\r\n */\r\n private getExportProps(overrides: Partial<ContextMenuProps>): ContextMenuProps {\r\n return {\r\n showMilliseconds: !!this.props.showMilliseconds,\r\n showYear: !this.props.hideYear,\r\n showUtcOffset: LocaleHolder.resolveUtcOffsetMode(this.props.showUtcOffset),\r\n getExportContent: this.getExportContent,\r\n pageOrientation: this.state.pageOrientation,\r\n exporting: this.state.exporting,\r\n onPageOrientationChange: this.onPageOrientationChange,\r\n onExport: this.onExport,\r\n ...overrides,\r\n };\r\n }\r\n\r\n /**\r\n * Exports the grid the same way as the toolbar export menu, for an export started from a custom button (hide the\r\n * built-in one with `toolbar.hideExportButton`). Rows are exported with the displayed columns, filter and sort, and\r\n * the date-time format of the grid; `exportMenu.onExported` is called after a successful export.\r\n *\r\n * Nothing is exported before the grid is ready, while it is loading or while another export is running.\r\n *\r\n * @param exportType file type, or `\"clipboard\"` to copy the rows to the clipboard\r\n * @param options.onlySelectedRows export only the selected rows, as the row context menu does\r\n * @param options.pageOrientation page orientation of the PDF export; defaults to the one last chosen in the export menu\r\n * @returns resolved once the content is saved or copied, rejected when the export fails (an error notification is\r\n * shown as well)\r\n */\r\n public async exportData(exportType: ExportType, options?: {\r\n onlySelectedRows?: boolean,\r\n pageOrientation?: PageOrientation\r\n }): Promise<void> {\r\n if (!this.isActive() || this.state.loading || this.exportRunning) {\r\n return;\r\n }\r\n await runExport(exportType, this.getExportProps({\r\n onlySelectedNodes: options?.onlySelectedRows,\r\n onExported: this.props.exportMenu?.onExported,\r\n pageOrientation: options?.pageOrientation ?? this.state.pageOrientation,\r\n }));\r\n }\r\n\r\n /** Renders the toolbar row: toolbar with search, pager (or record range when paging is disabled) and `toolbar.extraContent`. */\r\n renderNavigationPanel(): ReactElement {\r\n return (\r\n <React.Fragment>\r\n {this.props.toolbar && this.props.toolbar.renderToolbar ? this.props.toolbar.renderToolbar(this.renderToolBarWithSearch()) : this.renderToolBarWithSearch()}\r\n {this.props.paging.pageSize >= 0 &&\r\n <DataGridPagination\r\n disabled={this.state.loading}\r\n current={this.state.pageIndex ? this.state.pageIndex + 1 : 1}\r\n pageSize={this.state.pageSize ? this.state.pageSize : 20}\r\n total={this.state.recordsCount ?? 1}\r\n compact={this.props.toolbar?.compact}\r\n onGoToPage={page => {\r\n this.onGoToPage(page - 1);\r\n }}\r\n />}\r\n {this.props.paging.pageSize < 0 && this.state.recordsCount && !this.props.toolbar?.hideRecordCount ?\r\n <WithCss useStyles={useStyles}>\r\n {({styles}) =>\r\n <span className={styles.recordRange}\r\n style={{\r\n flex: \"0 1 auto\",\r\n textAlign: \"right\",\r\n whiteSpace: \"nowrap\",\r\n margin: \"0 12px\",\r\n }}>{`${this.state.viewport[0]}-${this.state.viewport[1]} ${i18n('of')} ${this.state.recordsCount}`}</span>}\r\n </WithCss>\r\n : undefined}\r\n {this.props.toolbar?.extraContent}\r\n </React.Fragment>\r\n );\r\n }\r\n\r\n /**\r\n * Renders the default toolbar: `toolbar.toolbarButtons`, export and settings menus, search field and search button.\r\n * With `toolbar.compact` the export and settings buttons move into a popover opened by one button.\r\n */\r\n renderToolBarWithSearch(): ReactElement {\r\n const compact = this.props.toolbar?.compact;\r\n const search = this.props.search;\r\n\r\n return (\r\n <Space.Compact key=\"filter-panel\"\r\n className=\"datagrid-autocomplete-input-group\"\r\n style={{whiteSpace: \"nowrap\", flexGrow: 1, display: \"flex\"}}>\r\n {this.props.toolbar?.toolbarButtons}\r\n {compact ? this.renderCompactMenu() : <>\r\n {!this.props.toolbar?.hideExportButton && this.renderExportButton()}\r\n {this.renderSettingsButton()}\r\n </>}\r\n {!search?.hidden && !search?.searchRenderer && <AutoCompleteInput\r\n style={{minWidth: 100, flexGrow: 1}}\r\n placeholder={search?.placeholder}\r\n stringFormatter={search?.stringFormatter}\r\n value={search?.searchString}\r\n options={search?.searchHistory}\r\n onChange={search?.onChange}\r\n onSearch={search?.onSearch}\r\n disabled={this.state.loading || this.props.filter?.columnSearchVisible}\r\n />}\r\n {search?.searchRenderer?.()}\r\n {!search?.searchButtonHidden && this.renderSearchButton()}\r\n </Space.Compact>\r\n );\r\n }\r\n\r\n /**\r\n * Button of the compact toolbar opening a popover with the export and settings buttons, so that a phone screen\r\n * keeps room for the pager. The popover closes once one of their menu items is used.\r\n */\r\n private renderCompactMenu(): ReactElement {\r\n const close = () => this.setState({compactMenuOpen: false});\r\n\r\n return (\r\n <Popover open={this.state.compactMenuOpen}\r\n onOpenChange={open => this.setState({compactMenuOpen: open})}\r\n trigger=\"click\"\r\n placement=\"bottomLeft\"\r\n // the menus are built only while the popover is open - the grid renders often, e.g. while scrolling\r\n destroyOnHidden\r\n content={\r\n <RenderLater>{() =>\r\n <Space.Compact>\r\n {!this.props.toolbar?.hideExportButton && this.renderExportButton(close)}\r\n {this.renderSettingsButton(close)}\r\n </Space.Compact>\r\n }</RenderLater>\r\n }>\r\n <Button title={i18n(\"Extended table features\")}>\r\n {this.state.loading ? <LoadingOutlined/> : <EllipsisOutlined/>}\r\n </Button>\r\n </Popover>\r\n );\r\n }\r\n\r\n /** Export button with the export menu; `onUsed` is called after a menu item is clicked. */\r\n private renderExportButton(onUsed?: () => void): ReactElement {\r\n const exportMenu = getContextMenu(this.getExportProps({\r\n renderer: this.props.exportMenu?.renderer,\r\n onClick: this.props.exportMenu?.onClick,\r\n onExported: this.props.exportMenu?.onExported,\r\n }));\r\n\r\n return (\r\n <Dropdown trigger={[\"click\"]}\r\n menu={withOnUsed(exportMenu, onUsed)}\r\n disabled={this.state.loading}>\r\n <Button title={i18n(\"Export\")}>\r\n <DownloadOutlined/>\r\n </Button>\r\n </Dropdown>\r\n );\r\n }\r\n\r\n /** Table settings button with the settings menu; `onUsed` is called after a menu item is clicked. */\r\n private renderSettingsButton(onUsed?: () => void): ReactElement {\r\n const settingsMenu = this.getSettingsMenu();\r\n\r\n return (\r\n <Dropdown trigger={[\"click\"]}\r\n menu={withOnUsed(settingsMenu, onUsed)}>\r\n <Button\r\n title={i18n(\"Extended table features\")}\r\n disabled={this.state.loading}>\r\n <TableOutlined/>\r\n </Button>\r\n </Dropdown>\r\n );\r\n }\r\n\r\n /** The primary search button - a refresh button when the search field is hidden. */\r\n private renderSearchButton(): ReactElement {\r\n const search = this.props.search;\r\n\r\n return (\r\n <Button title={search?.hidden ? i18n(\"Refresh\") : i18n(\"Search\")}\r\n className={\"search-btn \" + (search?.searchButtonClassName ?? \"\")}\r\n disabled={search?.searchButtonDisabled}\r\n type=\"primary\"\r\n danger={search?.searchButtonDanger}\r\n onClick={() => {\r\n this.setState({compactMenuOpen: false});\r\n search?.onSearch?.();\r\n }}>\r\n {this.state.loading ? <LoadingOutlined/> : (search?.searchButtonIcon ?? (search?.hidden ? <ReloadOutlined/> :\r\n <SearchOutlined/>))}\r\n </Button>\r\n );\r\n }\r\n\r\n /** Builds the toolbar settings menu (keys `columnFilter`, `autosizeAllColumns`, `columnsConfig`, `advancedConfig`), passed through `settingsMenu.renderer`. */\r\n getSettingsMenu(): MenuProps {\r\n let menuItems: MenuElement[] = [\r\n {\r\n key: \"columnFilter\",\r\n icon: <FileSearchOutlined/>,\r\n className: this.props.filter && this.props.filter.columnSearchVisible ? \"ant-dropdown-menu-item-selected\" : \"\",\r\n title: i18n(\"Turn on/off column filter\"),\r\n label: i18n(\"Column Filter\"),\r\n },\r\n {\r\n key: \"autosizeAllColumns\",\r\n icon: <ColumnWidthOutlined/>,\r\n label: i18n(\"Autosize All Columns\"),\r\n },\r\n {\r\n key: \"columnsConfig\",\r\n icon: <ControlOutlined/>,\r\n label: i18n(\"Columns Configuration\"),\r\n },\r\n {\r\n key: \"columnsAndAdvancedConfigDivider\",\r\n type: \"divider\"\r\n },\r\n {\r\n key: \"advancedConfig\",\r\n icon: <SettingOutlined/>,\r\n label: i18n(\"Advanced Settings\"),\r\n }\r\n ];\r\n\r\n if (this.props.settingsMenu?.renderer) {\r\n menuItems = this.props.settingsMenu.renderer(menuItems);\r\n }\r\n\r\n return {\r\n items: menuItems,\r\n onClick: (menuInfo) => {\r\n switch (menuInfo.key) {\r\n case \"columnFilter\":\r\n const visible = !(this.props.filter && this.props.filter.columnSearchVisible);\r\n this.setColumnSearchVisible(visible);\r\n break;\r\n case \"autosizeAllColumns\":\r\n this.gridApi?.autoSizeAllColumns();\r\n break;\r\n case \"columnsConfig\":\r\n this.showColumnsConfig(true);\r\n break;\r\n case \"advancedConfig\":\r\n this.showTableConfiguration(true);\r\n break;\r\n default:\r\n if (this.props.settingsMenu?.onClick) {\r\n this.props.settingsMenu.onClick(menuInfo.key + \"\");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n private getAdaptedColumnDefs(columnDefs: (DataGridColDef | DataGridColGroupDef)[], floatingFilterEnabled: boolean | undefined, disableColumnDefsPreprocessing: boolean) {\r\n if (columnDefs.length === 0) {\r\n return undefined;\r\n }\r\n if (disableColumnDefsPreprocessing) {\r\n return columnDefs;\r\n }\r\n const adaptColumnDefs = (columnDefs: (DataGridColDef | DataGridColGroupDef)[]): (ColDef | ColGroupDef)[] => columnDefs.map((columnDef) => {\r\n if (\"children\" in columnDef) {\r\n return {...columnDef, children: adaptColumnDefs(columnDef.children)};\r\n }\r\n const {group, floatingFilter, hide, cellEditorPopup, editable, headerComponent, headerComponentParams, ...rest} = columnDef;\r\n let floatingFilterEnabledForColumn = !!floatingFilter;\r\n if (typeof columnDef.type === \"string\") {\r\n if (!!(this.columnTypes[columnDef.type]?.floatingFilter)) {\r\n floatingFilterEnabledForColumn = true;\r\n }\r\n } else {\r\n columnDef.type?.forEach((type) => {\r\n if (!!(this.columnTypes[type]?.floatingFilter)) {\r\n floatingFilterEnabledForColumn = true;\r\n }\r\n });\r\n\r\n }\r\n return {\r\n ...rest,\r\n floatingFilter: floatingFilterEnabledForColumn && floatingFilterEnabled,\r\n resizable: true,\r\n headerComponent: headerComponent ?? \"simpleHeader\",\r\n headerComponentParams: headerComponentParams ?? {\r\n onColumnsConfigVisible: this.showColumnsConfig\r\n },\r\n hide: this.state.columnModel.find((c) => c.colId === columnDef.colId)?.hide ?? (hide === undefined ? rest.initialHide : hide),\r\n cellStyle: this._getCellStyle,\r\n cellRendererParams: columnDef.cellStyle ? Object.assign(columnDef.cellRendererParams !== undefined ? columnDef.cellRendererParams : {}, {originalCellStyle: columnDef.cellStyle}) : columnDef.cellRendererParams,\r\n editable: editable,\r\n cellEditorPopup: !editable ? undefined : cellEditorPopup !== false,\r\n cellClassRules: {\r\n 'cell-has-handle': (p: any) => this.state.focusedCell?.rowIndex === p.rowIndex && this.state.focusedCell?.colId === p.colDef.colId && !this.state.isDragging,\r\n 'cell-drag-selected': (params: any) => (this.state.startCoord !== null && this.state.endCoord !== null) ? this.isInRange(params.rowIndex, params.colDef.colId) : false,\r\n },\r\n };\r\n });\r\n const adaptedColumnDefs = adaptColumnDefs(columnDefs);\r\n setTimeout(() => {\r\n this.props.onColumnDefsAdapted?.(adaptedColumnDefs);\r\n }, 0);\r\n return adaptedColumnDefs;\r\n }\r\n\r\n private isInRange(rowIndex: number, colId: string): boolean {\r\n const {startCoord, endCoord} = this.state;\r\n if (startCoord === null || endCoord === null) return false;\r\n\r\n const allCols = this.gridApi!.getAllDisplayedColumns().map(c => c.getColId());\r\n const startColIdx = allCols.indexOf(startCoord.colId);\r\n const endColIdx = allCols.indexOf(endCoord.colId);\r\n const currentColIdx = allCols.indexOf(colId);\r\n\r\n const minRow = Math.min(startCoord.rowIndex, endCoord.rowIndex);\r\n const maxRow = Math.max(startCoord.rowIndex, endCoord.rowIndex);\r\n const minCol = Math.min(startColIdx, endColIdx);\r\n const maxCol = Math.max(startColIdx, endColIdx);\r\n\r\n return rowIndex >= minRow && rowIndex <= maxRow && currentColIdx >= minCol && currentColIdx <= maxCol;\r\n };\r\n\r\n render() {\r\n const {\r\n onGridReady,\r\n columnDefs, disableColumnDefsPreprocessing, onColumnsChanged,\r\n paging, onPaginationChanged, onViewportChanged,\r\n selectedIds,\r\n search, toolbar,\r\n filter, onFilterChanged, onFilterModified, onCellFocused,\r\n onSortChanged, components,\r\n tableConfigVisible, onTableConfigVisible,\r\n noRecordsOverlayRenderer, loadingOverlayRenderer, onRowDataUpdated,\r\n onLoadData, rowStyleRules, defaultRowStyleRules, onChangeRowStyleRules,\r\n showMilliseconds, defaultShowMilliseconds, onShowMilliseconds, hideYear, defaultHideYear, onShowYear,\r\n showUtcOffset, defaultShowUtcOffset, onShowUtcOffset,\r\n suppressLoadingOverlay, defaultColDef, headerHeight,\r\n rowData,\r\n rowDataManualMode,\r\n gridRef,\r\n quickFilterParser, quickFilterMatcher,\r\n rowSelection,\r\n contextMenu,\r\n settingsMenu,\r\n exportMenu,\r\n panelStyle,\r\n tablePanelStyle,\r\n onColumnDefsAdapted,\r\n tableOverlayRenderer,\r\n onKeyPressed,\r\n theme,\r\n ...passedProperties\r\n } = this.props;\r\n let key: string;\r\n let paginationPageSize: number | undefined = undefined;\r\n if (paging.pageSize > 0) {\r\n paginationPageSize = paging.pageSize;\r\n passedProperties.pagination = true;\r\n key = \"paginated-table\";\r\n } else if (paging.pageSize === 0) {\r\n passedProperties.paginationAutoPageSize = true;\r\n passedProperties.pagination = true;\r\n key = \"paginated-table\";\r\n } else {\r\n // pagination is disabled\r\n passedProperties.pagination = false;\r\n key = \"non-paginated-table\";\r\n }\r\n\r\n // nejde\r\n const floatingFilterEnabled = !!filter && !!filter.columnSearchVisible;\r\n const adaptedColumnDefs = this.getAdaptedColumnDefs(columnDefs, floatingFilterEnabled, !!disableColumnDefsPreprocessing);\r\n // the configuration dialogs list columns only, groups are just headers in the grid\r\n const leafColumnDefs = ColumnUtils.getLeafColumnDefs(columnDefs);\r\n\r\n const customComponents = this.getCustomComponents(components);\r\n const debugMode = process.env.NODE_ENV === 'development';\r\n const bodyStyle = {\r\n display: \"flex\",\r\n flexFlow: \"column\",\r\n height: \"100%\",\r\n width: \"100%\",\r\n paddingBottom: 8,\r\n };\r\n if (panelStyle) {\r\n Object.assign(bodyStyle, panelStyle);\r\n }\r\n const tPanelStyle = {flex: \"1 1 auto\", marginTop: 16, overflow: \"auto\"};\r\n if (tablePanelStyle) {\r\n Object.assign(tPanelStyle, tablePanelStyle);\r\n }\r\n const headerFilterRowHeight = calculateRowHeight(this.state.fontSize, GRID_DEFAULT_ROW_HEIGHT_DELTA + 2);\r\n\r\n return (\r\n <React.Fragment>\r\n <Card size=\"small\"\r\n variant={\"borderless\"}\r\n style={{height: \"100%\"}}\r\n styles={{body: bodyStyle}}>\r\n {/* aligned to the top: the pager and the record range (as high as a button) stay on the line of the\r\n toolbar buttons also when filters are under them (`toolbar.renderToolbar`); a compact (mobile) pager\r\n that does not fit moves to a line of its own */}\r\n <div style={{display: \"flex\", alignItems: \"flex-start\", ...(this.props.toolbar?.compact && paging.pageSize >= 0 ? {flexWrap: \"wrap\", gap: 8} : {})}}>\r\n {this.renderNavigationPanel()}\r\n </div>\r\n <div style={tPanelStyle}>\r\n <WithCss useStyles={useStyles}>\r\n {(styles) =>\r\n <Dropdown trigger={[\"contextMenu\"]}\r\n getPopupContainer={(triggerNode) => {\r\n // very nasty trick how remove error of ResizeObservers infinite cycling - because popover (with dynamic size) is placed in in resizable panel\r\n const parentNode = (triggerNode?.parentNode ?? document.body) as HTMLElement;\r\n return parentNode;\r\n }}\r\n menu={getContextMenu(this.getExportProps({\r\n onlySelectedNodes: true,\r\n renderer: this.props.contextMenu?.renderer,\r\n onClick: this.props.contextMenu?.onClick,\r\n hideNotificationOnClipboardCopy: true,\r\n }))}\r\n open={this.state.contextMenuVisible}\r\n onOpenChange={(visible) => {\r\n if (!visible) {\r\n this.setState({contextMenuVisible: false});\r\n }\r\n }}\r\n >\r\n <div className={\"ag-theme-balham \" + styles.styles.baseLayout} style={{width: \"100%\", height: \"100%\"}}>\r\n <ConfigProvider.ConfigContext.Consumer>\r\n {(context) => {\r\n const defaultTheme = theme ?? this.getTheme(context.theme?.algorithm, styles.theme);\r\n return (\r\n <AgGridReact\r\n key={key}\r\n debug={debugMode}\r\n ref={gridRef}\r\n theme={defaultTheme}\r\n paginationPageSize={paginationPageSize}\r\n maxConcurrentDatasourceRequests={this.props.rowModelType === \"infinite\" ? 1 : undefined}\r\n onGridReady={this.onGridReady}\r\n onPaginationChanged={this.onPaginationChanged}\r\n onFilterModified={this.onFilterModified}\r\n onFilterChanged={this.onFilterChanged}\r\n onSortChanged={this.onSortChanged}\r\n defaultColDef={this.getDefaultColDefinition(defaultColDef)}\r\n columnDefs={adaptedColumnDefs as ColDef[]}\r\n rowData={!rowDataManualMode ? rowData : undefined}\r\n {...passedProperties}\r\n onCellFocused={this.onCellFocused}\r\n cellSelection={rowSelection === \"multiple\" || (rowSelection as RowSelectionOptions)?.mode === \"multiRow\"}\r\n rowSelection={rowSelection}\r\n suppressRowClickSelection={rowSelection === \"multiple\" || (rowSelection as RowSelectionOptions)?.mode === \"multiRow\"}\r\n suppressRowDeselection={rowSelection === \"multiple\" || (rowSelection as RowSelectionOptions)?.mode === \"multiRow\"}\r\n suppressPaginationPanel={true}\r\n getRowId={getRowId}\r\n maintainColumnOrder\r\n components={customComponents}\r\n columnTypes={this.columnTypes}\r\n onColumnVisible={this.onColumnsChanged}\r\n onColumnPinned={this.onColumnsChanged}\r\n onColumnResized={this.onColumnsChanged}\r\n onColumnMoved={this.onColumnsChanged}\r\n onNewColumnsLoaded={this.onNewColumnsLoaded}\r\n onCellMouseOver={this.onCellMouseOver}\r\n onCellMouseDown={this.onCellMouseDown}\r\n navigateToNextCell={this.navigateToNextCell}\r\n onViewportChanged={this.onViewportChanged}\r\n onCellContextMenu={this.onCellContextMenu}\r\n loadingOverlayComponent='loadingOverlay'\r\n noRowsOverlayComponent='noRecordsOverlay'\r\n onRowDataUpdated={this.onRowDataUpdated}\r\n context={this.table_context}\r\n rowHeight={this.state.rowHeight}\r\n getRowStyle={this._getRowStyle}\r\n getRowHeight={this._getRowHeight}\r\n headerHeight={headerHeight !== undefined ? headerHeight : headerFilterRowHeight}\r\n floatingFiltersHeight={headerFilterRowHeight}\r\n suppressLoadingOverlay={this.props.loadingOverlayRenderer ? true : this.props.suppressLoadingOverlay}\r\n quickFilterParser={this.wildcardQuickFilter.quickFilterParser}\r\n quickFilterMatcher={this.wildcardQuickFilter.quickFilterMatcher}\r\n >\r\n </AgGridReact>\r\n )\r\n }}\r\n </ConfigProvider.ConfigContext.Consumer>\r\n {this.state.loading && this.props.loadingOverlayRenderer &&\r\n <div className=\"ag-overlay\" aria-hidden=\"true\">\r\n <div className=\"ag-overlay-panel\">\r\n <div\r\n className=\"ag-overlay-wrapper ag-layout-normal ag-overlay-loading-wrapper\">\r\n <div className=\"ag-react-container\">\r\n {this.props.loadingOverlayRenderer?.()}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </Dropdown>\r\n }\r\n </WithCss>\r\n {tableOverlayRenderer?.()}\r\n </div>\r\n </Card>\r\n\r\n {!!this.gridApi && !!this.gridApi && this.state.pageSize !== null &&\r\n <DataGridEditor dataGrid={this}\r\n gridApi={this.gridApi}\r\n columnDefinitions={leafColumnDefs}\r\n columnModel={this.state.columnModel}\r\n visible={!!this.props.tableConfigVisible}\r\n onTableConfigVisible={this.showTableConfiguration}\r\n paginationPageSize={paging.pageSize}\r\n paginationDefaultPageSize={paging.defaultPageSize}\r\n currentPageSize={this.state.pageSize}\r\n showMilliseconds={!!this.props.showMilliseconds}\r\n defaultShowMilliseconds={!!this.props.defaultShowMilliseconds}\r\n showYear={!this.props.hideYear}\r\n defaultShowYear={!this.props.defaultHideYear}\r\n showUtcOffset={LocaleHolder.resolveUtcOffsetMode(this.props.showUtcOffset)}\r\n defaultShowUtcOffset={LocaleHolder.resolveUtcOffsetMode(this.props.defaultShowUtcOffset)}\r\n rowStyleRules={this.props.rowStyleRules}\r\n defaultRowStyleRules={this.props.defaultRowStyleRules}\r\n onChangeRowStyleRules={onChangeRowStyleRules}\r\n />}\r\n\r\n\r\n {!!this.gridApi && <ModalDialog\r\n mode={ModalDialogMode.OK_CANCEL}\r\n open={this.state.columnsConfigVisible}\r\n initialWidth={700}\r\n initialHeight={this.state.columnTransferHeight}\r\n title={<span><ControlOutlined style={{\r\n color: \"#faad14\",\r\n fontSize: 22,\r\n marginRight: 16\r\n }}/>{i18n(\"Columns Configuration\")}</span>}\r\n cancelText={i18n(\"Cancel\")}\r\n onCancel={() => {\r\n if (this.gridApi && this.columnModelBeforeEdit) {\r\n this.gridApi.applyColumnState({state: this.columnModelBeforeEdit, applyOrder: true});\r\n delete this.columnModelBeforeEdit;\r\n this.showColumnsConfig(false);\r\n }\r\n }}\r\n onOk={() => {\r\n delete this.columnModelBeforeEdit;\r\n this.showColumnsConfig(false);\r\n }}\r\n onResize={({height}) => {\r\n this.setState({columnTransferHeight: height});\r\n }}\r\n >\r\n <ColumnTransfer\r\n columnDefinitions={leafColumnDefs as ColDef[]}\r\n columnModel={this.state.columnModel}\r\n gridApi={this.gridApi}\r\n height={this.state.columnTransferHeight - 154}\r\n />\r\n </ModalDialog>}\r\n\r\n </React.Fragment>\r\n );\r\n }\r\n}\r\n\r\n/** Renders `children()` - defers building content until React renders it, e.g. until a popover opens. */\r\nfunction RenderLater({children}: { children: () => React.ReactNode }) {\r\n return <>{children()}</>;\r\n}\r\n\r\n/** The menu with `onUsed` called after its own `onClick`, i.e. after any of its items is clicked. */\r\nfunction withOnUsed(menu: MenuProps, onUsed?: () => void): MenuProps {\r\n return onUsed ? {\r\n ...menu,\r\n onClick: info => {\r\n menu.onClick?.(info);\r\n onUsed();\r\n }\r\n } : menu;\r\n}\r\n\r\nfunction getAgGridThemeFromAntd(algorithm: MappingAlgorithm | MappingAlgorithm[] | undefined, token: AliasToken) {\r\n const isDark = algorithm === theme.darkAlgorithm;\r\n let agTheme = isDark ? themeBalham.withPart(colorSchemeDark) : themeBalham;\r\n\r\n return agTheme.withParams({\r\n accentColor: token.colorPrimary,\r\n backgroundColor: token.colorBgContainer,\r\n oddRowBackgroundColor: token.gridOddRowBg ?? token.colorBgContainer,\r\n foregroundColor: token.colorText,\r\n selectedRowBackgroundColor: token.controlItemBgActive,\r\n rowHoverColor: token.controlItemBgHover,\r\n borderColor: token.colorBorder,\r\n headerBackgroundColor: token.colorFillAlter,\r\n });\r\n}\r\n\r\nfunction agThemeEquals(newArgs: [MappingAlgorithm | MappingAlgorithm[] | undefined, AliasToken], lastArgs: [MappingAlgorithm | MappingAlgorithm[] | undefined, AliasToken]) {\r\n const [newAlgo, newToken] = newArgs;\r\n const [lastAlgo, lastToken] = lastArgs;\r\n\r\n // Check algorithm reference (usually stable constants in Antd)\r\n if (newAlgo !== lastAlgo) return false;\r\n\r\n // Only compare the tokens you actually use in your function\r\n return (\r\n newToken.colorPrimary === lastToken.colorPrimary &&\r\n newToken.colorBgContainer === lastToken.colorBgContainer &&\r\n newToken.gridOddRowBg === lastToken.gridOddRowBg &&\r\n newToken.colorText === lastToken.colorText &&\r\n newToken.controlItemBgActive === lastToken.controlItemBgActive &&\r\n newToken.controlItemBgHover === lastToken.controlItemBgHover &&\r\n newToken.colorBorder === lastToken.colorBorder &&\r\n newToken.colorFillAlter === lastToken.colorFillAlter\r\n );\r\n}"]}
|