@vuu-ui/vuu-utils 0.8.18-debug → 0.8.19-debug
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/cjs/index.js +33 -0
- package/cjs/index.js.map +2 -2
- package/esm/index.js +33 -0
- package/esm/index.js.map +2 -2
- package/package.json +5 -5
- package/types/column-utils.d.ts +1 -0
- package/types/row-utils.d.ts +1 -0
package/esm/index.js
CHANGED
|
@@ -766,6 +766,20 @@ var applyDefaultColumnConfig = ({ columns, table }, getDefaultColumnConfig) => {
|
|
|
766
766
|
return columns;
|
|
767
767
|
}
|
|
768
768
|
};
|
|
769
|
+
var getColumnByName = (schema, name) => {
|
|
770
|
+
if (name === void 0) {
|
|
771
|
+
return void 0;
|
|
772
|
+
} else {
|
|
773
|
+
const column = schema.columns.find((col) => col.name === name);
|
|
774
|
+
if (column) {
|
|
775
|
+
return column;
|
|
776
|
+
} else {
|
|
777
|
+
throw Error(
|
|
778
|
+
`getColumnByName no column '${name}' in schema for ${schema.table.table}`
|
|
779
|
+
);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
};
|
|
769
783
|
|
|
770
784
|
// src/cookie-utils.ts
|
|
771
785
|
var getCookieValue = (name) => {
|
|
@@ -1995,6 +2009,23 @@ var virtualRowPositioning = (rowHeight, additionalPixelsNeeded, pctScrollTop) =>
|
|
|
1995
2009
|
return result;
|
|
1996
2010
|
}
|
|
1997
2011
|
];
|
|
2012
|
+
var getIndexFromRowElement = (rowElement) => {
|
|
2013
|
+
const rowIndex = rowElement.ariaRowIndex;
|
|
2014
|
+
if (rowIndex != null) {
|
|
2015
|
+
const index = parseInt(rowIndex) - 1;
|
|
2016
|
+
if (!isNaN(index)) {
|
|
2017
|
+
return index;
|
|
2018
|
+
} else {
|
|
2019
|
+
throw Error(
|
|
2020
|
+
`getIndexFromRowElement row element aria rowindex invalid ${rowIndex}`
|
|
2021
|
+
);
|
|
2022
|
+
}
|
|
2023
|
+
} else {
|
|
2024
|
+
throw Error(
|
|
2025
|
+
"getIndexFromRowElement row element does not have aria rowindex"
|
|
2026
|
+
);
|
|
2027
|
+
}
|
|
2028
|
+
};
|
|
1998
2029
|
|
|
1999
2030
|
// src/selection-utils.ts
|
|
2000
2031
|
var NO_SELECTION = [];
|
|
@@ -2485,6 +2516,7 @@ export {
|
|
|
2485
2516
|
getCellRendererOptions,
|
|
2486
2517
|
getClosest,
|
|
2487
2518
|
getClosestIndexItem,
|
|
2519
|
+
getColumnByName,
|
|
2488
2520
|
getColumnHeaderContentRenderer,
|
|
2489
2521
|
getColumnHeaderLabelRenderer,
|
|
2490
2522
|
getColumnLabel,
|
|
@@ -2501,6 +2533,7 @@ export {
|
|
|
2501
2533
|
getFocusableElement,
|
|
2502
2534
|
getFullRange,
|
|
2503
2535
|
getGroupValueAndOffset,
|
|
2536
|
+
getIndexFromRowElement,
|
|
2504
2537
|
getLoggingConfigForWorker,
|
|
2505
2538
|
getMissingItems,
|
|
2506
2539
|
getMovingValueDirection,
|