@economic/taco 2.64.1-stale-validator.0 → 2.64.1-test-1.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/taco.cjs +23 -10
- package/dist/taco.cjs.map +1 -1
- package/dist/taco.css +4 -0
- package/dist/taco.js +23 -10
- package/dist/taco.js.map +1 -1
- package/package.json +2 -2
package/dist/taco.css
CHANGED
@@ -1623,6 +1623,10 @@ table[data-taco^='table'] tbody tr[data-row-create] td {
|
|
1623
1623
|
table[data-taco^='table'] tbody tr[data-row-create] td button {
|
1624
1624
|
@apply -mt-[3px];
|
1625
1625
|
}
|
1626
|
+
|
1627
|
+
table[data-taco='table3'] td [data-taco='combobox'] {
|
1628
|
+
display: inline;
|
1629
|
+
}
|
1626
1630
|
[data-taco='card-content'] > [data-taco='chart-wrapper']:not(:has([data-taco='chart-donut'], [data-taco='chart-pie'])) {
|
1627
1631
|
@apply w-full;
|
1628
1632
|
}
|
package/dist/taco.js
CHANGED
@@ -37818,6 +37818,15 @@ function useTableRenderer(renderers, table, tableRef, length, defaultRowActiveIn
|
|
37818
37818
|
virtualiser.measure();
|
37819
37819
|
}
|
37820
37820
|
}, [expandedState]);
|
37821
|
+
React__default.useEffect(() => {
|
37822
|
+
const totalSize2 = virtualiser.getTotalSize();
|
37823
|
+
console.log("before measuring totalSize", totalSize2);
|
37824
|
+
virtualiser.measure();
|
37825
|
+
setTimeout(() => {
|
37826
|
+
const totalSize3 = virtualiser.getTotalSize();
|
37827
|
+
console.log("after measuring totalSize", totalSize3);
|
37828
|
+
}, 1e3);
|
37829
|
+
}, [tableMeta.fontSize.size, tableMeta.rowHeight.height, JSON.stringify(table.getState().sorting), rows.length]);
|
37821
37830
|
const totalSize = virtualiser.getTotalSize();
|
37822
37831
|
const virtualItems = virtualiser.getVirtualItems();
|
37823
37832
|
const scrollToIndex = React__default.useCallback(
|
@@ -38537,13 +38546,14 @@ const DisplayRow = React__default.memo(function DisplayRow2(props) {
|
|
38537
38546
|
}
|
38538
38547
|
const ref = React__default.useRef(null);
|
38539
38548
|
const expansionRef = React__default.useRef(null);
|
38549
|
+
const rowSize = useResizeObserver$1(ref, true);
|
38540
38550
|
const expandedRowSize = useResizeObserver$1(expansionRef, !!expandedRow);
|
38541
38551
|
React__default.useEffect(() => {
|
38542
38552
|
var _a2, _b2;
|
38543
38553
|
const rowHeight = ((_a2 = ref.current) == null ? void 0 : _a2.getBoundingClientRect().height) ?? 0;
|
38544
38554
|
const expansionHeight = ((_b2 = expansionRef.current) == null ? void 0 : _b2.getBoundingClientRect().height) ?? 0;
|
38545
38555
|
measureRow(rowHeight + expansionHeight);
|
38546
|
-
}, [
|
38556
|
+
}, [rowSize, expandedRowSize, measureRow]);
|
38547
38557
|
const className = clsx("group/row", otherAttributes.className, {
|
38548
38558
|
"hover:cursor-grab": tableMeta.rowDrag.isEnabled && typeof attributes.onClick !== "function",
|
38549
38559
|
"hover:cursor-pointer": typeof attributes.onClick === "function"
|
@@ -53920,6 +53930,14 @@ function isTableScrolled(ref) {
|
|
53920
53930
|
function useTableEditingListener(table, tableRef, scrollToIndex) {
|
53921
53931
|
const tableMeta = table.options.meta;
|
53922
53932
|
const localization = useLocalization();
|
53933
|
+
useLazyEffect(() => {
|
53934
|
+
return () => {
|
53935
|
+
var _a;
|
53936
|
+
if (tableMeta.editing.isEditing && tableMeta.rowActive.rowActiveIndex !== void 0) {
|
53937
|
+
tableMeta.editing.saveChanges(table, (_a = table.getRowModel().rows[tableMeta.rowActive.rowActiveIndex]) == null ? void 0 : _a.id);
|
53938
|
+
}
|
53939
|
+
};
|
53940
|
+
}, [tableMeta.rowActive.rowActiveIndex, tableMeta.editing.isEditing]);
|
53923
53941
|
const hasChanges = tableMeta.editing.hasChanges();
|
53924
53942
|
React__default.useEffect(() => {
|
53925
53943
|
function showUnsavedChangesWarning(event) {
|
@@ -55264,7 +55282,7 @@ function usePendingChangesState(handleSave, handleChange, handleDiscard, rowIden
|
|
55264
55282
|
var _a, _b, _c;
|
55265
55283
|
return (_c = (_b = (_a = state.changes.errors) == null ? void 0 : _a[cell.row.id]) == null ? void 0 : _b.cells) == null ? void 0 : _c[cell.column.id];
|
55266
55284
|
}
|
55267
|
-
async function onCellChanged(cell, rowIndex, nextValue, shouldRunUpdaters = true
|
55285
|
+
async function onCellChanged(cell, rowIndex, nextValue, shouldRunUpdaters = true) {
|
55268
55286
|
var _a;
|
55269
55287
|
const tableMeta = cell.getContext().table.options.meta;
|
55270
55288
|
const state2 = tableMeta.editing.getState();
|
@@ -55294,7 +55312,7 @@ function usePendingChangesState(handleSave, handleChange, handleDiscard, rowIden
|
|
55294
55312
|
const nextMoveReasons = { ...state2.changes.moveReasons[cell.row.id] };
|
55295
55313
|
const nextCellErrors = { ...(_a = state2.changes.errors[cell.row.id]) == null ? void 0 : _a.cells };
|
55296
55314
|
let validationErrors = {};
|
55297
|
-
if (validator && Object.keys(nextChanges).length && original
|
55315
|
+
if (validator && Object.keys(nextChanges).length && original) {
|
55298
55316
|
const nextRowValue = { ...original, ...changes, ...updatesForOtherCells };
|
55299
55317
|
validationErrors = await validator(nextRowValue) ?? {};
|
55300
55318
|
}
|
@@ -55776,7 +55794,7 @@ function EditingControlCell(props) {
|
|
55776
55794
|
if (hasChanged) {
|
55777
55795
|
tableMeta.editing.setCellValue(cell, rowIndex, nextValue);
|
55778
55796
|
if (hasNonTextControl) {
|
55779
|
-
requestAnimationFrame(() => tableMeta.editing.onCellChanged(cell, rowIndex, nextValue
|
55797
|
+
requestAnimationFrame(() => tableMeta.editing.onCellChanged(cell, rowIndex, nextValue));
|
55780
55798
|
}
|
55781
55799
|
}
|
55782
55800
|
},
|
@@ -55789,7 +55807,7 @@ function EditingControlCell(props) {
|
|
55789
55807
|
}
|
55790
55808
|
requestAnimationFrame(() => {
|
55791
55809
|
tableMeta.editing.toggleDetailedMode(false);
|
55792
|
-
tableMeta.editing.onCellChanged(cell, rowIndex, void 0, !hasNonTextControl
|
55810
|
+
tableMeta.editing.onCellChanged(cell, rowIndex, void 0, !hasNonTextControl);
|
55793
55811
|
});
|
55794
55812
|
},
|
55795
55813
|
[hasNonTextControl, cell.row.id, JSON.stringify(rowChanges), rowIndex, cell.column.id, cell.row.original]
|
@@ -56085,11 +56103,6 @@ function Row(props) {
|
|
56085
56103
|
}
|
56086
56104
|
}
|
56087
56105
|
}, [tableMeta.editing.isEditing, tableMeta.rowActive.rowActiveIndex, tableMeta.editing.lastFocusedCellIndex]);
|
56088
|
-
useLazyEffect(() => {
|
56089
|
-
if (tableMeta.editing.isEditing && !isActiveRow) {
|
56090
|
-
tableMeta.editing.saveChanges(table, row.id);
|
56091
|
-
}
|
56092
|
-
}, [isActiveRow]);
|
56093
56106
|
const handleFocus = React__default.useCallback(
|
56094
56107
|
(event) => {
|
56095
56108
|
var _a;
|