@veeqo/ui 9.10.2 → 9.11.0
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/dist/components/Accordion/Accordion.cjs +4 -4
- package/dist/components/Accordion/Accordion.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.js +4 -4
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/DataGrid/DataGrid.cjs +22 -52
- package/dist/components/DataGrid/DataGrid.cjs.map +1 -1
- package/dist/components/DataGrid/DataGrid.d.ts +1 -1
- package/dist/components/DataGrid/DataGrid.js +22 -52
- package/dist/components/DataGrid/DataGrid.js.map +1 -1
- package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.cjs +9 -0
- package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.cjs.map +1 -1
- package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.js +9 -0
- package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.js.map +1 -1
- package/dist/components/DataGrid/components/Columns/Columns.cjs +9 -8
- package/dist/components/DataGrid/components/Columns/Columns.cjs.map +1 -1
- package/dist/components/DataGrid/components/Columns/Columns.js +9 -8
- package/dist/components/DataGrid/components/Columns/Columns.js.map +1 -1
- package/dist/components/DataGrid/components/GridContainer/GridContainer.cjs +7 -0
- package/dist/components/DataGrid/components/GridContainer/GridContainer.cjs.map +1 -1
- package/dist/components/DataGrid/components/GridContainer/GridContainer.js +7 -0
- package/dist/components/DataGrid/components/GridContainer/GridContainer.js.map +1 -1
- package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.cjs +10 -2
- package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.cjs.map +1 -1
- package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.js +10 -2
- package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.js.map +1 -1
- package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.module.scss.cjs +2 -2
- package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.module.scss.cjs.map +1 -1
- package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.module.scss.js +2 -2
- package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.module.scss.js.map +1 -1
- package/dist/components/DataGrid/hooks/index.d.ts +4 -0
- package/dist/components/DataGrid/hooks/useColumnState.cjs +67 -0
- package/dist/components/DataGrid/hooks/useColumnState.cjs.map +1 -0
- package/dist/components/DataGrid/hooks/useColumnState.d.ts +14 -0
- package/dist/components/DataGrid/hooks/useColumnState.js +65 -0
- package/dist/components/DataGrid/hooks/useColumnState.js.map +1 -0
- package/dist/components/DataGrid/hooks/useColumnWidthState.cjs +52 -0
- package/dist/components/DataGrid/hooks/useColumnWidthState.cjs.map +1 -0
- package/dist/components/DataGrid/hooks/useColumnWidthState.d.ts +25 -0
- package/dist/components/DataGrid/hooks/useColumnWidthState.js +50 -0
- package/dist/components/DataGrid/hooks/useColumnWidthState.js.map +1 -0
- package/dist/components/DataGrid/types/ColumnWidths.d.ts +1 -0
- package/dist/components/DataGrid/types/DataGridProps.d.ts +10 -0
- package/dist/components/DataGrid/utils/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/components/DataGrid/utils/isLastColumn.cjs +0 -11
- package/dist/components/DataGrid/utils/isLastColumn.cjs.map +0 -1
- package/dist/components/DataGrid/utils/isLastColumn.d.ts +0 -2
- package/dist/components/DataGrid/utils/isLastColumn.js +0 -9
- package/dist/components/DataGrid/utils/isLastColumn.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useColumnWidthState.cjs","sources":["../../../../src/components/DataGrid/hooks/useColumnWidthState.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport { ColumnDef, ColumnSizingState, OnChangeFn } from '@tanstack/react-table';\n\nimport { ColumnWidths } from '../types/ColumnWidths';\n\ntype UseColumnWidthStateProps = {\n /**\n * The TanStack Table column definitions.\n */\n mappedColumnDefinitions: ColumnDef<any, any>[];\n\n /**\n * The current widths of the columns.\n */\n columnWidths?: ColumnWidths;\n\n /**\n * Callback function to be called when the columns are resized.\n */\n onColumnsResized?: (columnWidths: ColumnWidths) => void;\n};\n\n/**\n * Normalizes the column widths to ensure they are within the min/max bounds defined in the column definitions. Internally within\n * the columnSizing state, TanStack will allow columns to be resized to values exceeding the min/max bounds - this corrects for\n * that behaviour.\n * @param columnDefinitions Mapped column definitions.\n * @param columnWidths An object containing the current widths of the columns.\n * @returns An object containing the current widths of the columns, with the min/max sizes taken into account.\n */\nconst normalizeColumnWidths = (\n columnDefinitions: ColumnDef<any, any>[],\n columnWidths: ColumnWidths,\n) => {\n const normalizedColumnWidths: Record<string, number> = {};\n\n Object.entries(columnWidths).forEach(([columnId, width]) => {\n const { minSize, maxSize } = columnDefinitions.find((col) => col.id === columnId)!;\n\n // Both minSize and maxSize properties should always be defined since they're set to defaults by the ColumnMapper - but, just in case.\n if (!minSize || !maxSize) {\n normalizedColumnWidths[columnId] = width;\n return;\n }\n\n const newWidth = Math.max(minSize, Math.min(maxSize, width));\n normalizedColumnWidths[columnId] = newWidth;\n });\n\n return normalizedColumnWidths;\n};\n\n/**\n * Hook used to handle column width state for the grid. By default, it sets up internal state, but if the user provides columnWidths\n * and onColumnsResized props to the grid, it will use those to manage the column widths externally.\n */\nexport const useColumnWidthState = ({\n mappedColumnDefinitions,\n columnWidths,\n onColumnsResized,\n}: UseColumnWidthStateProps) => {\n // Internal state to store the column widths if the user doesn't provide them.\n const [internalColumnWidthState, setInternalColumnWidthState] = useState<ColumnWidths>({});\n\n // If the user provides columnWidths and an onColumnsResized callback, we use them to control the column widths externally.\n const isControlledExternally = columnWidths && onColumnsResized;\n\n const columnSizing = isControlledExternally ? columnWidths : internalColumnWidthState;\n\n const onColumnSizingChange: OnChangeFn<ColumnSizingState> = useCallback(\n (onUpdate) => {\n const newColumnSizing = typeof onUpdate === 'function' ? onUpdate(columnSizing) : onUpdate;\n const normalizedColumnSizing = normalizeColumnWidths(\n mappedColumnDefinitions,\n newColumnSizing,\n );\n\n if (isControlledExternally || onColumnsResized) {\n onColumnsResized(normalizedColumnSizing);\n }\n\n setInternalColumnWidthState(normalizedColumnSizing);\n },\n [columnSizing, isControlledExternally, onColumnsResized, mappedColumnDefinitions],\n );\n\n return {\n columnSizing,\n onColumnSizingChange,\n };\n};\n"],"names":["useState","useCallback"],"mappings":";;;;AAsBA;;;;;;;AAOG;AACH,MAAM,qBAAqB,GAAG,CAC5B,iBAAwC,EACxC,YAA0B,KACxB;IACF,MAAM,sBAAsB,GAA2B,EAAE;AAEzD,IAAA,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAI;QACzD,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,KAAK,QAAQ,CAAE;;AAGlF,QAAA,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,EAAE;AACxB,YAAA,sBAAsB,CAAC,QAAQ,CAAC,GAAG,KAAK;YACxC;AACD;AAED,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAC5D,QAAA,sBAAsB,CAAC,QAAQ,CAAC,GAAG,QAAQ;AAC7C,KAAC,CAAC;AAEF,IAAA,OAAO,sBAAsB;AAC/B,CAAC;AAED;;;AAGG;AACI,MAAM,mBAAmB,GAAG,CAAC,EAClC,uBAAuB,EACvB,YAAY,EACZ,gBAAgB,GACS,KAAI;;IAE7B,MAAM,CAAC,wBAAwB,EAAE,2BAA2B,CAAC,GAAGA,cAAQ,CAAe,EAAE,CAAC;;AAG1F,IAAA,MAAM,sBAAsB,GAAG,YAAY,IAAI,gBAAgB;IAE/D,MAAM,YAAY,GAAG,sBAAsB,GAAG,YAAY,GAAG,wBAAwB;AAErF,IAAA,MAAM,oBAAoB,GAAkCC,iBAAW,CACrE,CAAC,QAAQ,KAAI;AACX,QAAA,MAAM,eAAe,GAAG,OAAO,QAAQ,KAAK,UAAU,GAAG,QAAQ,CAAC,YAAY,CAAC,GAAG,QAAQ;QAC1F,MAAM,sBAAsB,GAAG,qBAAqB,CAClD,uBAAuB,EACvB,eAAe,CAChB;QAED,IAAI,sBAAsB,IAAI,gBAAgB,EAAE;YAC9C,gBAAgB,CAAC,sBAAsB,CAAC;AACzC;QAED,2BAA2B,CAAC,sBAAsB,CAAC;KACpD,EACD,CAAC,YAAY,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,uBAAuB,CAAC,CAClF;IAED,OAAO;QACL,YAAY;QACZ,oBAAoB;KACrB;AACH;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ColumnDef, ColumnSizingState, OnChangeFn } from '@tanstack/react-table';
|
|
2
|
+
import { ColumnWidths } from '../types/ColumnWidths';
|
|
3
|
+
type UseColumnWidthStateProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The TanStack Table column definitions.
|
|
6
|
+
*/
|
|
7
|
+
mappedColumnDefinitions: ColumnDef<any, any>[];
|
|
8
|
+
/**
|
|
9
|
+
* The current widths of the columns.
|
|
10
|
+
*/
|
|
11
|
+
columnWidths?: ColumnWidths;
|
|
12
|
+
/**
|
|
13
|
+
* Callback function to be called when the columns are resized.
|
|
14
|
+
*/
|
|
15
|
+
onColumnsResized?: (columnWidths: ColumnWidths) => void;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Hook used to handle column width state for the grid. By default, it sets up internal state, but if the user provides columnWidths
|
|
19
|
+
* and onColumnsResized props to the grid, it will use those to manage the column widths externally.
|
|
20
|
+
*/
|
|
21
|
+
export declare const useColumnWidthState: ({ mappedColumnDefinitions, columnWidths, onColumnsResized, }: UseColumnWidthStateProps) => {
|
|
22
|
+
columnSizing: ColumnWidths;
|
|
23
|
+
onColumnSizingChange: OnChangeFn<ColumnSizingState>;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useState, useCallback } from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Normalizes the column widths to ensure they are within the min/max bounds defined in the column definitions. Internally within
|
|
5
|
+
* the columnSizing state, TanStack will allow columns to be resized to values exceeding the min/max bounds - this corrects for
|
|
6
|
+
* that behaviour.
|
|
7
|
+
* @param columnDefinitions Mapped column definitions.
|
|
8
|
+
* @param columnWidths An object containing the current widths of the columns.
|
|
9
|
+
* @returns An object containing the current widths of the columns, with the min/max sizes taken into account.
|
|
10
|
+
*/
|
|
11
|
+
const normalizeColumnWidths = (columnDefinitions, columnWidths) => {
|
|
12
|
+
const normalizedColumnWidths = {};
|
|
13
|
+
Object.entries(columnWidths).forEach(([columnId, width]) => {
|
|
14
|
+
const { minSize, maxSize } = columnDefinitions.find((col) => col.id === columnId);
|
|
15
|
+
// Both minSize and maxSize properties should always be defined since they're set to defaults by the ColumnMapper - but, just in case.
|
|
16
|
+
if (!minSize || !maxSize) {
|
|
17
|
+
normalizedColumnWidths[columnId] = width;
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const newWidth = Math.max(minSize, Math.min(maxSize, width));
|
|
21
|
+
normalizedColumnWidths[columnId] = newWidth;
|
|
22
|
+
});
|
|
23
|
+
return normalizedColumnWidths;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Hook used to handle column width state for the grid. By default, it sets up internal state, but if the user provides columnWidths
|
|
27
|
+
* and onColumnsResized props to the grid, it will use those to manage the column widths externally.
|
|
28
|
+
*/
|
|
29
|
+
const useColumnWidthState = ({ mappedColumnDefinitions, columnWidths, onColumnsResized, }) => {
|
|
30
|
+
// Internal state to store the column widths if the user doesn't provide them.
|
|
31
|
+
const [internalColumnWidthState, setInternalColumnWidthState] = useState({});
|
|
32
|
+
// If the user provides columnWidths and an onColumnsResized callback, we use them to control the column widths externally.
|
|
33
|
+
const isControlledExternally = columnWidths && onColumnsResized;
|
|
34
|
+
const columnSizing = isControlledExternally ? columnWidths : internalColumnWidthState;
|
|
35
|
+
const onColumnSizingChange = useCallback((onUpdate) => {
|
|
36
|
+
const newColumnSizing = typeof onUpdate === 'function' ? onUpdate(columnSizing) : onUpdate;
|
|
37
|
+
const normalizedColumnSizing = normalizeColumnWidths(mappedColumnDefinitions, newColumnSizing);
|
|
38
|
+
if (isControlledExternally || onColumnsResized) {
|
|
39
|
+
onColumnsResized(normalizedColumnSizing);
|
|
40
|
+
}
|
|
41
|
+
setInternalColumnWidthState(normalizedColumnSizing);
|
|
42
|
+
}, [columnSizing, isControlledExternally, onColumnsResized, mappedColumnDefinitions]);
|
|
43
|
+
return {
|
|
44
|
+
columnSizing,
|
|
45
|
+
onColumnSizingChange,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export { useColumnWidthState };
|
|
50
|
+
//# sourceMappingURL=useColumnWidthState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useColumnWidthState.js","sources":["../../../../src/components/DataGrid/hooks/useColumnWidthState.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\nimport { ColumnDef, ColumnSizingState, OnChangeFn } from '@tanstack/react-table';\n\nimport { ColumnWidths } from '../types/ColumnWidths';\n\ntype UseColumnWidthStateProps = {\n /**\n * The TanStack Table column definitions.\n */\n mappedColumnDefinitions: ColumnDef<any, any>[];\n\n /**\n * The current widths of the columns.\n */\n columnWidths?: ColumnWidths;\n\n /**\n * Callback function to be called when the columns are resized.\n */\n onColumnsResized?: (columnWidths: ColumnWidths) => void;\n};\n\n/**\n * Normalizes the column widths to ensure they are within the min/max bounds defined in the column definitions. Internally within\n * the columnSizing state, TanStack will allow columns to be resized to values exceeding the min/max bounds - this corrects for\n * that behaviour.\n * @param columnDefinitions Mapped column definitions.\n * @param columnWidths An object containing the current widths of the columns.\n * @returns An object containing the current widths of the columns, with the min/max sizes taken into account.\n */\nconst normalizeColumnWidths = (\n columnDefinitions: ColumnDef<any, any>[],\n columnWidths: ColumnWidths,\n) => {\n const normalizedColumnWidths: Record<string, number> = {};\n\n Object.entries(columnWidths).forEach(([columnId, width]) => {\n const { minSize, maxSize } = columnDefinitions.find((col) => col.id === columnId)!;\n\n // Both minSize and maxSize properties should always be defined since they're set to defaults by the ColumnMapper - but, just in case.\n if (!minSize || !maxSize) {\n normalizedColumnWidths[columnId] = width;\n return;\n }\n\n const newWidth = Math.max(minSize, Math.min(maxSize, width));\n normalizedColumnWidths[columnId] = newWidth;\n });\n\n return normalizedColumnWidths;\n};\n\n/**\n * Hook used to handle column width state for the grid. By default, it sets up internal state, but if the user provides columnWidths\n * and onColumnsResized props to the grid, it will use those to manage the column widths externally.\n */\nexport const useColumnWidthState = ({\n mappedColumnDefinitions,\n columnWidths,\n onColumnsResized,\n}: UseColumnWidthStateProps) => {\n // Internal state to store the column widths if the user doesn't provide them.\n const [internalColumnWidthState, setInternalColumnWidthState] = useState<ColumnWidths>({});\n\n // If the user provides columnWidths and an onColumnsResized callback, we use them to control the column widths externally.\n const isControlledExternally = columnWidths && onColumnsResized;\n\n const columnSizing = isControlledExternally ? columnWidths : internalColumnWidthState;\n\n const onColumnSizingChange: OnChangeFn<ColumnSizingState> = useCallback(\n (onUpdate) => {\n const newColumnSizing = typeof onUpdate === 'function' ? onUpdate(columnSizing) : onUpdate;\n const normalizedColumnSizing = normalizeColumnWidths(\n mappedColumnDefinitions,\n newColumnSizing,\n );\n\n if (isControlledExternally || onColumnsResized) {\n onColumnsResized(normalizedColumnSizing);\n }\n\n setInternalColumnWidthState(normalizedColumnSizing);\n },\n [columnSizing, isControlledExternally, onColumnsResized, mappedColumnDefinitions],\n );\n\n return {\n columnSizing,\n onColumnSizingChange,\n };\n};\n"],"names":[],"mappings":";;AAsBA;;;;;;;AAOG;AACH,MAAM,qBAAqB,GAAG,CAC5B,iBAAwC,EACxC,YAA0B,KACxB;IACF,MAAM,sBAAsB,GAA2B,EAAE;AAEzD,IAAA,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAI;QACzD,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,KAAK,QAAQ,CAAE;;AAGlF,QAAA,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,EAAE;AACxB,YAAA,sBAAsB,CAAC,QAAQ,CAAC,GAAG,KAAK;YACxC;AACD;AAED,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAC5D,QAAA,sBAAsB,CAAC,QAAQ,CAAC,GAAG,QAAQ;AAC7C,KAAC,CAAC;AAEF,IAAA,OAAO,sBAAsB;AAC/B,CAAC;AAED;;;AAGG;AACI,MAAM,mBAAmB,GAAG,CAAC,EAClC,uBAAuB,EACvB,YAAY,EACZ,gBAAgB,GACS,KAAI;;IAE7B,MAAM,CAAC,wBAAwB,EAAE,2BAA2B,CAAC,GAAG,QAAQ,CAAe,EAAE,CAAC;;AAG1F,IAAA,MAAM,sBAAsB,GAAG,YAAY,IAAI,gBAAgB;IAE/D,MAAM,YAAY,GAAG,sBAAsB,GAAG,YAAY,GAAG,wBAAwB;AAErF,IAAA,MAAM,oBAAoB,GAAkC,WAAW,CACrE,CAAC,QAAQ,KAAI;AACX,QAAA,MAAM,eAAe,GAAG,OAAO,QAAQ,KAAK,UAAU,GAAG,QAAQ,CAAC,YAAY,CAAC,GAAG,QAAQ;QAC1F,MAAM,sBAAsB,GAAG,qBAAqB,CAClD,uBAAuB,EACvB,eAAe,CAChB;QAED,IAAI,sBAAsB,IAAI,gBAAgB,EAAE;YAC9C,gBAAgB,CAAC,sBAAsB,CAAC;AACzC;QAED,2BAA2B,CAAC,sBAAsB,CAAC;KACpD,EACD,CAAC,YAAY,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,uBAAuB,CAAC,CAClF;IAED,OAAO;QACL,YAAY;QACZ,oBAAoB;KACrB;AACH;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ColumnWidths = Record<string, number>;
|
|
@@ -5,6 +5,7 @@ import { ColumnDefinition } from './ColumnDefinition';
|
|
|
5
5
|
import { SortState } from './SortState';
|
|
6
6
|
import { PinnedColumnState } from './PinnedColumnState';
|
|
7
7
|
import { RowGroupingConfiguration } from './RowGroupingConfiguration';
|
|
8
|
+
import { ColumnWidths } from './ColumnWidths';
|
|
8
9
|
export type CustomState = {
|
|
9
10
|
iconSlot: ReactElement;
|
|
10
11
|
heading: string;
|
|
@@ -110,4 +111,13 @@ export type DataGridProps = Pick<AriaAttributes, 'aria-label'> & {
|
|
|
110
111
|
* Row grouping configuration for rendering nested data in the grid.
|
|
111
112
|
*/
|
|
112
113
|
rowGrouping?: RowGroupingConfiguration;
|
|
114
|
+
/** Column widths */
|
|
115
|
+
/**
|
|
116
|
+
* Column widths, a map of column ID's to their widths in pixels. If this is undefined, or a column isn't included, the default width will be used.
|
|
117
|
+
*/
|
|
118
|
+
columnWidths?: ColumnWidths;
|
|
119
|
+
/**
|
|
120
|
+
* Callback which is raised when the column widths change.
|
|
121
|
+
*/
|
|
122
|
+
onColumnsResized?: (columnWidths: ColumnWidths) => void;
|
|
113
123
|
};
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const isLastColumn = (table, column) => {
|
|
4
|
-
if (table.getIsSomeColumnsPinned('right')) {
|
|
5
|
-
return column.getIsLastColumn('right');
|
|
6
|
-
}
|
|
7
|
-
return column.getIsLastColumn();
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
exports.isLastColumn = isLastColumn;
|
|
11
|
-
//# sourceMappingURL=isLastColumn.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isLastColumn.cjs","sources":["../../../../src/components/DataGrid/utils/isLastColumn.ts"],"sourcesContent":["import { Column, Table } from '@tanstack/react-table';\n\nexport const isLastColumn = (table: Table<any>, column: Column<any, any>) => {\n if (table.getIsSomeColumnsPinned('right')) {\n return column.getIsLastColumn('right');\n }\n\n return column.getIsLastColumn();\n};\n"],"names":[],"mappings":";;MAEa,YAAY,GAAG,CAAC,KAAiB,EAAE,MAAwB,KAAI;AAC1E,IAAA,IAAI,KAAK,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE;AACzC,QAAA,OAAO,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC;AACvC;AAED,IAAA,OAAO,MAAM,CAAC,eAAe,EAAE;AACjC;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isLastColumn.js","sources":["../../../../src/components/DataGrid/utils/isLastColumn.ts"],"sourcesContent":["import { Column, Table } from '@tanstack/react-table';\n\nexport const isLastColumn = (table: Table<any>, column: Column<any, any>) => {\n if (table.getIsSomeColumnsPinned('right')) {\n return column.getIsLastColumn('right');\n }\n\n return column.getIsLastColumn();\n};\n"],"names":[],"mappings":"MAEa,YAAY,GAAG,CAAC,KAAiB,EAAE,MAAwB,KAAI;AAC1E,IAAA,IAAI,KAAK,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE;AACzC,QAAA,OAAO,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC;AACvC;AAED,IAAA,OAAO,MAAM,CAAC,eAAe,EAAE;AACjC;;;;"}
|