@teselagen/ui 0.8.6-beta.22 → 0.8.6-beta.24
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/DataTable/EditabelCell.d.ts +7 -0
- package/DataTable/defaultProps.d.ts +43 -0
- package/DataTable/utils/computePresets.d.ts +1 -0
- package/DataTable/utils/convertSchema.d.ts +22 -2
- package/DataTable/utils/getAllRows.d.ts +1 -1
- package/DataTable/utils/handleCopyColumn.d.ts +1 -1
- package/DataTable/utils/handleCopyTable.d.ts +1 -1
- package/DataTable/utils/isBottomRightCornerOfRectangle.d.ts +10 -8
- package/DataTable/utils/isEntityClean.d.ts +3 -1
- package/DataTable/utils/primarySelectedValue.d.ts +1 -1
- package/DataTable/utils/removeCleanRows.d.ts +11 -3
- package/DataTable/utils/selection.d.ts +3 -1
- package/DataTable/utils/useDeepEqualMemo.d.ts +1 -0
- package/DataTable/utils/useTableEntities.d.ts +17 -4
- package/DataTable/utils/useTableParams.d.ts +49 -0
- package/index.cjs.js +125 -109
- package/index.es.js +125 -109
- package/package.json +2 -2
- package/src/DataTable/Columns.jsx +945 -0
- package/src/DataTable/EditabelCell.js +44 -0
- package/src/DataTable/EditabelCell.jsx +44 -0
- package/src/DataTable/RenderCell.jsx +191 -0
- package/src/DataTable/defaultProps.js +45 -0
- package/src/DataTable/index.js +96 -68
- package/src/DataTable/utils/computePresets.js +42 -0
- package/src/DataTable/utils/convertSchema.ts +79 -0
- package/src/DataTable/utils/getAllRows.js +2 -6
- package/src/DataTable/utils/handleCopyColumn.js +2 -2
- package/src/DataTable/utils/handleCopyTable.js +2 -2
- package/src/DataTable/utils/isBottomRightCornerOfRectangle.ts +27 -0
- package/src/DataTable/utils/isEntityClean.ts +15 -0
- package/src/DataTable/utils/primarySelectedValue.ts +1 -0
- package/src/DataTable/utils/queryParams.js +1 -1
- package/src/DataTable/utils/removeCleanRows.ts +25 -0
- package/src/DataTable/utils/selection.ts +11 -0
- package/src/DataTable/utils/useDeepEqualMemo.js +10 -0
- package/src/DataTable/utils/useTableEntities.ts +60 -0
- package/src/DataTable/utils/useTableParams.js +361 -0
- package/style.css +10537 -0
package/index.es.js
CHANGED
|
@@ -15849,6 +15849,7 @@ var itemSizeEstimator = /* @__PURE__ */ __name(function itemSizeEstimator2() {
|
|
|
15849
15849
|
return 41.36;
|
|
15850
15850
|
}, "itemSizeEstimator");
|
|
15851
15851
|
var ReactTableDefaults = defaultProps;
|
|
15852
|
+
var VIRTUALIZE_CUTOFF_LENGTH = 200;
|
|
15852
15853
|
var ReactTable = function(_Methods) {
|
|
15853
15854
|
_inherits$8(ReactTable2, _Methods);
|
|
15854
15855
|
function ReactTable2(props) {
|
|
@@ -16434,7 +16435,7 @@ var ReactTable = function(_Methods) {
|
|
|
16434
16435
|
minWidth: rowMinWidth + "px"
|
|
16435
16436
|
})
|
|
16436
16437
|
}, tBodyProps.rest),
|
|
16437
|
-
pageRows.length <
|
|
16438
|
+
_this2.props.noVirtual || pageRows.length < VIRTUALIZE_CUTOFF_LENGTH ? pageRows.map(function(d2, i2) {
|
|
16438
16439
|
return makePageRow(d2, i2);
|
|
16439
16440
|
}) : React__default.createElement(ReactList, {
|
|
16440
16441
|
type: "variable",
|
|
@@ -16538,7 +16539,7 @@ const getIdOrCodeOrIndex = /* @__PURE__ */ __name((record, rowIndex) => {
|
|
|
16538
16539
|
const getSelectedRowsFromEntities = /* @__PURE__ */ __name((entities, idMap) => {
|
|
16539
16540
|
if (!idMap) return [];
|
|
16540
16541
|
return entities.reduce((acc, entity, i2) => {
|
|
16541
|
-
return idMap[getIdOrCodeOrIndex(entity, i2)] ? acc.concat(i2) : acc;
|
|
16542
|
+
return idMap[getIdOrCodeOrIndex(entity, i2)] ? acc.concat([i2]) : acc;
|
|
16542
16543
|
}, []);
|
|
16543
16544
|
}, "getSelectedRowsFromEntities");
|
|
16544
16545
|
const removeCleanRows = /* @__PURE__ */ __name((entities, cellValidation) => {
|
|
@@ -16662,9 +16663,9 @@ const stripNumberAtEnd = /* @__PURE__ */ __name((str) => {
|
|
|
16662
16663
|
var _a;
|
|
16663
16664
|
return (_a = str == null ? void 0 : str.replace) == null ? void 0 : _a.call(str, getNumberStrAtEnd(str), "");
|
|
16664
16665
|
}, "stripNumberAtEnd");
|
|
16665
|
-
const getAllRows = /* @__PURE__ */ __name((
|
|
16666
|
-
|
|
16667
|
-
const allRowEls =
|
|
16666
|
+
const getAllRows = /* @__PURE__ */ __name((tableRef) => {
|
|
16667
|
+
var _a, _b;
|
|
16668
|
+
const allRowEls = (_b = (_a = tableRef.current) == null ? void 0 : _a.tableRef) == null ? void 0 : _b.querySelectorAll(".rt-tr");
|
|
16668
16669
|
if (!allRowEls || !allRowEls.length) {
|
|
16669
16670
|
return;
|
|
16670
16671
|
}
|
|
@@ -16931,14 +16932,14 @@ const handleCopyRows = /* @__PURE__ */ __name((rowElsToCopy, { specificColumn, o
|
|
|
16931
16932
|
handleCopyHelper(textToCopy, jsonToCopy, onFinishMsg || "Row Copied");
|
|
16932
16933
|
}
|
|
16933
16934
|
}, "handleCopyRows");
|
|
16934
|
-
const handleCopyColumn = /* @__PURE__ */ __name((
|
|
16935
|
+
const handleCopyColumn = /* @__PURE__ */ __name((tableRef, cellWrapper, selectedRecords) => {
|
|
16935
16936
|
const specificColumn = cellWrapper.getAttribute("data-test");
|
|
16936
|
-
let rowElsToCopy = getAllRows(
|
|
16937
|
+
let rowElsToCopy = getAllRows(tableRef);
|
|
16937
16938
|
if (!rowElsToCopy) return;
|
|
16938
16939
|
if (selectedRecords) {
|
|
16939
|
-
const ids2 = selectedRecords.map((
|
|
16940
|
+
const ids2 = selectedRecords.map((e) => {
|
|
16940
16941
|
var _a;
|
|
16941
|
-
return (_a = getIdOrCodeOrIndex(
|
|
16942
|
+
return (_a = getIdOrCodeOrIndex(e)) == null ? void 0 : _a.toString();
|
|
16942
16943
|
});
|
|
16943
16944
|
rowElsToCopy = Array.from(rowElsToCopy).filter((rowEl) => {
|
|
16944
16945
|
var _a;
|
|
@@ -16971,9 +16972,9 @@ const isBottomRightCornerOfRectangle = /* @__PURE__ */ __name(({
|
|
|
16971
16972
|
const isBottomRight = i2 === lastRowIndex && cellIndex === lastCellIndex;
|
|
16972
16973
|
return isBottomRight;
|
|
16973
16974
|
}, "isBottomRightCornerOfRectangle");
|
|
16974
|
-
const handleCopyTable = /* @__PURE__ */ __name((
|
|
16975
|
+
const handleCopyTable = /* @__PURE__ */ __name((tableRef, opts) => {
|
|
16975
16976
|
try {
|
|
16976
|
-
const allRowEls = getAllRows(
|
|
16977
|
+
const allRowEls = getAllRows(tableRef);
|
|
16977
16978
|
if (!allRowEls) return;
|
|
16978
16979
|
handleCopyRows(allRowEls, __spreadProps(__spreadValues({}, opts), {
|
|
16979
16980
|
onFinishMsg: "Table Copied"
|
|
@@ -17010,13 +17011,15 @@ const useTableEntities = /* @__PURE__ */ __name((tableFormName) => {
|
|
|
17010
17011
|
},
|
|
17011
17012
|
[dispatch, tableFormName]
|
|
17012
17013
|
);
|
|
17013
|
-
const { allOrderedEntities, selectedEntities } = useSelector(
|
|
17014
|
-
|
|
17015
|
-
|
|
17016
|
-
|
|
17017
|
-
|
|
17018
|
-
|
|
17019
|
-
|
|
17014
|
+
const { allOrderedEntities, selectedEntities } = useSelector(
|
|
17015
|
+
(state) => {
|
|
17016
|
+
var _a, _b, _c, _d, _e, _f;
|
|
17017
|
+
return {
|
|
17018
|
+
allOrderedEntities: (_c = (_b = (_a = state.form) == null ? void 0 : _a[tableFormName]) == null ? void 0 : _b.values) == null ? void 0 : _c.allOrderedEntities,
|
|
17019
|
+
selectedEntities: (_f = (_e = (_d = state.form) == null ? void 0 : _d[tableFormName]) == null ? void 0 : _e.values) == null ? void 0 : _f.reduxFormSelectedEntityIdMap
|
|
17020
|
+
};
|
|
17021
|
+
}
|
|
17022
|
+
);
|
|
17020
17023
|
return { selectTableEntities, allOrderedEntities, selectedEntities };
|
|
17021
17024
|
}, "useTableEntities");
|
|
17022
17025
|
const useDeepEqualMemo = /* @__PURE__ */ __name((value) => {
|
|
@@ -20178,7 +20181,7 @@ function getQueryParams({
|
|
|
20178
20181
|
order_by.push({ updatedAt: "desc" });
|
|
20179
20182
|
}
|
|
20180
20183
|
order_by.push(
|
|
20181
|
-
isCodeModel ? { code: "
|
|
20184
|
+
isCodeModel ? { code: "asc" } : { [window.__sortId || "id"]: "asc" }
|
|
20182
20185
|
);
|
|
20183
20186
|
return __spreadProps(__spreadValues({}, toRet), {
|
|
20184
20187
|
variables: {
|
|
@@ -37214,7 +37217,7 @@ const multiViewColumn = __spreadProps(__spreadValues({}, viewColumn), {
|
|
|
37214
37217
|
));
|
|
37215
37218
|
}, "render")
|
|
37216
37219
|
});
|
|
37217
|
-
|
|
37220
|
+
const convertSchema = /* @__PURE__ */ __name((schema) => {
|
|
37218
37221
|
let schemaToUse = schema;
|
|
37219
37222
|
if (!schemaToUse.fields && Array.isArray(schema)) {
|
|
37220
37223
|
schemaToUse = {
|
|
@@ -37223,35 +37226,26 @@ function convertSchema(schema) {
|
|
|
37223
37226
|
}
|
|
37224
37227
|
schemaToUse = __spreadValues({}, schemaToUse);
|
|
37225
37228
|
schemaToUse.fields = schemaToUse.fields.map((field, i2) => {
|
|
37226
|
-
let fieldToUse = field;
|
|
37227
37229
|
if (typeof field === "string") {
|
|
37228
|
-
|
|
37230
|
+
return {
|
|
37229
37231
|
displayName: startCase(camelCase(field)),
|
|
37230
37232
|
path: field,
|
|
37231
37233
|
type: "string"
|
|
37232
37234
|
};
|
|
37233
|
-
} else
|
|
37234
|
-
fieldToUse =
|
|
37235
|
-
|
|
37236
|
-
|
|
37237
|
-
|
|
37238
|
-
|
|
37239
|
-
|
|
37240
|
-
|
|
37241
|
-
}
|
|
37242
|
-
|
|
37243
|
-
if (!fieldToUse.path) {
|
|
37244
|
-
fieldToUse = __spreadProps(__spreadValues({}, fieldToUse), {
|
|
37245
|
-
filterDisabled: true,
|
|
37246
|
-
sortDisabled: true,
|
|
37247
|
-
path: "fake-path" + i2
|
|
37248
|
-
});
|
|
37235
|
+
} else {
|
|
37236
|
+
const fieldToUse = __spreadValues({}, field);
|
|
37237
|
+
fieldToUse.type = fieldToUse.type || "string";
|
|
37238
|
+
fieldToUse.displayName = fieldToUse.displayName || startCase(camelCase(fieldToUse.path || ""));
|
|
37239
|
+
if (!fieldToUse.path) {
|
|
37240
|
+
fieldToUse.filterDisabled = true;
|
|
37241
|
+
fieldToUse.sortDisabled = true;
|
|
37242
|
+
fieldToUse.path = "fake-path" + i2;
|
|
37243
|
+
}
|
|
37244
|
+
return fieldToUse;
|
|
37249
37245
|
}
|
|
37250
|
-
return fieldToUse;
|
|
37251
37246
|
});
|
|
37252
37247
|
return schemaToUse;
|
|
37253
|
-
}
|
|
37254
|
-
__name(convertSchema, "convertSchema");
|
|
37248
|
+
}, "convertSchema");
|
|
37255
37249
|
function mergeSchemas(_originalSchema, _overrideSchema) {
|
|
37256
37250
|
const originalSchema = convertSchema(_originalSchema);
|
|
37257
37251
|
const overrideSchema = convertSchema(_overrideSchema);
|
|
@@ -56302,6 +56296,7 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
|
|
|
56302
56296
|
);
|
|
56303
56297
|
const tableRef = useRef();
|
|
56304
56298
|
const alreadySelected = useRef(false);
|
|
56299
|
+
const [noVirtual, setNoVirtual] = useState(false);
|
|
56305
56300
|
const [onlyShowRowsWErrors, setOnlyShowRowsWErrors] = useState(false);
|
|
56306
56301
|
const [entitiesUndoRedoStack, setEntitiesUndoRedoStack] = useState({
|
|
56307
56302
|
currentVersion: 0
|
|
@@ -57143,76 +57138,94 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
|
|
|
57143
57138
|
updateEntitiesHelper,
|
|
57144
57139
|
updateValidation
|
|
57145
57140
|
]);
|
|
57146
|
-
const
|
|
57147
|
-
(
|
|
57148
|
-
|
|
57149
|
-
|
|
57150
|
-
|
|
57151
|
-
|
|
57152
|
-
|
|
57153
|
-
|
|
57154
|
-
|
|
57155
|
-
|
|
57156
|
-
|
|
57157
|
-
|
|
57158
|
-
|
|
57159
|
-
|
|
57160
|
-
|
|
57161
|
-
|
|
57162
|
-
|
|
57163
|
-
|
|
57164
|
-
|
|
57165
|
-
|
|
57166
|
-
|
|
57167
|
-
|
|
57168
|
-
|
|
57169
|
-
|
|
57170
|
-
|
|
57171
|
-
|
|
57172
|
-
|
|
57173
|
-
|
|
57174
|
-
|
|
57175
|
-
|
|
57176
|
-
|
|
57177
|
-
|
|
57178
|
-
|
|
57179
|
-
|
|
57180
|
-
if (
|
|
57181
|
-
|
|
57182
|
-
} else {
|
|
57183
|
-
const jsonRow = [];
|
|
57184
|
-
let [rowCopyText, json] = getRowCopyText(allRows[i2 + 1]);
|
|
57185
|
-
rowCopyText = rowCopyText.split(" ");
|
|
57186
|
-
times(row.length, (i22) => {
|
|
57187
|
-
const cell = row[i22];
|
|
57188
|
-
if (cell) {
|
|
57189
|
-
fullCellText += rowCopyText[i22];
|
|
57190
|
-
jsonRow.push(json[i22]);
|
|
57191
|
-
}
|
|
57192
|
-
if (i22 !== row.length - 1 && i22 >= firstCellIndex)
|
|
57193
|
-
fullCellText += " ";
|
|
57194
|
-
});
|
|
57195
|
-
fullJson.push(jsonRow);
|
|
57141
|
+
const waitUntilAllRowsAreRendered = useCallback(() => {
|
|
57142
|
+
return new Promise((resolve) => {
|
|
57143
|
+
const interval = setInterval(() => {
|
|
57144
|
+
var _a2, _b;
|
|
57145
|
+
const allRowEls = (_b = (_a2 = tableRef.current) == null ? void 0 : _a2.tableRef) == null ? void 0 : _b.querySelectorAll(".rt-tr-group");
|
|
57146
|
+
if ((allRowEls == null ? void 0 : allRowEls.length) === entities.length) {
|
|
57147
|
+
clearInterval(interval);
|
|
57148
|
+
resolve();
|
|
57149
|
+
}
|
|
57150
|
+
}, 50);
|
|
57151
|
+
});
|
|
57152
|
+
}, []);
|
|
57153
|
+
const handleCopySelectedCells = useCallback(() => __async(void 0, null, function* () {
|
|
57154
|
+
if (isEmpty$1(selectedCells)) return;
|
|
57155
|
+
if (entities.length > VIRTUALIZE_CUTOFF_LENGTH) {
|
|
57156
|
+
setNoVirtual(true);
|
|
57157
|
+
yield waitUntilAllRowsAreRendered();
|
|
57158
|
+
}
|
|
57159
|
+
const pathToIndex = getFieldPathToIndex(schema);
|
|
57160
|
+
const entityIdToEntity = getEntityIdToEntity(entities);
|
|
57161
|
+
const selectionGrid = [];
|
|
57162
|
+
let firstRowIndex;
|
|
57163
|
+
let firstCellIndex;
|
|
57164
|
+
Object.keys(selectedCells).forEach((key) => {
|
|
57165
|
+
const [rowId, path2] = key.split(":");
|
|
57166
|
+
const eInfo = entityIdToEntity[rowId];
|
|
57167
|
+
if (eInfo) {
|
|
57168
|
+
if (firstRowIndex === void 0 || eInfo.i < firstRowIndex) {
|
|
57169
|
+
firstRowIndex = eInfo.i;
|
|
57170
|
+
}
|
|
57171
|
+
if (!selectionGrid[eInfo.i]) {
|
|
57172
|
+
selectionGrid[eInfo.i] = [];
|
|
57173
|
+
}
|
|
57174
|
+
const cellIndex = pathToIndex[path2];
|
|
57175
|
+
if (firstCellIndex === void 0 || cellIndex < firstCellIndex) {
|
|
57176
|
+
firstCellIndex = cellIndex;
|
|
57196
57177
|
}
|
|
57197
|
-
|
|
57198
|
-
|
|
57199
|
-
|
|
57200
|
-
|
|
57201
|
-
|
|
57202
|
-
|
|
57178
|
+
selectionGrid[eInfo.i][cellIndex] = true;
|
|
57179
|
+
}
|
|
57180
|
+
});
|
|
57181
|
+
if (firstRowIndex === void 0) return;
|
|
57182
|
+
const allRows = getAllRows(tableRef);
|
|
57183
|
+
let fullCellText = "";
|
|
57184
|
+
const fullJson = [];
|
|
57185
|
+
times(selectionGrid.length, (i2) => {
|
|
57186
|
+
const row = selectionGrid[i2];
|
|
57187
|
+
if (fullCellText) {
|
|
57188
|
+
fullCellText += "\n";
|
|
57189
|
+
}
|
|
57190
|
+
if (!row) {
|
|
57191
|
+
return;
|
|
57192
|
+
} else {
|
|
57193
|
+
const jsonRow = [];
|
|
57194
|
+
let [rowCopyText, json] = getRowCopyText(allRows[i2 + 1]);
|
|
57195
|
+
rowCopyText = rowCopyText.split(" ");
|
|
57196
|
+
times(row.length, (i22) => {
|
|
57197
|
+
const cell = row[i22];
|
|
57198
|
+
if (cell) {
|
|
57199
|
+
fullCellText += rowCopyText[i22];
|
|
57200
|
+
jsonRow.push(json[i22]);
|
|
57201
|
+
}
|
|
57202
|
+
if (i22 !== row.length - 1 && i22 >= firstCellIndex) fullCellText += " ";
|
|
57203
|
+
});
|
|
57204
|
+
fullJson.push(jsonRow);
|
|
57205
|
+
}
|
|
57206
|
+
});
|
|
57207
|
+
if (!fullCellText) return window.toastr.warning("No text to copy");
|
|
57208
|
+
handleCopyHelper(fullCellText, fullJson, "Selected cells copied");
|
|
57209
|
+
setNoVirtual(false);
|
|
57210
|
+
}), [entities, selectedCells, schema, waitUntilAllRowsAreRendered]);
|
|
57203
57211
|
const handleCopySelectedRows = useCallback(
|
|
57204
|
-
(selectedRecords,
|
|
57205
|
-
|
|
57206
|
-
|
|
57212
|
+
(selectedRecords) => __async(void 0, null, function* () {
|
|
57213
|
+
if (entities.length > VIRTUALIZE_CUTOFF_LENGTH) {
|
|
57214
|
+
setNoVirtual(true);
|
|
57215
|
+
yield waitUntilAllRowsAreRendered();
|
|
57216
|
+
}
|
|
57217
|
+
const idToIndex = entities.reduce((acc, e, i2) => {
|
|
57218
|
+
acc[e.id || e.code] = i2;
|
|
57207
57219
|
return acc;
|
|
57208
57220
|
}, {});
|
|
57209
57221
|
const rowNumbersToCopy = selectedRecords.map((rec) => idToIndex[rec.id || rec.code] + 1).sort();
|
|
57210
57222
|
if (!rowNumbersToCopy.length) return;
|
|
57211
57223
|
rowNumbersToCopy.unshift(0);
|
|
57212
57224
|
try {
|
|
57213
|
-
const allRowEls = getAllRows(
|
|
57225
|
+
const allRowEls = getAllRows(tableRef);
|
|
57214
57226
|
if (!allRowEls) return;
|
|
57215
57227
|
const rowEls = rowNumbersToCopy.map((i2) => allRowEls[i2]);
|
|
57228
|
+
if (window.Cypress) window.Cypress.__copiedRowsLength = rowEls.length;
|
|
57216
57229
|
handleCopyRows(rowEls, {
|
|
57217
57230
|
onFinishMsg: "Selected rows copied"
|
|
57218
57231
|
});
|
|
@@ -57220,8 +57233,9 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
|
|
|
57220
57233
|
console.error(`error:`, error);
|
|
57221
57234
|
window.toastr.error("Error copying rows.");
|
|
57222
57235
|
}
|
|
57223
|
-
|
|
57224
|
-
|
|
57236
|
+
setNoVirtual(false);
|
|
57237
|
+
}),
|
|
57238
|
+
[entities, waitUntilAllRowsAreRendered]
|
|
57225
57239
|
);
|
|
57226
57240
|
const handleCopyHotkey = useCallback(
|
|
57227
57241
|
(e) => {
|
|
@@ -57988,7 +58002,7 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
|
|
|
57988
58002
|
{
|
|
57989
58003
|
key: "copyColumn",
|
|
57990
58004
|
onClick: /* @__PURE__ */ __name(() => {
|
|
57991
|
-
handleCopyColumn(
|
|
58005
|
+
handleCopyColumn(tableRef, cellWrapper);
|
|
57992
58006
|
}, "onClick"),
|
|
57993
58007
|
text: "Column"
|
|
57994
58008
|
}
|
|
@@ -58001,7 +58015,7 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
|
|
|
58001
58015
|
{
|
|
58002
58016
|
key: "copyColumnSelected",
|
|
58003
58017
|
onClick: /* @__PURE__ */ __name(() => {
|
|
58004
|
-
handleCopyColumn(
|
|
58018
|
+
handleCopyColumn(tableRef, cellWrapper, selectedRecords);
|
|
58005
58019
|
}, "onClick"),
|
|
58006
58020
|
text: "Column (Selected)"
|
|
58007
58021
|
}
|
|
@@ -58044,7 +58058,7 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
|
|
|
58044
58058
|
{
|
|
58045
58059
|
key: "copyFullTableRows",
|
|
58046
58060
|
onClick: /* @__PURE__ */ __name(() => {
|
|
58047
|
-
handleCopyTable(
|
|
58061
|
+
handleCopyTable(tableRef);
|
|
58048
58062
|
}, "onClick"),
|
|
58049
58063
|
text: "Table"
|
|
58050
58064
|
}
|
|
@@ -58581,6 +58595,7 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
|
|
|
58581
58595
|
__spreadValues({
|
|
58582
58596
|
data: filteredEnts,
|
|
58583
58597
|
ref: tableRef,
|
|
58598
|
+
noVirtual,
|
|
58584
58599
|
className: classNames({
|
|
58585
58600
|
isCellEditable,
|
|
58586
58601
|
"tg-table-loading": isLoading,
|
|
@@ -58648,7 +58663,8 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
|
|
|
58648
58663
|
resizePersist,
|
|
58649
58664
|
resized,
|
|
58650
58665
|
rowsToShow,
|
|
58651
|
-
style
|
|
58666
|
+
style,
|
|
58667
|
+
noVirtual
|
|
58652
58668
|
]
|
|
58653
58669
|
);
|
|
58654
58670
|
return /* @__PURE__ */ React__default.createElement("div", { tabIndex: "1", onKeyDown: handleKeyDown, onKeyUp: handleKeyUp }, /* @__PURE__ */ React__default.createElement(
|
|
@@ -58931,8 +58947,8 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
|
|
|
58931
58947
|
), /* @__PURE__ */ React__default.createElement(
|
|
58932
58948
|
Button,
|
|
58933
58949
|
{
|
|
58934
|
-
onClick: /* @__PURE__ */ __name((
|
|
58935
|
-
handleCopyTable(
|
|
58950
|
+
onClick: /* @__PURE__ */ __name(() => {
|
|
58951
|
+
handleCopyTable(tableRef, { isDownload: true });
|
|
58936
58952
|
}, "onClick"),
|
|
58937
58953
|
"data-tip": "Download Table as CSV",
|
|
58938
58954
|
minimal: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teselagen/ui",
|
|
3
|
-
"version": "0.8.6-beta.
|
|
3
|
+
"version": "0.8.6-beta.24",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@dnd-kit/core": "^6.1.0",
|
|
18
18
|
"@dnd-kit/modifiers": "^7.0.0",
|
|
19
19
|
"@dnd-kit/sortable": "^8.0.0",
|
|
20
|
-
"@teselagen/react-table": "6.10.
|
|
20
|
+
"@teselagen/react-table": "6.10.18",
|
|
21
21
|
"classnames": "^2.3.2",
|
|
22
22
|
"color": "^3.2.1",
|
|
23
23
|
"copy-to-clipboard": "^3.3.1",
|