@ballistix.digital/react-components 3.3.1 → 3.3.3
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/index.d.ts +5 -0
- package/dist/index.esm.js +19 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +18 -7
- package/dist/index.js.map +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6017,18 +6017,24 @@ var TableList2 = function (props) {
|
|
|
6017
6017
|
var pinnedColumnIndex = lodash.findIndex((_d = (_c = config.options) === null || _c === void 0 ? void 0 : _c.columnPinning) === null || _d === void 0 ? void 0 : _d[side], { name: id });
|
|
6018
6018
|
if (pinnedColumnIndex === -1)
|
|
6019
6019
|
return null;
|
|
6020
|
+
var startIndex = side === 'left' ? 0 : pinnedColumnIndex + 1;
|
|
6021
|
+
var endIndex = side === 'left'
|
|
6022
|
+
? pinnedColumnIndex
|
|
6023
|
+
: pinnedColumns.length - pinnedColumnIndex + 1;
|
|
6020
6024
|
return pinnedColumns
|
|
6021
|
-
.slice(
|
|
6025
|
+
.slice(startIndex, endIndex)
|
|
6022
6026
|
.reduce(function (acc, size) { return acc + size; }, 0);
|
|
6023
6027
|
}, [(_q = config.options) === null || _q === void 0 ? void 0 : _q.columnPinning]);
|
|
6024
6028
|
var getCommonPinningStyles = React.useCallback(function (column) {
|
|
6025
|
-
var _a, _b, _c, _d, _e;
|
|
6029
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
6026
6030
|
var isPinned = column.getIsPinned();
|
|
6027
|
-
var isLastLeftPinnedColumn =
|
|
6028
|
-
var isFirstRightPinnedColumn =
|
|
6029
|
-
|
|
6031
|
+
var isLastLeftPinnedColumn = column.id == ((_c = lodash.last((_b = (_a = config.options) === null || _a === void 0 ? void 0 : _a.columnPinning) === null || _b === void 0 ? void 0 : _b.left)) === null || _c === void 0 ? void 0 : _c.name);
|
|
6032
|
+
var isFirstRightPinnedColumn = column.id == ((_f = lodash.first((_e = (_d = config.options) === null || _d === void 0 ? void 0 : _d.columnPinning) === null || _e === void 0 ? void 0 : _e.right)) === null || _f === void 0 ? void 0 : _f.name);
|
|
6033
|
+
if (isFirstRightPinnedColumn)
|
|
6034
|
+
console.log(column.id);
|
|
6035
|
+
var width = (_l = lodash.find(lodash.concat((_h = (_g = config.options) === null || _g === void 0 ? void 0 : _g.columnPinning) === null || _h === void 0 ? void 0 : _h.left, (_k = (_j = config.options) === null || _j === void 0 ? void 0 : _j.columnPinning) === null || _k === void 0 ? void 0 : _k.right), {
|
|
6030
6036
|
name: column.id,
|
|
6031
|
-
})) === null ||
|
|
6037
|
+
})) === null || _l === void 0 ? void 0 : _l.size;
|
|
6032
6038
|
return {
|
|
6033
6039
|
width: width,
|
|
6034
6040
|
maxWidth: width,
|
|
@@ -6060,7 +6066,7 @@ var TableList2 = function (props) {
|
|
|
6060
6066
|
: solid.ChevronDownIcon;
|
|
6061
6067
|
}
|
|
6062
6068
|
return (jsxRuntime.jsx("th", { colSpan: header.colSpan, className: toClassName(styles.body.table.head.cell.container, 'border-b', header.column.getCanSort() && 'cursor-pointer', header.column.getIsPinned() &&
|
|
6063
|
-
styles.body.table.
|
|
6069
|
+
styles.body.table.head.column.pinned.cell), onClick: header.column.getToggleSortingHandler(), style: __assign$1({ minWidth: !!header.column.columnDef.size &&
|
|
6064
6070
|
header.column.columnDef.size !== 150
|
|
6065
6071
|
? "".concat(header.column.columnDef.size, "px")
|
|
6066
6072
|
: 'auto' }, getCommonPinningStyles(header.column)), children: jsxRuntime.jsxs("div", { className: "grid gap-x-1 items-center", style: {
|
|
@@ -6107,6 +6113,11 @@ var base$c = {
|
|
|
6107
6113
|
container: '',
|
|
6108
6114
|
row: '',
|
|
6109
6115
|
checkbox: 'absolute left-4 top-1/2 -mt-2 h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500 sm:left-6',
|
|
6116
|
+
column: {
|
|
6117
|
+
pinned: {
|
|
6118
|
+
cell: 'bg-white sticky z-10 overflow-hidden text-ellipsis',
|
|
6119
|
+
},
|
|
6120
|
+
},
|
|
6110
6121
|
cell: {
|
|
6111
6122
|
container: ' py-3.5 px-3 text-left text-sm font-semibold text-gray-900 group',
|
|
6112
6123
|
text: 'whitespace-normal break-words',
|