@economic/taco 2.45.0-alpha.30 → 2.45.0-alpha.31
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/charts/components/ResponsiveContainer.d.ts +1 -1
- package/dist/components/Input/util.d.ts +5 -9
- package/dist/components/Table3/Table3.d.ts +1 -1
- package/dist/components/Table3/features/useEditingState.d.ts +6 -11
- package/dist/components/Table3/features/useTableEditing.d.ts +6 -10
- package/dist/components/Tour/Tour.d.ts +2 -2
- package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js +3 -3
- package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js.map +1 -1
- package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js.map +1 -1
- package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js.map +1 -1
- package/dist/esm/packages/taco/src/charts/components/Tooltip.js.map +1 -1
- package/dist/esm/packages/taco/src/charts/utils/color.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js +0 -1
- package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +3 -3
- package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +2 -2
- package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
- package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
- package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +4 -2
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js +1 -2
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js +1 -1
- package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js +2 -3
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tour/Tour.js +2 -2
- package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js +1 -3
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +6 -14
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +1 -3
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +12 -45
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js.map +1 -1
- package/dist/primitives/Sortable/components/Container.d.ts +1 -1
- package/dist/primitives/Table/Core/components/Header/components/SortIndicator.d.ts +2 -2
- package/dist/primitives/Table/Core/types.d.ts +1 -1
- package/dist/primitives/Table/types.d.ts +1 -1
- package/dist/primitives/Table/useTableManager/util/settings.d.ts +1 -1
- package/dist/taco.cjs.development.js +36 -82
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/package.json +3 -4
- package/tailwind.config.js +0 -1
@@ -6431,7 +6431,6 @@ const useDatepicker = ({
|
|
6431
6431
|
setInternalValue(event.target.value);
|
6432
6432
|
};
|
6433
6433
|
const handleChange = date => {
|
6434
|
-
// Update both the input value and calendar view date when selecting a date
|
6435
6434
|
setInputValueByRef(inputRef.current, format(date, formatting.date), 'focusout');
|
6436
6435
|
};
|
6437
6436
|
const handleKeyDown = event => {
|
@@ -6853,7 +6852,7 @@ const Content$4 = /*#__PURE__*/React.forwardRef(function DialogContent(props, re
|
|
6853
6852
|
}), /*#__PURE__*/React.createElement("div", {
|
6854
6853
|
className: containerClassName,
|
6855
6854
|
"data-taco": "dialog"
|
6856
|
-
},
|
6855
|
+
}, output, dialog.draggable && (/*#__PURE__*/React.createElement("div", Object.assign({}, dragHandleProps, {
|
6857
6856
|
role: "button",
|
6858
6857
|
draggable: true,
|
6859
6858
|
"aria-grabbed": dragging,
|
@@ -6867,7 +6866,7 @@ const Content$4 = /*#__PURE__*/React.forwardRef(function DialogContent(props, re
|
|
6867
6866
|
"aria-label": texts.dialog.close,
|
6868
6867
|
className: "absolute right-0 top-0 mr-2 mt-2 print:hidden",
|
6869
6868
|
icon: "close"
|
6870
|
-
}))) : null)
|
6869
|
+
}))) : null), dialog.elements.drawer, dialog.elements.extra))));
|
6871
6870
|
});
|
6872
6871
|
|
6873
6872
|
const DialogDrawer = /*#__PURE__*/React.forwardRef(function DialogDrawer(props, ref) {
|
@@ -7345,7 +7344,7 @@ const DrawerContent = /*#__PURE__*/React__default.forwardRef(function Content(pr
|
|
7345
7344
|
ref: contentRef,
|
7346
7345
|
"data-taco": "drawer",
|
7347
7346
|
className: containerClassName
|
7348
|
-
},
|
7347
|
+
}, output, /*#__PURE__*/React__default.createElement("div", Object.assign({
|
7349
7348
|
className: dragHandlerClassName
|
7350
7349
|
}, dragHandleProps, {
|
7351
7350
|
"data-testid": "resize-handler",
|
@@ -7358,7 +7357,7 @@ const DrawerContent = /*#__PURE__*/React__default.forwardRef(function Content(pr
|
|
7358
7357
|
"aria-label": texts.drawer.close,
|
7359
7358
|
className: "absolute right-0 top-0 mr-2 mt-4",
|
7360
7359
|
icon: "close"
|
7361
|
-
}))) : null)
|
7360
|
+
}))) : null);
|
7362
7361
|
const styleProp = {
|
7363
7362
|
...style,
|
7364
7363
|
...{
|
@@ -12449,16 +12448,13 @@ function getPaddingEndOffset(table, options) {
|
|
12449
12448
|
const bottomRows = (_table$getBottomRows = table.getBottomRows()) !== null && _table$getBottomRows !== void 0 ? _table$getBottomRows : [];
|
12450
12449
|
return ROW_HEIGHT_ESTIMATES.medium * ((_options$virtualiserP = options === null || options === void 0 ? void 0 : options.virtualiserPaddingEndOffset) !== null && _options$virtualiserP !== void 0 ? _options$virtualiserP : 1) * bottomRows.length;
|
12451
12450
|
}
|
12451
|
+
// A higher number ensure less scroll jumping for dynamic row heights, but too high can reduce performance. 8 worked well
|
12452
|
+
const OVERSCAN_ROW_COUNT = 8;
|
12452
12453
|
function useTableRenderer(renderers, table, tableRef, length, defaultRowActiveIndex, options) {
|
12453
12454
|
var _table$getState$group, _table$getCenterRows, _virtualItems$padding, _virtualItems$padding2, _virtualItems$padding3, _virtualItems$end, _virtualItems;
|
12454
12455
|
const tableMeta = table.options.meta;
|
12455
12456
|
const isTableRowGrouped = !!((_table$getState$group = table.getState().grouping) !== null && _table$getState$group !== void 0 && _table$getState$group.length);
|
12456
12457
|
const rows = (_table$getCenterRows = table.getCenterRows()) !== null && _table$getCenterRows !== void 0 ? _table$getCenterRows : [];
|
12457
|
-
// expanded rows
|
12458
|
-
const {
|
12459
|
-
createRowMeasurer,
|
12460
|
-
estimateSize
|
12461
|
-
} = useRowHeightVirtualisation(table);
|
12462
12458
|
// row groups
|
12463
12459
|
const rangeExtractor = useRowGroupVirtualisation(table);
|
12464
12460
|
// account for thead and tfoot in the scroll area - both are always medium row height
|
@@ -12466,15 +12462,20 @@ function useTableRenderer(renderers, table, tableRef, length, defaultRowActiveIn
|
|
12466
12462
|
const count = tableMeta.server.isEnabled && tableMeta.server._experimentalDataLoader2 ? length : rows.length;
|
12467
12463
|
const virtualiser = reactVirtual.useVirtualizer({
|
12468
12464
|
count,
|
12469
|
-
estimateSize
|
12465
|
+
estimateSize: () => {
|
12466
|
+
return tableMeta.rowHeight.height ? ROW_HEIGHT_ESTIMATES[tableMeta.rowHeight.height] : ROW_HEIGHT_ESTIMATES.medium;
|
12467
|
+
},
|
12470
12468
|
getScrollElement: () => tableRef.current,
|
12471
|
-
overscan: tableMeta.printing.isPrinting ? count :
|
12469
|
+
overscan: tableMeta.printing.isPrinting ? count : OVERSCAN_ROW_COUNT,
|
12472
12470
|
rangeExtractor,
|
12473
12471
|
// correctly sets the scroll padding offset, e.g. when keyboard navigating rows in the list
|
12474
12472
|
scrollPaddingStart,
|
12475
12473
|
scrollPaddingEnd: getScrollPaddingEndOffset(table),
|
12476
12474
|
paddingEnd: getPaddingEndOffset(table, options)
|
12477
12475
|
});
|
12476
|
+
React__default.useEffect(() => {
|
12477
|
+
virtualiser.measure();
|
12478
|
+
}, [table.getState().expanded]);
|
12478
12479
|
const totalSize = virtualiser.getTotalSize();
|
12479
12480
|
const virtualItems = virtualiser.getVirtualItems();
|
12480
12481
|
const scrollToIndex = React__default.useCallback((index, options = {
|
@@ -12553,7 +12554,9 @@ function useTableRenderer(renderers, table, tableRef, length, defaultRowActiveIn
|
|
12553
12554
|
table: table
|
12554
12555
|
});
|
12555
12556
|
}
|
12556
|
-
const measureRow =
|
12557
|
+
const measureRow = rowHeight => {
|
12558
|
+
virtualiser.resizeItem(virtualRow, rowHeight);
|
12559
|
+
};
|
12557
12560
|
return /*#__PURE__*/React__default.createElement(Row, {
|
12558
12561
|
key: row.id,
|
12559
12562
|
row: row,
|
@@ -12572,43 +12575,6 @@ function useTableRenderer(renderers, table, tableRef, length, defaultRowActiveIn
|
|
12572
12575
|
scrollToIndex
|
12573
12576
|
};
|
12574
12577
|
}
|
12575
|
-
// support varying row heights - variable row heights, row expansion
|
12576
|
-
function useRowHeightVirtualisation(table) {
|
12577
|
-
const tableMeta = table.options.meta;
|
12578
|
-
const rows = table.getRowModel().rows;
|
12579
|
-
const expandedState = table.getState().expanded;
|
12580
|
-
const [expandedRowHeightsCache, setExpandedRowHeightsCache] = React__default.useState({});
|
12581
|
-
// look at all registered expanded row heights and use them to form a more accurate average size
|
12582
|
-
// it might be worth considering if taking the max, or an upper bound, would be better
|
12583
|
-
const averageExpandedRowHeight = React__default.useMemo(() => {
|
12584
|
-
const values = Object.values(expandedRowHeightsCache);
|
12585
|
-
return values.length ? values.reduce((a, b) => a + b, 0) / values.length : 0;
|
12586
|
-
}, [expandedRowHeightsCache]);
|
12587
|
-
// row heights
|
12588
|
-
const estimateSize = React__default.useCallback(index => {
|
12589
|
-
var _rows$index, _rows$index$getIsExpa;
|
12590
|
-
const rowHeight = tableMeta.rowHeight.height ? ROW_HEIGHT_ESTIMATES[tableMeta.rowHeight.height] : ROW_HEIGHT_ESTIMATES.medium;
|
12591
|
-
if (expandedState === true || (_rows$index = rows[index]) !== null && _rows$index !== void 0 && (_rows$index$getIsExpa = _rows$index.getIsExpanded) !== null && _rows$index$getIsExpa !== void 0 && _rows$index$getIsExpa.call(_rows$index)) {
|
12592
|
-
return rowHeight + averageExpandedRowHeight;
|
12593
|
-
}
|
12594
|
-
return rowHeight;
|
12595
|
-
}, [tableMeta.rowHeight.height, averageExpandedRowHeight, expandedState]);
|
12596
|
-
const createRowMeasurer = React__default.useCallback((resizeItem, virtualRow) => (rowHeight, expansionHeight) => {
|
12597
|
-
// register the expansion height so that it can be used to determine an average
|
12598
|
-
if (expansionHeight) {
|
12599
|
-
setExpandedRowHeightsCache(cache => ({
|
12600
|
-
...cache,
|
12601
|
-
[virtualRow.index]: expansionHeight
|
12602
|
-
}));
|
12603
|
-
}
|
12604
|
-
// update the whole row's size to include the expanded height
|
12605
|
-
resizeItem(virtualRow, rowHeight + (expansionHeight !== null && expansionHeight !== void 0 ? expansionHeight : 0));
|
12606
|
-
}, []);
|
12607
|
-
return {
|
12608
|
-
estimateSize,
|
12609
|
-
createRowMeasurer
|
12610
|
-
};
|
12611
|
-
}
|
12612
12578
|
// support virtualised row groups (where the row group headers are sticky)
|
12613
12579
|
function useRowGroupVirtualisation(table) {
|
12614
12580
|
const rows = table.getRowModel().rows;
|
@@ -13295,8 +13261,12 @@ const DisplayRow = /*#__PURE__*/React__default.memo(function DisplayRow(props) {
|
|
13295
13261
|
}
|
13296
13262
|
const ref = React__default.useRef(null);
|
13297
13263
|
const expansionRef = React__default.useRef(null);
|
13298
|
-
|
13299
|
-
|
13264
|
+
React__default.useEffect(() => {
|
13265
|
+
var _ref$current$getBound, _ref$current, _expansionRef$current, _expansionRef$current2;
|
13266
|
+
const rowHeight = (_ref$current$getBound = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getBoundingClientRect().height) !== null && _ref$current$getBound !== void 0 ? _ref$current$getBound : 0;
|
13267
|
+
const expansionHeight = (_expansionRef$current = (_expansionRef$current2 = expansionRef.current) === null || _expansionRef$current2 === void 0 ? void 0 : _expansionRef$current2.getBoundingClientRect().height) !== null && _expansionRef$current !== void 0 ? _expansionRef$current : 0;
|
13268
|
+
measureRow(rowHeight + expansionHeight);
|
13269
|
+
}, [expansionRef.current]);
|
13300
13270
|
const className = cn('group/row', otherAttributes.className, {
|
13301
13271
|
'hover:cursor-grab': tableMeta.rowDrag.isEnabled && typeof attributes.onClick !== 'function',
|
13302
13272
|
'hover:cursor-pointer': typeof attributes.onClick === 'function'
|
@@ -13319,18 +13289,6 @@ const DisplayRow = /*#__PURE__*/React__default.memo(function DisplayRow(props) {
|
|
13319
13289
|
className: "col-span-full"
|
13320
13290
|
}, expandedRow))) : null);
|
13321
13291
|
});
|
13322
|
-
function useSetVirtualisedRowHeight(measureRow, rowEl, expansionEl, isExpanded) {
|
13323
|
-
React__default.useEffect(() => {
|
13324
|
-
if (rowEl) {
|
13325
|
-
const height = rowEl.getBoundingClientRect().height;
|
13326
|
-
if (isExpanded && expansionEl) {
|
13327
|
-
measureRow(height, expansionEl.getBoundingClientRect().height);
|
13328
|
-
} else {
|
13329
|
-
measureRow(height);
|
13330
|
-
}
|
13331
|
-
}
|
13332
|
-
}, [isExpanded, rowEl, expansionEl]);
|
13333
|
-
}
|
13334
13292
|
|
13335
13293
|
function DisplayCell(props) {
|
13336
13294
|
const {
|
@@ -13693,9 +13651,7 @@ function HeaderMenu(props) {
|
|
13693
13651
|
return /*#__PURE__*/React__default.createElement(IconButton, {
|
13694
13652
|
className: className,
|
13695
13653
|
icon: "more",
|
13696
|
-
menu: popoverElement ? undefined : menuProps => (/*#__PURE__*/React__default.createElement(Menu$1, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu$1.Content,
|
13697
|
-
onFocusOutside: event => event.preventDefault()
|
13698
|
-
}, memoedMenuItems))),
|
13654
|
+
menu: popoverElement ? undefined : menuProps => (/*#__PURE__*/React__default.createElement(Menu$1, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu$1.Content, null, memoedMenuItems))),
|
13699
13655
|
popover: popoverElement,
|
13700
13656
|
onClickCapture: event => event.preventDefault(),
|
13701
13657
|
onKeyDown: event => {
|
@@ -14546,7 +14502,7 @@ function Container(externalProps) {
|
|
14546
14502
|
if (!(activeList !== null && activeList !== void 0 && activeList.id) || !(overList !== null && overList !== void 0 && overList.id) || activeList.id === overList.id) {
|
14547
14503
|
return;
|
14548
14504
|
}
|
14549
|
-
move
|
14505
|
+
move(active.id, activeList === null || activeList === void 0 ? void 0 : activeList.id, overList.id);
|
14550
14506
|
}
|
14551
14507
|
function handleDragEnd(event) {
|
14552
14508
|
const {
|
@@ -16899,7 +16855,6 @@ function Control(props) {
|
|
16899
16855
|
const controlRenderer = column === null || column === void 0 ? void 0 : (_column$columnDef$met2 = column.columnDef.meta) === null || _column$columnDef$met2 === void 0 ? void 0 : _column$columnDef$met2.control;
|
16900
16856
|
const dataType = column === null || column === void 0 ? void 0 : (_column$columnDef$met3 = column.columnDef.meta) === null || _column$columnDef$met3 === void 0 ? void 0 : _column$columnDef$met3.dataType;
|
16901
16857
|
const filters = React__default.useContext(FilterContext);
|
16902
|
-
const ref = React__default.useRef(null);
|
16903
16858
|
React.useEffect(() => {
|
16904
16859
|
// Set value to false only after first render of the control (when it's undefined) after setting the FilterColumn value, because we don't want to change then the value every time filter is opened
|
16905
16860
|
if ((controlRenderer === 'switch' || controlRenderer === 'checkbox') && value === undefined) {
|
@@ -16910,8 +16865,7 @@ function Control(props) {
|
|
16910
16865
|
return /*#__PURE__*/React__default.cloneElement(controlRenderer({
|
16911
16866
|
...attributes,
|
16912
16867
|
setValue: value => onChange(value),
|
16913
|
-
value
|
16914
|
-
ref
|
16868
|
+
value
|
16915
16869
|
}, undefined, filters), {
|
16916
16870
|
['data-query-selector']: querySelector,
|
16917
16871
|
className: 'focus:yt-focus'
|
@@ -18885,7 +18839,7 @@ function willRowMoveAfterSorting(cell, change, rowIndex) {
|
|
18885
18839
|
if (rowIndex < rows.length - 1) {
|
18886
18840
|
miniSortRows.push(rows[rowIndex + 1]);
|
18887
18841
|
}
|
18888
|
-
const
|
18842
|
+
const resortedRows = [...miniSortRows].sort((rowA, rowB) => {
|
18889
18843
|
const sortFn = cell.column.getSortingFn();
|
18890
18844
|
const sortUndefined = cell.column.columnDef.sortUndefined;
|
18891
18845
|
if (!table.options.manualSorting && sortUndefined) {
|
@@ -18900,8 +18854,7 @@ function willRowMoveAfterSorting(cell, change, rowIndex) {
|
|
18900
18854
|
}
|
18901
18855
|
}
|
18902
18856
|
return sortFn(rowA, rowB, cell.column.id);
|
18903
|
-
};
|
18904
|
-
const resortedRows = [...miniSortRows].sort(sortRows);
|
18857
|
+
});
|
18905
18858
|
if (cell.column.getIsSorted() === 'desc') {
|
18906
18859
|
resortedRows.reverse();
|
18907
18860
|
}
|
@@ -19063,7 +19016,7 @@ function reducer$2(state, action) {
|
|
19063
19016
|
changes: {
|
19064
19017
|
...state.changes,
|
19065
19018
|
rows: setWith(state.changes.rows, rowId, value, Object),
|
19066
|
-
errors: setWith(state.changes.errors, `${rowId}.cells`, cellErrors !== null && cellErrors !== void 0 ? cellErrors : state.changes.errors[rowId], Object),
|
19019
|
+
errors: setWith(state.changes.errors, `${rowId}.cells`, cellErrors !== null && cellErrors !== void 0 ? cellErrors : state.changes.errors.cells[rowId], Object),
|
19067
19020
|
originals: setWith(state.changes.originals, rowId, original !== null && original !== void 0 ? original : state.changes.originals[rowId], Object),
|
19068
19021
|
moveReasons: setWith(state.changes.moveReasons, rowId, moveReasons !== null && moveReasons !== void 0 ? moveReasons : state.changes.moveReasons[rowId], Object),
|
19069
19022
|
// status can be undefined, so don't use ??
|
@@ -19863,8 +19816,10 @@ function EditingControlCell(props) {
|
|
19863
19816
|
}
|
19864
19817
|
}, [hasNonTextControl, cell.row.id, cell.column.id, cell.row.original, rowIndex, value]);
|
19865
19818
|
const blur = React__default.useCallback(function blur() {
|
19866
|
-
|
19867
|
-
|
19819
|
+
requestAnimationFrame(() => {
|
19820
|
+
tableMeta.editing.toggleDetailedMode(false);
|
19821
|
+
tableMeta.editing.onCellChanged(cell, rowIndex, undefined, !hasNonTextControl);
|
19822
|
+
});
|
19868
19823
|
}, [hasNonTextControl, cell.row.id, cell.column.id, cell.row.original, rowIndex]);
|
19869
19824
|
const handleBlur = React__default.useCallback(event => {
|
19870
19825
|
if (isElementInsideOrTriggeredFromContainer(event.relatedTarget, event.currentTarget)) {
|
@@ -20173,8 +20128,7 @@ function EditingActionsMenu(props) {
|
|
20173
20128
|
icon: "more",
|
20174
20129
|
onKeyDown: handleKeyDown,
|
20175
20130
|
menu: menuProps => (/*#__PURE__*/React__default.createElement(Menu$1, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu$1.Content, {
|
20176
|
-
onKeyDown: handleMenuContentKeyDown
|
20177
|
-
onFocusOutside: event => event.preventDefault()
|
20131
|
+
onKeyDown: handleMenuContentKeyDown
|
20178
20132
|
}, /*#__PURE__*/React__default.createElement(Menu$1.Item, {
|
20179
20133
|
icon: "tick",
|
20180
20134
|
disabled: !hasChanges || hasErrors,
|
@@ -20421,7 +20375,7 @@ function Alert$1(props) {
|
|
20421
20375
|
const columnName = (_table$getAllColumns$ = table.getAllColumns().find(column => column.id === firstCellErrorColumnId)) === null || _table$getAllColumns$ === void 0 ? void 0 : (_table$getAllColumns$2 = _table$getAllColumns$.columnDef.meta) === null || _table$getAllColumns$2 === void 0 ? void 0 : _table$getAllColumns$2.header;
|
20422
20376
|
tooltip = `${columnName}: ${pendingChangeWithError.errors.cells[firstCellErrorColumnId]}`;
|
20423
20377
|
}
|
20424
|
-
let row
|
20378
|
+
let row;
|
20425
20379
|
try {
|
20426
20380
|
row = table.getRow(pendingChangeWithError.rowId).original;
|
20427
20381
|
} catch {
|
@@ -21309,8 +21263,8 @@ const BarChart = function BarChart(externalProps) {
|
|
21309
21263
|
...props
|
21310
21264
|
} = externalProps;
|
21311
21265
|
const [activeIndex, setActiveIndex] = React__default.useState(undefined);
|
21312
|
-
const [hoveredBar, setHoveredBar] =
|
21313
|
-
const [activeBars, setActiveBars] =
|
21266
|
+
const [hoveredBar, setHoveredBar] = React.useState(null);
|
21267
|
+
const [activeBars, setActiveBars] = React.useState(() => {
|
21314
21268
|
const keys = {};
|
21315
21269
|
React__default.Children.forEach(children, child => {
|
21316
21270
|
keys[child.props.accessor] = true;
|