@ballistix.digital/react-components 3.3.1 → 3.3.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/index.esm.js +13 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { ArrowPathIcon, ChevronDownIcon, EllipsisVerticalIcon, ExclamationCircleIcon, ChevronDoubleLeftIcon, ChevronLeftIcon, ChevronRightIcon, ChevronDoubleRightIcon, ChevronUpIcon, ChevronUpDownIcon, HomeIcon, ArrowLongLeftIcon, ArrowLongRightIcon } from '@heroicons/react/20/solid';
|
|
3
|
-
import { isArray, map, set, get, noop as noop$2, indexOf, toSafeInteger, pick, isEmpty, some, compact as compact$1, forEach, assign, includes, findIndex, find, concat, times, intersection, trim, lastIndexOf } from 'lodash';
|
|
3
|
+
import { isArray, map, set, get, noop as noop$2, indexOf, toSafeInteger, pick, isEmpty, some, compact as compact$1, forEach, assign, includes, findIndex, last, first, find, concat, times, intersection, trim, lastIndexOf } from 'lodash';
|
|
4
4
|
import get$1 from 'lodash/get';
|
|
5
5
|
import React, { useState, useMemo, useRef, Children, Fragment as Fragment$1, useEffect, useCallback, useLayoutEffect, createContext, memo, useReducer, forwardRef, useContext, cloneElement, useImperativeHandle, createElement, PureComponent, Component } from 'react';
|
|
6
6
|
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
@@ -6015,18 +6015,24 @@ var TableList2 = function (props) {
|
|
|
6015
6015
|
var pinnedColumnIndex = findIndex((_d = (_c = config.options) === null || _c === void 0 ? void 0 : _c.columnPinning) === null || _d === void 0 ? void 0 : _d[side], { name: id });
|
|
6016
6016
|
if (pinnedColumnIndex === -1)
|
|
6017
6017
|
return null;
|
|
6018
|
+
var startIndex = side === 'left' ? 0 : pinnedColumnIndex + 1;
|
|
6019
|
+
var endIndex = side === 'left'
|
|
6020
|
+
? pinnedColumnIndex
|
|
6021
|
+
: pinnedColumns.length - pinnedColumnIndex + 1;
|
|
6018
6022
|
return pinnedColumns
|
|
6019
|
-
.slice(
|
|
6023
|
+
.slice(startIndex, endIndex)
|
|
6020
6024
|
.reduce(function (acc, size) { return acc + size; }, 0);
|
|
6021
6025
|
}, [(_q = config.options) === null || _q === void 0 ? void 0 : _q.columnPinning]);
|
|
6022
6026
|
var getCommonPinningStyles = useCallback(function (column) {
|
|
6023
|
-
var _a, _b, _c, _d, _e;
|
|
6027
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
6024
6028
|
var isPinned = column.getIsPinned();
|
|
6025
|
-
var isLastLeftPinnedColumn =
|
|
6026
|
-
var isFirstRightPinnedColumn =
|
|
6027
|
-
|
|
6029
|
+
var isLastLeftPinnedColumn = column.id == ((_c = 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);
|
|
6030
|
+
var isFirstRightPinnedColumn = column.id == ((_f = 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);
|
|
6031
|
+
if (isFirstRightPinnedColumn)
|
|
6032
|
+
console.log(column.id);
|
|
6033
|
+
var width = (_l = find(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), {
|
|
6028
6034
|
name: column.id,
|
|
6029
|
-
})) === null ||
|
|
6035
|
+
})) === null || _l === void 0 ? void 0 : _l.size;
|
|
6030
6036
|
return {
|
|
6031
6037
|
width: width,
|
|
6032
6038
|
maxWidth: width,
|