@ni/nimble-components 30.1.1 → 30.1.2
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/all-components-bundle.js +14 -10
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +7 -5
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/table/index.js +5 -8
- package/dist/esm/table/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -16333,7 +16333,7 @@
|
|
|
16333
16333
|
|
|
16334
16334
|
/**
|
|
16335
16335
|
* Do not edit directly
|
|
16336
|
-
* Generated on
|
|
16336
|
+
* Generated on Wed, 24 Jul 2024 15:55:56 GMT
|
|
16337
16337
|
*/
|
|
16338
16338
|
|
|
16339
16339
|
const Information100DarkUi = "#a46eff";
|
|
@@ -64691,6 +64691,10 @@ img.ProseMirror-separator {
|
|
|
64691
64691
|
function getGroupedRowModel() {
|
|
64692
64692
|
return table => memo$1(() => [table.getState().grouping, table.getPreGroupedRowModel()], (grouping, rowModel) => {
|
|
64693
64693
|
if (!rowModel.rows.length || !grouping.length) {
|
|
64694
|
+
rowModel.rows.forEach(row => {
|
|
64695
|
+
row.depth = 0;
|
|
64696
|
+
row.parentId = undefined;
|
|
64697
|
+
});
|
|
64694
64698
|
return rowModel;
|
|
64695
64699
|
}
|
|
64696
64700
|
|
|
@@ -64726,7 +64730,7 @@ img.ProseMirror-separator {
|
|
|
64726
64730
|
// Group the rows together for this level
|
|
64727
64731
|
const rowGroupsMap = groupBy(rows, columnId);
|
|
64728
64732
|
|
|
64729
|
-
//
|
|
64733
|
+
// Perform aggregations for each group
|
|
64730
64734
|
const aggregatedGroupedRows = Array.from(rowGroupsMap.entries()).map((_ref, index) => {
|
|
64731
64735
|
let [groupingValue, groupedRows] = _ref;
|
|
64732
64736
|
let id = `${columnId}:${groupingValue}`;
|
|
@@ -64734,6 +64738,9 @@ img.ProseMirror-separator {
|
|
|
64734
64738
|
|
|
64735
64739
|
// First, Recurse to group sub rows before aggregation
|
|
64736
64740
|
const subRows = groupUpRecursively(groupedRows, depth + 1, id);
|
|
64741
|
+
subRows.forEach(subRow => {
|
|
64742
|
+
subRow.parentId = id;
|
|
64743
|
+
});
|
|
64737
64744
|
|
|
64738
64745
|
// Flatten the leaf rows of the rows in this group
|
|
64739
64746
|
const leafRows = depth ? flattenBy(groupedRows, row => row.subRows) : groupedRows;
|
|
@@ -70428,7 +70435,7 @@ focus outline in that case.
|
|
|
70428
70435
|
}
|
|
70429
70436
|
if (this.dataHierarchyManager
|
|
70430
70437
|
&& this.tableUpdateTracker.requiresTanStackDataReset) {
|
|
70431
|
-
if (!this.
|
|
70438
|
+
if (!this.isHierarchyEnabled()
|
|
70432
70439
|
&& !this.tableUpdateTracker.updateRowParentIds) {
|
|
70433
70440
|
// Perform a shallow copy of the data to trigger tanstack to regenerate the row models and columns.
|
|
70434
70441
|
updatedOptions.data = [...this.table.options.data];
|
|
@@ -70533,13 +70540,10 @@ focus outline in that case.
|
|
|
70533
70540
|
const slotsByRecordId = this.getRequestedSlotsByRecordId();
|
|
70534
70541
|
this.tableData = rows.map(row => {
|
|
70535
70542
|
const isGroupRow = row.getIsGrouped();
|
|
70536
|
-
const hasParentRow = isGroupRow ? false : row.getParentRow();
|
|
70537
70543
|
const isParent = !isGroupRow && this.getRowCanExpand(row);
|
|
70538
|
-
const
|
|
70539
|
-
&& !
|
|
70540
|
-
&&
|
|
70541
|
-
&& row.depth > 0
|
|
70542
|
-
&& !this.parentIdFieldName;
|
|
70544
|
+
const isDataChildOfGroupRowWithNoHierarchy = !isGroupRow // is a data row (not a group row)
|
|
70545
|
+
&& !this.isHierarchyEnabled() // table does not have hierarchy enabled
|
|
70546
|
+
&& row.getParentRow()?.getIsGrouped(); // row has a parent that is a group row
|
|
70543
70547
|
const rowState = {
|
|
70544
70548
|
record: row.original.clientRecord,
|
|
70545
70549
|
id: row.id,
|
|
@@ -70549,7 +70553,7 @@ focus outline in that case.
|
|
|
70549
70553
|
groupRowValue: isGroupRow
|
|
70550
70554
|
? row.getValue(row.groupingColumnId)
|
|
70551
70555
|
: undefined,
|
|
70552
|
-
nestingLevel:
|
|
70556
|
+
nestingLevel: isDataChildOfGroupRowWithNoHierarchy
|
|
70553
70557
|
? row.depth - 1
|
|
70554
70558
|
: row.depth,
|
|
70555
70559
|
isParentRow: isParent,
|