@luminati-io/uikit 3.5.0 → 3.5.1-beta.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -37720,126 +37720,6 @@ var Text = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typography_
|
|
37720
37720
|
|
37721
37721
|
/***/ }),
|
37722
37722
|
|
37723
|
-
/***/ "./src/table/cell.js":
|
37724
|
-
/*!***************************!*\
|
37725
|
-
!*** ./src/table/cell.js ***!
|
37726
|
-
\***************************/
|
37727
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
37728
|
-
|
37729
|
-
"use strict";
|
37730
|
-
__webpack_require__.r(__webpack_exports__);
|
37731
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
37732
|
-
/* harmony export */ Cell: () => (/* binding */ Cell),
|
37733
|
-
/* harmony export */ StyledCell: () => (/* binding */ StyledCell)
|
37734
|
-
/* harmony export */ });
|
37735
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
37736
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
37737
|
-
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "styled-components");
|
37738
|
-
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
|
37739
|
-
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
|
37740
|
-
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
|
37741
|
-
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../constants */ "./src/constants.js");
|
37742
|
-
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./context */ "./src/table/context.js");
|
37743
|
-
/* harmony import */ var _table_row__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./table_row */ "./src/table/table_row.js");
|
37744
|
-
// LICENSE_CODE ZON
|
37745
|
-
|
37746
|
-
|
37747
|
-
/*jslint react:true*/
|
37748
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
37749
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
37750
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
37751
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
37752
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
37753
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
37754
|
-
|
37755
|
-
|
37756
|
-
|
37757
|
-
|
37758
|
-
|
37759
|
-
|
37760
|
-
|
37761
|
-
var Cell = function Cell(props) {
|
37762
|
-
var className = props.className,
|
37763
|
-
rowDensity = props.rowDensity,
|
37764
|
-
isLastRow = props.isLastRow,
|
37765
|
-
cell = props.cell;
|
37766
|
-
var row = cell.row,
|
37767
|
-
column = cell.column,
|
37768
|
-
isEditing = cell.isEditing;
|
37769
|
-
var rowId = row.id;
|
37770
|
-
var columnId = column.id,
|
37771
|
-
_column$type = column.type,
|
37772
|
-
type = _column$type === void 0 ? 'string' : _column$type,
|
37773
|
-
canEdit = column.canEdit;
|
37774
|
-
var _useTableContext = (0,_context__WEBPACK_IMPORTED_MODULE_5__.useTableContext)(),
|
37775
|
-
columnStartEditing = _useTableContext.columnStartEditing,
|
37776
|
-
columnDoneEditing = _useTableContext.columnDoneEditing,
|
37777
|
-
getColumnProps = _useTableContext.getColumnProps,
|
37778
|
-
getCellProps = _useTableContext.getCellProps;
|
37779
|
-
var startEditing = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
37780
|
-
columnStartEditing(columnId, rowId);
|
37781
|
-
}, [columnStartEditing, columnId, rowId]);
|
37782
|
-
var doneEditing = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
37783
|
-
columnDoneEditing(columnId, rowId);
|
37784
|
-
}, [columnDoneEditing, columnId, rowId]);
|
37785
|
-
var cellProps = _objectSpread({
|
37786
|
-
$type: type,
|
37787
|
-
$rowDensity: rowDensity,
|
37788
|
-
$canEdit: canEdit,
|
37789
|
-
$isEditing: isEditing,
|
37790
|
-
$isLastRow: isLastRow
|
37791
|
-
}, cell.getCellProps([getColumnProps(column), getCellProps(cell)]));
|
37792
|
-
cellProps.className = (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(null, null, (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(column.className, {
|
37793
|
-
cell: true
|
37794
|
-
}), (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(className, {
|
37795
|
-
tableCell: true
|
37796
|
-
}), cellProps.className);
|
37797
|
-
if (canEdit) {
|
37798
|
-
cellProps.onClick = function (e) {
|
37799
|
-
e.stopPropagation();
|
37800
|
-
startEditing();
|
37801
|
-
};
|
37802
|
-
}
|
37803
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(StyledCell, cellProps, cell.render('Cell', {
|
37804
|
-
row: row,
|
37805
|
-
isEditing: isEditing,
|
37806
|
-
startEditing: startEditing,
|
37807
|
-
doneEditing: doneEditing
|
37808
|
-
}));
|
37809
|
-
};
|
37810
|
-
Cell.displayName = 'Cell';
|
37811
|
-
var StyledCell = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withConfig({
|
37812
|
-
displayName: "StyledCell",
|
37813
|
-
componentId: "sc-b034il-0"
|
37814
|
-
})(["padding:5px 15px;overflow-x:clip;", " background-color:", ";border:1px solid ", ";", ":hover &{background-color:", ";border-left-color:", ";border-right-color:", ";}", " ", " &[data-pinned-last]{", "}", ""], function (props) {
|
37815
|
-
return props.$type == 'number' ? 'text-align: right;' : null;
|
37816
|
-
}, _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.white, _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.white, _table_row__WEBPACK_IMPORTED_MODULE_6__.TableRow, _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_2, _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_2, _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_2, function (props) {
|
37817
|
-
if (props.$isFooter) return "border-top-color: ".concat(_theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_3, ";");
|
37818
|
-
if (props.$isLastRow) return "border-bottom-color: ".concat(_theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_3, ";");
|
37819
|
-
}, function (props) {
|
37820
|
-
if (props.$rowDensity == 'diamond_hand') {
|
37821
|
-
return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["padding-top:11px;padding-bottom:11px;"]);
|
37822
|
-
}
|
37823
|
-
if (props.$rowDensity == 'white_spaced') {
|
37824
|
-
return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["padding-top:25px;padding-bottom:25px;"]);
|
37825
|
-
}
|
37826
|
-
}, function (props) {
|
37827
|
-
if (props.$canEdit && props.$isEditing) {
|
37828
|
-
return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["box-shadow:2px 0px 4px -2px rgba(24,39,75,0.12),4px 0px 4px -2px rgba(24,39,75,0.08),inset 0px 0px 0px 3px rgba(0,106,220,0.4);"]);
|
37829
|
-
}
|
37830
|
-
return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["box-shadow:2px 0px 4px -2px rgba(24,39,75,0.12),4px 0px 4px -2px rgba(24,39,75,0.08);"]);
|
37831
|
-
}, function (props) {
|
37832
|
-
if (props.$canEdit) {
|
37833
|
-
if (props.$isEditing) {
|
37834
|
-
return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["border:1px solid ", " !important;box-shadow:inset 0px 0px 0px 3px rgba(0,106,220,0.4);z-index:", ";"], _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.blue_11, _constants__WEBPACK_IMPORTED_MODULE_4__.Z_INDEX.editingCell);
|
37835
|
-
}
|
37836
|
-
return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["&:hover{border-color:", " !important;}"], _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_9);
|
37837
|
-
}
|
37838
|
-
});
|
37839
|
-
StyledCell.displayName = 'StyledCell';
|
37840
|
-
|
37841
|
-
/***/ }),
|
37842
|
-
|
37843
37723
|
/***/ "./src/table/context.js":
|
37844
37724
|
/*!******************************!*\
|
37845
37725
|
!*** ./src/table/context.js ***!
|
@@ -38054,8 +37934,6 @@ Provider.propTypes = {
|
|
38054
37934
|
Header: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().node), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)]),
|
38055
37935
|
Cell: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
38056
37936
|
Footer: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().node), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)]),
|
38057
|
-
// can_sort: PT.oneOfType([PT.bool, PT.number]),
|
38058
|
-
// on_sort: PT.func,
|
38059
37937
|
canSort: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
38060
37938
|
disableHiding: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
38061
37939
|
width: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number),
|
@@ -38067,7 +37945,6 @@ Provider.propTypes = {
|
|
38067
37945
|
className: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
38068
37946
|
})),
|
38069
37947
|
data: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().array),
|
38070
|
-
// columnsSort: PT.object,
|
38071
37948
|
columnSort: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object),
|
38072
37949
|
onColumnSortChanged: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
38073
37950
|
pageSize: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number),
|
@@ -38084,6 +37961,7 @@ Provider.propTypes = {
|
|
38084
37961
|
disableResizing: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
38085
37962
|
disablePinning: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
38086
37963
|
canEdit: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
37964
|
+
isCellEditable: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
38087
37965
|
hideHeader: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
38088
37966
|
hideFooter: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
|
38089
37967
|
getHeaderProps: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
|
@@ -38623,9 +38501,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
38623
38501
|
/* harmony export */ });
|
38624
38502
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
38625
38503
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
38626
|
-
/* harmony import */ var
|
38627
|
-
/* harmony import */ var
|
38628
|
-
/* harmony import */ var
|
38504
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "styled-components");
|
38505
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
|
38506
|
+
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
|
38507
|
+
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
|
38508
|
+
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./context */ "./src/table/context.js");
|
38629
38509
|
// LICENSE_CODE ZON
|
38630
38510
|
|
38631
38511
|
|
@@ -38644,11 +38524,12 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
38644
38524
|
|
38645
38525
|
|
38646
38526
|
|
38527
|
+
|
38647
38528
|
var TableFooter = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (props, ref) {
|
38648
38529
|
var className = props.className,
|
38649
38530
|
style = props.style,
|
38650
38531
|
rowDensity = props.rowDensity;
|
38651
|
-
var _useTableContext = (0,
|
38532
|
+
var _useTableContext = (0,_context__WEBPACK_IMPORTED_MODULE_4__.useTableContext)(),
|
38652
38533
|
footerGroups = _useTableContext.footerGroups,
|
38653
38534
|
allColumns = _useTableContext.allColumns,
|
38654
38535
|
hideFooter = _useTableContext.hideFooter;
|
@@ -38660,7 +38541,7 @@ var TableFooter = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forw
|
|
38660
38541
|
ref: ref,
|
38661
38542
|
role: "rowgroup",
|
38662
38543
|
"data-rowgroup-type": "footer",
|
38663
|
-
className: (0,
|
38544
|
+
className: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(className, {
|
38664
38545
|
tableFooter: true
|
38665
38546
|
}),
|
38666
38547
|
style: style
|
@@ -38668,11 +38549,11 @@ var TableFooter = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forw
|
|
38668
38549
|
var _group$getFooterGroup = group.getFooterGroupProps(),
|
38669
38550
|
key = _group$getFooterGroup.key,
|
38670
38551
|
rest = _objectWithoutProperties(_group$getFooterGroup, _excluded);
|
38671
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
38552
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(TableFooterRow, _extends({
|
38672
38553
|
key: key,
|
38673
38554
|
role: "row"
|
38674
38555
|
}, rest, {
|
38675
|
-
className: (0,
|
38556
|
+
className: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(className, {
|
38676
38557
|
footerRow: true
|
38677
38558
|
})
|
38678
38559
|
}), group.headers.map(function (column) {
|
@@ -38680,7 +38561,7 @@ var TableFooter = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forw
|
|
38680
38561
|
column: column,
|
38681
38562
|
key: column.getFooterProps().key,
|
38682
38563
|
rowDensity: rowDensity,
|
38683
|
-
className: (0,
|
38564
|
+
className: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(className, {
|
38684
38565
|
footerCell: true
|
38685
38566
|
})
|
38686
38567
|
});
|
@@ -38688,28 +38569,47 @@ var TableFooter = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forw
|
|
38688
38569
|
}));
|
38689
38570
|
});
|
38690
38571
|
TableFooter.displayName = 'TableFooter';
|
38572
|
+
var TableFooterRow = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withConfig({
|
38573
|
+
displayName: "TableFooterRow",
|
38574
|
+
componentId: "sc-12b7s5j-0"
|
38575
|
+
})(["border-top:1px solid ", ";"], _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_3);
|
38691
38576
|
var FooterCell = function FooterCell(props) {
|
38692
38577
|
var className = props.className,
|
38693
38578
|
column = props.column,
|
38694
38579
|
rowDensity = props.rowDensity;
|
38695
38580
|
var _column$type = column.type,
|
38696
|
-
type = _column$type === void 0 ? 'string' : _column$type
|
38697
|
-
|
38581
|
+
type = _column$type === void 0 ? 'string' : _column$type,
|
38582
|
+
isLastPinned = column.isLastPinned;
|
38583
|
+
var _useTableContext2 = (0,_context__WEBPACK_IMPORTED_MODULE_4__.useTableContext)(),
|
38698
38584
|
getColumnProps = _useTableContext2.getColumnProps,
|
38699
38585
|
getFooterProps = _useTableContext2.getFooterProps;
|
38700
38586
|
var footerProps = _objectSpread({
|
38701
38587
|
$type: type,
|
38702
|
-
$rowDensity: rowDensity
|
38703
|
-
$isFooter: true
|
38588
|
+
$rowDensity: rowDensity
|
38704
38589
|
}, column.getFooterProps([getColumnProps(column), getFooterProps(column)]));
|
38705
|
-
footerProps.className = (0,
|
38590
|
+
footerProps.className = (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(column.className, {
|
38706
38591
|
footer: true
|
38707
38592
|
}, className, footerProps.className);
|
38708
|
-
|
38593
|
+
footerProps.$isLastPinned = isLastPinned;
|
38594
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(FooterCellContent, _extends({
|
38709
38595
|
role: "cell"
|
38710
38596
|
}, footerProps), column.render('Footer'));
|
38711
38597
|
};
|
38712
|
-
|
38598
|
+
var FooterCellContent = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withConfig({
|
38599
|
+
displayName: "FooterCellContent",
|
38600
|
+
componentId: "sc-12b7s5j-1"
|
38601
|
+
})(["padding:5px 15px;overflow-x:clip;", " background-color:", ";", " border-right:", ";"], function (props) {
|
38602
|
+
return props.$type == 'number' ? 'text-align: right;' : null;
|
38603
|
+
}, _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.white, function (props) {
|
38604
|
+
if (props.$rowDensity == 'diamond_hand') {
|
38605
|
+
return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["padding-top:11px;padding-bottom:11px;"]);
|
38606
|
+
}
|
38607
|
+
if (props.$rowDensity == 'white_spaced') {
|
38608
|
+
return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["padding-top:25px;padding-bottom:25px;"]);
|
38609
|
+
}
|
38610
|
+
}, function (props) {
|
38611
|
+
return props.$isLastPinned ? "2px solid ".concat(_theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_3) : 'none';
|
38612
|
+
});
|
38713
38613
|
|
38714
38614
|
/***/ }),
|
38715
38615
|
|
@@ -38743,7 +38643,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
38743
38643
|
|
38744
38644
|
/*jslint react:true*/
|
38745
38645
|
|
38746
|
-
var _excluded = ["key"];
|
38747
38646
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
38748
38647
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
38749
38648
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
@@ -38752,8 +38651,6 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
38752
38651
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
38753
38652
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
38754
38653
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
38755
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
38756
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
38757
38654
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
38758
38655
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
38759
38656
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
@@ -38772,7 +38669,8 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
38772
38669
|
var TableHeader = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (props, ref) {
|
38773
38670
|
var className = props.className,
|
38774
38671
|
compact = props.compact,
|
38775
|
-
left = props.left
|
38672
|
+
left = props.left,
|
38673
|
+
hideLastRowBorder = props.hideLastRowBorder;
|
38776
38674
|
var _useTableContext = (0,_context__WEBPACK_IMPORTED_MODULE_8__.useTableContext)(),
|
38777
38675
|
headerGroups = _useTableContext.headerGroups,
|
38778
38676
|
hideHeader = _useTableContext.hideHeader;
|
@@ -38790,18 +38688,16 @@ var TableHeader = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forw
|
|
38790
38688
|
tableHeader: true,
|
38791
38689
|
'tableHeader--is-compact': compact
|
38792
38690
|
})
|
38793
|
-
}), headerGroups.map(function (group) {
|
38794
|
-
|
38795
|
-
key
|
38796
|
-
|
38797
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", _extends({
|
38798
|
-
key: key
|
38799
|
-
}, rest, {
|
38691
|
+
}), headerGroups.map(function (group, n) {
|
38692
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(TableHeaderRow, _extends({
|
38693
|
+
key: group.getHeaderGroupProps().key
|
38694
|
+
}, group.getHeaderGroupProps(), {
|
38800
38695
|
className: (0,_util__WEBPACK_IMPORTED_MODULE_5__.classNames)(className, {
|
38801
38696
|
headerRow: true
|
38802
|
-
})
|
38803
|
-
|
38804
|
-
|
38697
|
+
}),
|
38698
|
+
$isLast: hideLastRowBorder && n == headerGroups.length - 1
|
38699
|
+
}), group.headers.map(function (header, i) {
|
38700
|
+
var isLast = i == group.length - 1;
|
38805
38701
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(HeaderCell, {
|
38806
38702
|
compact: compact,
|
38807
38703
|
isLast: isLast,
|
@@ -38825,7 +38721,9 @@ var HeaderCell = function HeaderCell(props) {
|
|
38825
38721
|
var id = header.id,
|
38826
38722
|
name = header.name,
|
38827
38723
|
isResizing = header.isResizing,
|
38828
|
-
getResizerProps = header.getResizerProps
|
38724
|
+
getResizerProps = header.getResizerProps,
|
38725
|
+
isPinned = header.isPinned,
|
38726
|
+
isLastPinned = header.isLastPinned;
|
38829
38727
|
var _useTableContext2 = (0,_context__WEBPACK_IMPORTED_MODULE_8__.useTableContext)(),
|
38830
38728
|
getColumnProps = _useTableContext2.getColumnProps,
|
38831
38729
|
getHeaderProps = _useTableContext2.getHeaderProps,
|
@@ -38836,14 +38734,14 @@ var HeaderCell = function HeaderCell(props) {
|
|
38836
38734
|
onColumnSortChanged = _useTableContext2.onColumnSortChanged;
|
38837
38735
|
var sort = columnSort[id];
|
38838
38736
|
var onSortChanged = (0,_util__WEBPACK_IMPORTED_MODULE_5__.firstDefined)(onColumnSortChanged, header.on_sort);
|
38839
|
-
var canSort = (0,_util__WEBPACK_IMPORTED_MODULE_5__.firstDefined)(header.canSort, header.can_sort) && !!
|
38737
|
+
var canSort = (0,_util__WEBPACK_IMPORTED_MODULE_5__.firstDefined)(header.canSort, header.can_sort) && !!onSortChanged;
|
38840
38738
|
var onSort = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
|
38841
38739
|
onSortChanged === null || onSortChanged === void 0 || onSortChanged(id, {
|
38842
38740
|
asc: 'desc',
|
38843
38741
|
desc: undefined,
|
38844
38742
|
none: 'asc'
|
38845
38743
|
}[sort || 'none']);
|
38846
|
-
}, [id, sort,
|
38744
|
+
}, [id, sort, onSortChanged]);
|
38847
38745
|
var canResize = header.canResize && !(fullWidth && isLast) && !compact;
|
38848
38746
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false),
|
38849
38747
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -38851,6 +38749,12 @@ var HeaderCell = function HeaderCell(props) {
|
|
38851
38749
|
setHovered = _useState2[1];
|
38852
38750
|
var iconVisible = canSort && (['asc', 'desc'].includes(sort) || hovered);
|
38853
38751
|
var headerCellProps = header.getHeaderProps([getColumnProps(header), getHeaderProps(header)]);
|
38752
|
+
if (isPinned) {
|
38753
|
+
headerCellProps.style = _objectSpread(_objectSpread({}, headerCellProps.style), {}, {
|
38754
|
+
zIndex: _constants__WEBPACK_IMPORTED_MODULE_7__.Z_INDEX.pinnedColumnHeader
|
38755
|
+
});
|
38756
|
+
}
|
38757
|
+
headerCellProps.$isLastPinned = isLastPinned;
|
38854
38758
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(HeaderCellContent, _extends({}, headerCellProps, {
|
38855
38759
|
className: (0,_util__WEBPACK_IMPORTED_MODULE_5__.classNames)(header.className, {
|
38856
38760
|
header: true
|
@@ -38884,28 +38788,36 @@ var HeaderCell = function HeaderCell(props) {
|
|
38884
38788
|
},
|
38885
38789
|
orderLogic: canOrderColumns && orderLogic,
|
38886
38790
|
onSortChanged: onSortChanged
|
38887
|
-
}), canResize && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(HeaderCellResizer, _extends({}, getResizerProps(), {
|
38791
|
+
})), canResize && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(HeaderCellResizer, _extends({}, getResizerProps(), {
|
38888
38792
|
$isResizing: isResizing
|
38889
|
-
})))
|
38793
|
+
})));
|
38890
38794
|
};
|
38795
|
+
var TableHeaderRow = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
38796
|
+
displayName: "TableHeaderRow",
|
38797
|
+
componentId: "sc-8zg5t0-0"
|
38798
|
+
})(["border-bottom:", ";"], function (props) {
|
38799
|
+
return props.$isLast ? 'none' : "1px solid ".concat(_theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_3);
|
38800
|
+
});
|
38891
38801
|
var HeaderCellContent = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
38892
38802
|
displayName: "HeaderCellContent",
|
38893
|
-
componentId: "sc-8zg5t0-
|
38894
|
-
})(["background-color:", ";&:hover{background-color:", ";}border-
|
38803
|
+
componentId: "sc-8zg5t0-1"
|
38804
|
+
})(["background-color:", ";&:hover{background-color:", ";}border-right:", ";"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.white, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_2, function (props) {
|
38805
|
+
return props.$isLastPinned ? "2px solid ".concat(_theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_3) : 'none';
|
38806
|
+
});
|
38895
38807
|
var HeaderCellWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
38896
38808
|
displayName: "HeaderCellWrapper",
|
38897
|
-
componentId: "sc-8zg5t0-
|
38809
|
+
componentId: "sc-8zg5t0-2"
|
38898
38810
|
})(["display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:8px 8px 8px 16px;"]);
|
38899
38811
|
var HeaderCellLeft = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
38900
38812
|
displayName: "HeaderCellLeft",
|
38901
|
-
componentId: "sc-8zg5t0-
|
38813
|
+
componentId: "sc-8zg5t0-3"
|
38902
38814
|
})(["display:flex;flex-direction:row;align-items:center;padding:0px;gap:4px;min-height:16px;overflow-x:clip;"]);
|
38903
38815
|
var HeaderCellResizer = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
38904
38816
|
displayName: "HeaderCellResizer",
|
38905
|
-
componentId: "sc-8zg5t0-
|
38817
|
+
componentId: "sc-8zg5t0-4"
|
38906
38818
|
})(["display:inline-block;width:10px;height:100%;position:absolute;right:0;top:0;transform:translateX(50%);z-index:", ";touch-action:none;", ""], _constants__WEBPACK_IMPORTED_MODULE_7__.Z_INDEX.cellResizer, function (props) {
|
38907
38819
|
if (props.$isResizing) {
|
38908
|
-
return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["&:after{content:\" \";display:block;width:2px;height:
|
38820
|
+
return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["&:after{content:\" \";display:block;width:2px;height:100%;background:", ";position:absolute;bottom:0;left:4px;}"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.blue_10);
|
38909
38821
|
}
|
38910
38822
|
});
|
38911
38823
|
var renderCellContent = function renderCellContent(column, type, props) {
|
@@ -39699,20 +39611,13 @@ var cellStylesPinned = {
|
|
39699
39611
|
};
|
39700
39612
|
var getPinnedProps = function getPinnedProps(header, instance) {
|
39701
39613
|
var style = {};
|
39702
|
-
var dataAttrs = {};
|
39703
39614
|
checkPinnedErrors(instance.columns);
|
39704
|
-
if (getPinnedValue(header)) {
|
39705
|
-
|
39706
|
-
|
39707
|
-
|
39708
|
-
style = _objectSpread(_objectSpread({}, style), {}, {
|
39709
|
-
left: (0,_utils__WEBPACK_IMPORTED_MODULE_2__.toPixel)(header.totalLeft)
|
39710
|
-
});
|
39711
|
-
if (columnIsLastPinned(header.id, headers)) dataAttrs['data-pinned-last'] = true;
|
39712
|
-
}
|
39713
|
-
return _objectSpread({
|
39615
|
+
if (getPinnedValue(header)) style = assign({}, cellStylesPinned, {
|
39616
|
+
left: (0,_utils__WEBPACK_IMPORTED_MODULE_2__.toPixel)(header.totalLeft)
|
39617
|
+
});
|
39618
|
+
return {
|
39714
39619
|
style: style
|
39715
|
-
}
|
39620
|
+
};
|
39716
39621
|
};
|
39717
39622
|
var usePinnedReducer = function usePinnedReducer(state, action) {
|
39718
39623
|
if (action.type == react_table__WEBPACK_IMPORTED_MODULE_1__.actions.init) return _objectSpread({
|
@@ -39758,10 +39663,12 @@ var usePinnedInstance = function usePinnedInstance(instance) {
|
|
39758
39663
|
return col.id;
|
39759
39664
|
}));
|
39760
39665
|
}, [dispatch, columns, setColumnOrder]);
|
39761
|
-
flatHeaders.forEach(function (
|
39762
|
-
|
39763
|
-
return togglePinColumn(
|
39666
|
+
flatHeaders.forEach(function (header) {
|
39667
|
+
header.togglePinned = function (value) {
|
39668
|
+
return togglePinColumn(header.id, value);
|
39764
39669
|
};
|
39670
|
+
var headers = findHeadersSameLevel(header, flatHeaders);
|
39671
|
+
header.isLastPinned = columnIsLastPinned(header.id, headers);
|
39765
39672
|
});
|
39766
39673
|
assign(instance, {
|
39767
39674
|
togglePinColumn: togglePinColumn
|
@@ -39867,9 +39774,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
39867
39774
|
/* harmony export */ });
|
39868
39775
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
39869
39776
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
39870
|
-
/* harmony import */ var
|
39871
|
-
/* harmony import */ var
|
39872
|
-
/* harmony import */ var
|
39777
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "styled-components");
|
39778
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
|
39779
|
+
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
|
39780
|
+
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
|
39781
|
+
/* harmony import */ var _table_cell__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./table_cell */ "./src/table/table_cell.js");
|
39873
39782
|
// LICENSE_CODE ZON
|
39874
39783
|
|
39875
39784
|
|
@@ -39879,6 +39788,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
39879
39788
|
|
39880
39789
|
|
39881
39790
|
|
39791
|
+
|
39882
39792
|
var preventOnClickClass = 'tableCell--preventOnClick';
|
39883
39793
|
var renderRow = function renderRow(opt) {
|
39884
39794
|
var className = opt.className,
|
@@ -39886,35 +39796,36 @@ var renderRow = function renderRow(opt) {
|
|
39886
39796
|
onRowClick = opt.onRowClick,
|
39887
39797
|
getRowProps = opt.getRowProps,
|
39888
39798
|
rowDensity = opt.rowDensity,
|
39889
|
-
|
39799
|
+
isLast = opt.isLast,
|
39890
39800
|
renderRowSubComponent = opt.renderRowSubComponent;
|
39891
39801
|
var rowProps = row.getRowProps(getRowProps === null || getRowProps === void 0 ? void 0 : getRowProps(row));
|
39892
39802
|
var onClick = onRowClick ? function (evt) {
|
39893
39803
|
if (!evt.target.matches(".".concat(preventOnClickClass, " *"))) onRowClick(row.original, evt);
|
39894
39804
|
} : undefined;
|
39895
39805
|
var cursor = onRowClick ? 'pointer' : undefined;
|
39896
|
-
var tableRow = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
39806
|
+
var tableRow = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(TableRow, _extends({}, rowProps, {
|
39897
39807
|
onClick: onClick,
|
39898
|
-
className: (0,
|
39808
|
+
className: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(className, {
|
39899
39809
|
tableRow: true,
|
39900
|
-
'tableRow--is-pinned': row.isPinned
|
39810
|
+
'tableRow--is-pinned': row.isPinned,
|
39811
|
+
'tableRow--is-last': isLast
|
39901
39812
|
}, rowProps.className),
|
39902
|
-
$cursor: cursor
|
39813
|
+
$cursor: cursor,
|
39814
|
+
$isLast: isLast,
|
39815
|
+
$rowDensity: rowDensity
|
39903
39816
|
}), row.cells.map(function (cell) {
|
39904
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
39817
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_table_cell__WEBPACK_IMPORTED_MODULE_4__.TableCell, {
|
39905
39818
|
key: cell.getCellProps().key,
|
39906
39819
|
cell: cell,
|
39907
|
-
className: className
|
39908
|
-
rowDensity: rowDensity,
|
39909
|
-
isLastRow: isLastRow
|
39820
|
+
className: className
|
39910
39821
|
});
|
39911
39822
|
}));
|
39912
39823
|
if (!row.isExpanded || !renderRowSubComponent) return tableRow;
|
39913
39824
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
|
39914
39825
|
key: "".concat(rowProps.key, "_fragment")
|
39915
|
-
}, tableRow, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
39826
|
+
}, tableRow, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(TableRow, _extends({}, rowProps, {
|
39916
39827
|
key: "".concat(rowProps.key, "_subcomponent"),
|
39917
|
-
className: (0,
|
39828
|
+
className: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(className, {
|
39918
39829
|
rowSubComponent: true
|
39919
39830
|
}, rowProps.className)
|
39920
39831
|
}), renderRowSubComponent({
|
@@ -39922,6 +39833,19 @@ var renderRow = function renderRow(opt) {
|
|
39922
39833
|
rowProps: rowProps
|
39923
39834
|
})));
|
39924
39835
|
};
|
39836
|
+
var TableRow = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withConfig({
|
39837
|
+
displayName: "TableRow",
|
39838
|
+
componentId: "sc-vrm5bg-0"
|
39839
|
+
})(["cursor:", ";border-bottom:", ";& ", "{height:", "px;}&:hover ", "{background-color:", ";}"], function (props) {
|
39840
|
+
return props.$cursor;
|
39841
|
+
}, function (props) {
|
39842
|
+
return props.$isLast ? 'none' : "1px solid ".concat(_theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_3);
|
39843
|
+
}, _table_cell__WEBPACK_IMPORTED_MODULE_4__.CellContent, function (props) {
|
39844
|
+
return {
|
39845
|
+
diamond_hand: '44',
|
39846
|
+
white_spaced: '72'
|
39847
|
+
}[props.$rowDensity] || '32';
|
39848
|
+
}, _table_cell__WEBPACK_IMPORTED_MODULE_4__.TableCellContent, _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_2);
|
39925
39849
|
|
39926
39850
|
/***/ }),
|
39927
39851
|
|
@@ -40358,11 +40282,13 @@ var StickyHeader = function StickyHeader(props) {
|
|
40358
40282
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_header__WEBPACK_IMPORTED_MODULE_8__.TableHeader, {
|
40359
40283
|
left: left,
|
40360
40284
|
className: className,
|
40361
|
-
compact: true
|
40362
|
-
|
40285
|
+
compact: true,
|
40286
|
+
hideLastRowBorder: pinnedRows.length == 0
|
40287
|
+
}), pinnedRows.map(function (row, i) {
|
40363
40288
|
prepareRow(row);
|
40364
40289
|
return (0,_render_row__WEBPACK_IMPORTED_MODULE_9__.renderRow)({
|
40365
40290
|
row: row,
|
40291
|
+
isLast: i == pinnedRows.length - 1,
|
40366
40292
|
columnStartEditing: columnStartEditing,
|
40367
40293
|
columnDoneEditing: columnDoneEditing,
|
40368
40294
|
rowDensity: rowDensity,
|
@@ -40371,12 +40297,10 @@ var StickyHeader = function StickyHeader(props) {
|
|
40371
40297
|
});
|
40372
40298
|
}));
|
40373
40299
|
};
|
40374
|
-
StickyHeader.displayName = 'StickyHeader';
|
40375
40300
|
var StickyHeaderWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
|
40376
40301
|
displayName: "StickyHeaderWrapper",
|
40377
40302
|
componentId: "sc-hh47bp-0"
|
40378
40303
|
})(["position:fixed;z-index:", ";overflow-x:hidden;box-shadow:0px 2px 4px -2px rgba(24,39,75,0.12);"], _constants__WEBPACK_IMPORTED_MODULE_5__.Z_INDEX.stickyHeader);
|
40379
|
-
StickyHeaderWrapper.displayName = 'StickyHeaderWrapper';
|
40380
40304
|
|
40381
40305
|
/***/ }),
|
40382
40306
|
|
@@ -40630,12 +40554,10 @@ var TableWrapper = styled_components__WEBPACK_IMPORTED_MODULE_3___default().div.
|
|
40630
40554
|
displayName: "TableWrapper",
|
40631
40555
|
componentId: "sc-ebeoik-0"
|
40632
40556
|
})(["width:100%;border:1px solid ", ";border-radius:4px;overflow-x:auto;", ""], _theme__WEBPACK_IMPORTED_MODULE_4__["default"].color.gray_3, _theme__WEBPACK_IMPORTED_MODULE_4__["default"].scrollbars.thin);
|
40633
|
-
TableWrapper.displayName = 'TableWrapper';
|
40634
40557
|
var StyledTable = styled_components__WEBPACK_IMPORTED_MODULE_3___default().div.withConfig({
|
40635
40558
|
displayName: "StyledTable",
|
40636
40559
|
componentId: "sc-ebeoik-1"
|
40637
40560
|
})(["min-width:100%;border-spacing:0;border-collapse:separate;"]);
|
40638
|
-
StyledTable.displayName = 'StyledTable';
|
40639
40561
|
var TableBody = function TableBody(props) {
|
40640
40562
|
var className = props.className,
|
40641
40563
|
rowDensity = props.rowDensity,
|
@@ -40655,14 +40577,14 @@ var TableBody = function TableBody(props) {
|
|
40655
40577
|
var body = function () {
|
40656
40578
|
if (isLoading) return (0,_util__WEBPACK_IMPORTED_MODULE_5__.flexRender)(LoadingComp);
|
40657
40579
|
if (!page.length) return (0,_util__WEBPACK_IMPORTED_MODULE_5__.flexRender)(NoDataComp);
|
40658
|
-
return page.map(function (row, i
|
40580
|
+
return page.map(function (row, i) {
|
40659
40581
|
prepareRow(row);
|
40660
40582
|
if (row.isPinned) return null;
|
40661
40583
|
return (0,_render_row__WEBPACK_IMPORTED_MODULE_9__.renderRow)({
|
40662
40584
|
row: row,
|
40663
40585
|
rowDensity: rowDensity,
|
40664
40586
|
onRowClick: onRowClick,
|
40665
|
-
|
40587
|
+
isLast: i == page.length - 1,
|
40666
40588
|
className: className,
|
40667
40589
|
getRowProps: getRowProps,
|
40668
40590
|
renderRowSubComponent: renderRowSubComponent
|
@@ -40698,29 +40620,107 @@ var TableBodyRowGroup = styled_components__WEBPACK_IMPORTED_MODULE_3___default()
|
|
40698
40620
|
|
40699
40621
|
/***/ }),
|
40700
40622
|
|
40701
|
-
/***/ "./src/table/
|
40702
|
-
|
40703
|
-
!*** ./src/table/
|
40704
|
-
|
40623
|
+
/***/ "./src/table/table_cell.js":
|
40624
|
+
/*!*********************************!*\
|
40625
|
+
!*** ./src/table/table_cell.js ***!
|
40626
|
+
\*********************************/
|
40705
40627
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
40706
40628
|
|
40707
40629
|
"use strict";
|
40708
40630
|
__webpack_require__.r(__webpack_exports__);
|
40709
40631
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
40710
|
-
/* harmony export */
|
40632
|
+
/* harmony export */ CellContent: () => (/* binding */ CellContent),
|
40633
|
+
/* harmony export */ EditableCellContent: () => (/* binding */ EditableCellContent),
|
40634
|
+
/* harmony export */ TableCell: () => (/* binding */ TableCell),
|
40635
|
+
/* harmony export */ TableCellContent: () => (/* binding */ TableCellContent)
|
40711
40636
|
/* harmony export */ });
|
40712
|
-
/* harmony import */ var
|
40713
|
-
/* harmony import */ var
|
40637
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
40638
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
40639
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "styled-components");
|
40640
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
|
40641
|
+
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
|
40642
|
+
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
|
40643
|
+
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./context */ "./src/table/context.js");
|
40714
40644
|
// LICENSE_CODE ZON
|
40715
40645
|
|
40716
40646
|
|
40717
40647
|
/*jslint react:true*/
|
40648
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
40718
40649
|
|
40719
|
-
|
40720
|
-
|
40721
|
-
|
40722
|
-
|
40723
|
-
|
40650
|
+
|
40651
|
+
|
40652
|
+
|
40653
|
+
|
40654
|
+
var TableCell = function TableCell(props) {
|
40655
|
+
var className = props.className,
|
40656
|
+
cell = props.cell;
|
40657
|
+
var row = cell.row,
|
40658
|
+
column = cell.column,
|
40659
|
+
isEditing = cell.isEditing;
|
40660
|
+
var rowId = row.id;
|
40661
|
+
var columnId = column.id,
|
40662
|
+
_column$type = column.type,
|
40663
|
+
type = _column$type === void 0 ? 'string' : _column$type,
|
40664
|
+
canEdit = column.canEdit,
|
40665
|
+
isLastPinned = column.isLastPinned;
|
40666
|
+
var _useTableContext = (0,_context__WEBPACK_IMPORTED_MODULE_4__.useTableContext)(),
|
40667
|
+
columnStartEditing = _useTableContext.columnStartEditing,
|
40668
|
+
columnDoneEditing = _useTableContext.columnDoneEditing,
|
40669
|
+
getColumnProps = _useTableContext.getColumnProps,
|
40670
|
+
getCellProps = _useTableContext.getCellProps,
|
40671
|
+
isCellEditable = _useTableContext.isCellEditable;
|
40672
|
+
var cellEditable = canEdit && (isCellEditable ? isCellEditable(cell) : true);
|
40673
|
+
var startEditing = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
40674
|
+
columnStartEditing(columnId, rowId);
|
40675
|
+
}, [columnStartEditing, columnId, rowId]);
|
40676
|
+
var doneEditing = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
|
40677
|
+
columnDoneEditing(columnId, rowId);
|
40678
|
+
}, [columnDoneEditing, columnId, rowId]);
|
40679
|
+
var onClick = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (evt) {
|
40680
|
+
if (cellEditable) {
|
40681
|
+
evt.stopPropagation();
|
40682
|
+
startEditing();
|
40683
|
+
}
|
40684
|
+
}, [cellEditable, startEditing]);
|
40685
|
+
var cellProps = cell.getCellProps([getColumnProps(column), getCellProps(cell)]);
|
40686
|
+
cellProps.className = (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(null, null, (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(column.className, {
|
40687
|
+
cell: true
|
40688
|
+
}), (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(className, {
|
40689
|
+
tableCell: true
|
40690
|
+
}), (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(className, {
|
40691
|
+
'tableCell--is-editable': cellEditable
|
40692
|
+
}), cellProps.className);
|
40693
|
+
var Comp = cellEditable ? EditableCellContent : CellContent;
|
40694
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(TableCellContent, _extends({
|
40695
|
+
$isLastPinned: isLastPinned
|
40696
|
+
}, cellProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Comp, {
|
40697
|
+
$type: type,
|
40698
|
+
$isEditing: isEditing,
|
40699
|
+
onClick: onClick
|
40700
|
+
}, cell.render('Cell', {
|
40701
|
+
row: row,
|
40702
|
+
isEditing: isEditing,
|
40703
|
+
startEditing: startEditing,
|
40704
|
+
doneEditing: doneEditing
|
40705
|
+
})));
|
40706
|
+
};
|
40707
|
+
var TableCellContent = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withConfig({
|
40708
|
+
displayName: "TableCellContent",
|
40709
|
+
componentId: "sc-1gdt4qg-0"
|
40710
|
+
})(["background-color:", ";border-right:", ";"], _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.white, function (props) {
|
40711
|
+
return props.$isLastPinned ? "2px solid ".concat(_theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_3) : 'none';
|
40712
|
+
});
|
40713
|
+
var CellContent = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withConfig({
|
40714
|
+
displayName: "CellContent",
|
40715
|
+
componentId: "sc-1gdt4qg-1"
|
40716
|
+
})(["box-sizing:border-box;display:flex;align-items:center;padding:0 15px;overflow:clip;", ""], function (props) {
|
40717
|
+
return props.$type == 'number' ? 'text-align: right;' : null;
|
40718
|
+
});
|
40719
|
+
var EditableCellContent = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(CellContent).withConfig({
|
40720
|
+
displayName: "EditableCellContent",
|
40721
|
+
componentId: "sc-1gdt4qg-2"
|
40722
|
+
})(["padding:0 14px;border:1px solid transparent;&:hover{background-color:", ";border-color:", ";}", ""], _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.white, _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.gray_9, function (props) {
|
40723
|
+
return props.$isEditing ? (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["background-color:", ";border:1px solid ", " !important;box-shadow:inset 0px 0px 0px 3px rgba(0,106,220,0.4);"], _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.white, _theme__WEBPACK_IMPORTED_MODULE_2__["default"].color.blue_11) : undefined;
|
40724
40724
|
});
|
40725
40725
|
|
40726
40726
|
/***/ }),
|