Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AliN11W committed Jun 20, 2024
1 parent 56ab062 commit 103f598
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 76 deletions.
110 changes: 55 additions & 55 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,16 @@
"webpack": "^5.89.0"
},
"dependencies": {
"@ag-grid-community/client-side-row-model": "25.0.1",
"@ag-grid-community/core": "25.0.1",
"@ag-grid-community/csv-export": "25.0.1",
"@ag-grid-community/react": "25.0.1",
"@ag-grid-enterprise/core": "25.0.1",
"@ag-grid-enterprise/excel-export": "25.0.1",
"@ag-grid-enterprise/row-grouping": "25.0.1",
"@ag-grid-enterprise/server-side-row-model": "25.0.1",
"@ag-grid-enterprise/set-filter": "25.0.1",
"@ag-grid-enterprise/status-bar": "25.0.1",
"@ag-grid-community/client-side-row-model": "26.2.0",
"@ag-grid-community/core": "26.2.0",
"@ag-grid-community/csv-export": "26.2.0",
"@ag-grid-community/react": "26.2.0",
"@ag-grid-enterprise/core": "26.2.0",
"@ag-grid-enterprise/excel-export": "26.2.0",
"@ag-grid-enterprise/row-grouping": "26.2.0",
"@ag-grid-enterprise/server-side-row-model": "26.2.0",
"@ag-grid-enterprise/set-filter": "26.2.0",
"@ag-grid-enterprise/status-bar": "26.2.0",
"@phosphor-icons/react": "^2.1.5",
"@timechimp/timechimp-typescript-helpers": "^3.0.4",
"@types/bytes": "^3.1.1",
Expand Down
9 changes: 4 additions & 5 deletions src/components/data-grid/DataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
ValueFormatterParams,
IServerSideDatasource,
IServerSideGetRowsParams,
ServerSideStoreType,
GridReadyEvent,
DateFilterModel,
SelectionChangedEvent,
Expand Down Expand Up @@ -275,7 +274,7 @@ export const DataGrid = ({
}

if (filter.filterType === 'ids') {
const idsFilter = filter as IdsFilterModel;
const idsFilter = filter as unknown as IdsFilterModel;
if (idsFilter.ids) {
filterIds[filterName] = idsFilter.ids;
}
Expand Down Expand Up @@ -944,13 +943,13 @@ export const DataGrid = ({
</StyledDataGridHeader>
)}
<style>{getGridThemeOverrides(theme.current)}</style>
<StyledAgGridReact
<AgGridReact
ref={datagridRef}
rowData={rowData}
rowSelection="multiple"
rowModelType={rowModelType}
immutableData={rowModelType === RowModelType.clientSide}
serverSideStoreType={ServerSideStoreType.Partial}
serverSideStoreType="partial"
defaultColDef={defaultColDef}
rowDragManaged={isRowDragManaged}
treeData={treeData}
Expand Down Expand Up @@ -1134,7 +1133,7 @@ export const DataGrid = ({
pinned={'right'}
lockPosition
/>
</StyledAgGridReact>
</AgGridReact>
</StyledDataGrid>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/data-grid/__tests__/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ const getTimeEntries = () => {
currency: '€15.00',
},
];
for (let i = 0; i < 999; i++) {
for (let i = 0; i < 29; i++) {
timeEntries.push({
id: `ACC-BBB-CCC-DDD-EEE-${i}`,
name: 'Analysis',
Expand Down
4 changes: 2 additions & 2 deletions src/components/data-grid/export/docDefinition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export const getDocDefinition = (

// Sort the selected rows by the order they appear in the grid
selectedRows.sort((a, b) => {
if (a.rowIndex === undefined || b.rowIndex === undefined) {
if (a.rowIndex === null || b.rowIndex === null) {
return 0;
}
return a.rowIndex - b.rowIndex;
Expand All @@ -203,7 +203,7 @@ export const getDocDefinition = (
api: gridApi,
columnApi,
column: column as unknown as Column,
node: gridApi.getRowNode(node.id!),
node: gridApi.getRowNode(node.id!)!,
data: node,
colDef: column.colDef,
value: cellValue,
Expand Down
6 changes: 3 additions & 3 deletions src/components/data-grid/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import {
import { DurationFormat, NumberFormat, SupportedLocale } from '@timechimp/timechimp-typescript-helpers';
import { DropdownItem } from '../dropdown';
import { SVGProps as IconProps } from '..';
import { SetFilterModel } from '@ag-grid-enterprise/set-filter';
import { AgGridColumnProps } from '@ag-grid-community/react';
import { DatepickerRangeTranslations } from '../datepicker';
import { AgGridReact } from '@ag-grid-community/react/lib/agGridReact';
import { QuickSelectDateOption } from '../../models';
import { SetFilterModel } from '@ag-grid-enterprise/set-filter';

export enum RowModelType {
clientSide = 'clientSide',
Expand Down Expand Up @@ -526,8 +526,8 @@ export interface ProcessCellForExportParams {
value: any;
node?: RowNode | null;
column: any;
api: GridApi | null | undefined;
columnApi: ColumnApi | null | undefined;
api: GridApi;
columnApi: ColumnApi;
context: any;
type: string;
}
Expand Down

0 comments on commit 103f598

Please sign in to comment.