@luminati-io/uikit 3.4.11 → 3.4.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -33129,13 +33129,13 @@ var DragDrop = function DragDrop(props) {
33129
33129
  return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, item.id, item));
33130
33130
  }, {});
33131
33131
  }, [items]);
33132
- return /*#__PURE__*/React.createElement(react_beautiful_dnd__WEBPACK_IMPORTED_MODULE_4__.DragDropContext, {
33132
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(react_beautiful_dnd__WEBPACK_IMPORTED_MODULE_4__.DragDropContext, {
33133
33133
  onDragEnd: onDragEnd
33134
- }, /*#__PURE__*/React.createElement(_layout__WEBPACK_IMPORTED_MODULE_2__.Flex, {
33134
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_2__.Flex, {
33135
33135
  flex_direction: direction,
33136
33136
  gap: "6px"
33137
33137
  }, value.map(function (itemList, i) {
33138
- return /*#__PURE__*/React.createElement(_droppable__WEBPACK_IMPORTED_MODULE_3__.DroppableArea, {
33138
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_droppable__WEBPACK_IMPORTED_MODULE_3__.DroppableArea, {
33139
33139
  key: i,
33140
33140
  dropIndex: i,
33141
33141
  items: itemList.map(function (id) {
@@ -34402,7 +34402,7 @@ __webpack_require__.r(__webpack_exports__);
34402
34402
  /*jslint react:true*/
34403
34403
  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); }
34404
34404
  var _excluded = ["className", "classNamePrefix", "value", "onChange", "disabled", "options", "variant", "size", "label", "labelIcon", "helperText", "invalid", "required", "necessityIndicator"],
34405
- _excluded2 = ["classNamePrefix", "value", "checked", "onClick", "label", "disabled", "size", "tooltip", "verticalAlign"];
34405
+ _excluded2 = ["classNamePrefix", "value", "checked", "onClick", "label", "disabled", "size", "tooltip", "interactive_tooltip", "verticalAlign"];
34406
34406
  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); }
34407
34407
  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; }
34408
34408
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
@@ -34514,6 +34514,7 @@ var Radio = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef
34514
34514
  disabled = props.disabled,
34515
34515
  size = props.size,
34516
34516
  tooltip = props.tooltip,
34517
+ interactive_tooltip = props.interactive_tooltip,
34517
34518
  verticalAlign = props.verticalAlign,
34518
34519
  rest = _objectWithoutProperties(props, _excluded2);
34519
34520
  var labelId = (0,_hooks__WEBPACK_IMPORTED_MODULE_3__.useLabelId)(props.id);
@@ -34521,7 +34522,8 @@ var Radio = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef
34521
34522
  if (!disabled) onClick === null || onClick === void 0 || onClick(value, evt);
34522
34523
  };
34523
34524
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_tooltip__WEBPACK_IMPORTED_MODULE_6__.Tooltip, {
34524
- tooltip: tooltip
34525
+ tooltip: tooltip,
34526
+ interactive: interactive_tooltip
34525
34527
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(RadioWrapper, _extends({
34526
34528
  ref: ref,
34527
34529
  className: (0,_util__WEBPACK_IMPORTED_MODULE_8__.classNames)(classNamePrefix, _defineProperty(_defineProperty({
@@ -37859,13 +37861,14 @@ __webpack_require__.r(__webpack_exports__);
37859
37861
  /* harmony import */ var _pinned_columns__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./pinned_columns */ "./src/table/pinned_columns.js");
37860
37862
  /* harmony import */ var _expandable_rows__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./expandable_rows */ "./src/table/expandable_rows.js");
37861
37863
  /* harmony import */ var _select_rows__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./select_rows */ "./src/table/select_rows.js");
37862
- /* harmony import */ var _order_logic__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./order_logic */ "./src/table/order_logic.js");
37864
+ /* harmony import */ var _row_menu__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./row_menu */ "./src/table/row_menu.js");
37865
+ /* harmony import */ var _order_logic__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./order_logic */ "./src/table/order_logic.js");
37863
37866
  // LICENSE_CODE ZON
37864
37867
 
37865
37868
 
37866
37869
  /*jslint react:true*/
37867
37870
  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); }
37868
- var _excluded = ["data", "columnsSort", "pageSize", "pageSizes", "children", "stateManager", "hooks", "NoDataComp", "LoadingComp", "ExpandHandleComp", "noDataText", "loadingText", "isLoading", "onPageChange", "manualPagination", "totalCount", "paginateExpandedRows", "getHeaderProps", "getColumnProps", "getRowProps", "getCellProps", "getFooterProps", "selectedRowIds", "canOrderColumns"];
37871
+ var _excluded = ["data", "columnsSort", "pageSize", "pageSizes", "children", "stateManager", "hooks", "NoDataComp", "LoadingComp", "ExpandHandleComp", "noDataText", "loadingText", "isLoading", "onPageChange", "manualPagination", "totalCount", "paginateExpandedRows", "getHeaderProps", "getColumnProps", "getRowProps", "getCellProps", "getFooterProps", "selectedRowIds", "canOrderColumns", "rowActions"];
37869
37872
  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; }
37870
37873
  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; }
37871
37874
  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; }
@@ -37895,6 +37898,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
37895
37898
 
37896
37899
 
37897
37900
 
37901
+
37898
37902
  var assign = Object.assign;
37899
37903
  var defaultPropGetter = function defaultPropGetter() {
37900
37904
  return {};
@@ -37955,6 +37959,7 @@ var Provider = function Provider(props) {
37955
37959
  selectedRowIds = props.selectedRowIds,
37956
37960
  _props$canOrderColumn = props.canOrderColumns,
37957
37961
  canOrderColumns = _props$canOrderColumn === void 0 ? false : _props$canOrderColumn,
37962
+ rowActions = props.rowActions,
37958
37963
  rest = _objectWithoutProperties(props, _excluded);
37959
37964
  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0),
37960
37965
  _useState2 = _slicedToArray(_useState, 2),
@@ -37990,7 +37995,7 @@ var Provider = function Provider(props) {
37990
37995
  getCellProps: getCellProps,
37991
37996
  getFooterProps: getFooterProps,
37992
37997
  ExpandHandleComp: ExpandHandleComp
37993
- }, rest), useCanHideColumns, react_table__WEBPACK_IMPORTED_MODULE_2__.useExpanded, _expandable_rows__WEBPACK_IMPORTED_MODULE_9__.useExpandHandle, react_table__WEBPACK_IMPORTED_MODULE_2__.usePagination, props.fullWidth ? react_table__WEBPACK_IMPORTED_MODULE_2__.useFlexLayout : react_table__WEBPACK_IMPORTED_MODULE_2__.useBlockLayout, react_table__WEBPACK_IMPORTED_MODULE_2__.useResizeColumns, react_table__WEBPACK_IMPORTED_MODULE_2__.useColumnOrder, _pinned_columns__WEBPACK_IMPORTED_MODULE_8__.usePinnedColumns, _editable_columns__WEBPACK_IMPORTED_MODULE_7__.useEditableColumns, react_table__WEBPACK_IMPORTED_MODULE_2__.useRowSelect, _select_rows__WEBPACK_IMPORTED_MODULE_10__.useSelectRows].concat(_toConsumableArray(hooks)));
37998
+ }, rest), useCanHideColumns, react_table__WEBPACK_IMPORTED_MODULE_2__.useExpanded, _expandable_rows__WEBPACK_IMPORTED_MODULE_9__.useExpandHandle, react_table__WEBPACK_IMPORTED_MODULE_2__.usePagination, props.fullWidth ? react_table__WEBPACK_IMPORTED_MODULE_2__.useFlexLayout : react_table__WEBPACK_IMPORTED_MODULE_2__.useBlockLayout, react_table__WEBPACK_IMPORTED_MODULE_2__.useResizeColumns, react_table__WEBPACK_IMPORTED_MODULE_2__.useColumnOrder, _pinned_columns__WEBPACK_IMPORTED_MODULE_8__.usePinnedColumns, _editable_columns__WEBPACK_IMPORTED_MODULE_7__.useEditableColumns, react_table__WEBPACK_IMPORTED_MODULE_2__.useRowSelect, _select_rows__WEBPACK_IMPORTED_MODULE_10__.useSelectRows].concat(_toConsumableArray(rowActions !== null && rowActions !== void 0 && rowActions.length ? [_row_menu__WEBPACK_IMPORTED_MODULE_11__.useRowMenu] : []), _toConsumableArray(hooks)));
37994
37999
  var _table$state = table.state,
37995
38000
  pageIndex = _table$state.pageIndex,
37996
38001
  _pageSize = _table$state.pageSize;
@@ -38007,14 +38012,15 @@ var Provider = function Provider(props) {
38007
38012
  }, [manualPagination, totalCount, pageIndex, _pageSize]);
38008
38013
  var _LoadingComp = useComp(loadingText, LoadingComp);
38009
38014
  var _NoDataComp = useComp(noDataText, NoDataComp);
38010
- var orderLogic = (0,_order_logic__WEBPACK_IMPORTED_MODULE_11__.useOrderLogic)(table);
38015
+ var orderLogic = (0,_order_logic__WEBPACK_IMPORTED_MODULE_12__.useOrderLogic)(table);
38011
38016
  var value = _objectSpread(_objectSpread({
38012
38017
  columnsSort: columnsSort
38013
38018
  }, table), {}, {
38014
38019
  canOrderColumns: canOrderColumns,
38015
38020
  orderLogic: orderLogic,
38016
38021
  LoadingComp: _LoadingComp,
38017
- NoDataComp: _NoDataComp
38022
+ NoDataComp: _NoDataComp,
38023
+ rowActions: rowActions
38018
38024
  });
38019
38025
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(TableContext.Provider, {
38020
38026
  value: value
@@ -38091,7 +38097,10 @@ Provider.propTypes = {
38091
38097
  scrollTarget: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().any),
38092
38098
  className: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
38093
38099
  onSelectRows: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
38094
- canOrderColumns: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)
38100
+ canOrderColumns: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
38101
+ rowActions: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().array),
38102
+ scrollable: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
38103
+ scrollHeight: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
38095
38104
  };
38096
38105
  var calcPageCount = function calcPageCount(totalCount, pageSize) {
38097
38106
  return Math.ceil(totalCount / pageSize);
@@ -38632,8 +38641,9 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
38632
38641
 
38633
38642
 
38634
38643
 
38635
- var TableFooter = function TableFooter(props) {
38644
+ var TableFooter = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (props, ref) {
38636
38645
  var className = props.className,
38646
+ style = props.style,
38637
38647
  rowDensity = props.rowDensity;
38638
38648
  var _useTableContext = (0,_context__WEBPACK_IMPORTED_MODULE_3__.useTableContext)(),
38639
38649
  footerGroups = _useTableContext.footerGroups,
@@ -38644,11 +38654,13 @@ var TableFooter = function TableFooter(props) {
38644
38654
  });
38645
38655
  if (isFooterHidden) return null;
38646
38656
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
38657
+ ref: ref,
38647
38658
  role: "rowgroup",
38648
38659
  "data-rowgroup-type": "footer",
38649
38660
  className: (0,_util__WEBPACK_IMPORTED_MODULE_1__.classNames)(className, {
38650
38661
  tableFooter: true
38651
- })
38662
+ }),
38663
+ style: style
38652
38664
  }, footerGroups.map(function (group) {
38653
38665
  var _group$getFooterGroup = group.getFooterGroupProps(),
38654
38666
  key = _group$getFooterGroup.key,
@@ -38671,7 +38683,7 @@ var TableFooter = function TableFooter(props) {
38671
38683
  });
38672
38684
  }));
38673
38685
  }));
38674
- };
38686
+ });
38675
38687
  TableFooter.displayName = 'TableFooter';
38676
38688
  var FooterCell = function FooterCell(props) {
38677
38689
  var className = props.className,
@@ -38729,6 +38741,7 @@ __webpack_require__.r(__webpack_exports__);
38729
38741
  /*jslint react:true*/
38730
38742
 
38731
38743
  var _excluded = ["key"];
38744
+ 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); }
38732
38745
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
38733
38746
  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."); }
38734
38747
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -38738,6 +38751,11 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
38738
38751
  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); }
38739
38752
  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; }
38740
38753
  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; }
38754
+ 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; }
38755
+ 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; }
38756
+ 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; }
38757
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
38758
+ 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); }
38741
38759
 
38742
38760
 
38743
38761
 
@@ -38748,7 +38766,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
38748
38766
 
38749
38767
 
38750
38768
 
38751
- var TableHeader = function TableHeader(props) {
38769
+ var TableHeader = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (props, ref) {
38752
38770
  var className = props.className,
38753
38771
  compact = props.compact,
38754
38772
  left = props.left;
@@ -38756,11 +38774,12 @@ var TableHeader = function TableHeader(props) {
38756
38774
  headerGroups = _useTableContext.headerGroups,
38757
38775
  hideHeader = _useTableContext.hideHeader;
38758
38776
  if (hideHeader) return null;
38759
- var style = {};
38777
+ var style = _objectSpread({}, props.style);
38760
38778
  if (typeof left != 'undefined') style.marginLeft = (0,_utils__WEBPACK_IMPORTED_MODULE_6__.toPixel)(-left);
38761
38779
  var dataAttributes = {};
38762
38780
  if (!compact) dataAttributes['data-rowgroup-type'] = 'head';
38763
38781
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", _extends({
38782
+ ref: ref,
38764
38783
  role: "rowgroup",
38765
38784
  style: style
38766
38785
  }, dataAttributes, {
@@ -38793,7 +38812,7 @@ var TableHeader = function TableHeader(props) {
38793
38812
  });
38794
38813
  }));
38795
38814
  }));
38796
- };
38815
+ });
38797
38816
  TableHeader.displayName = 'TableHeader';
38798
38817
  var HeaderCell = function HeaderCell(props) {
38799
38818
  var className = props.className,
@@ -38923,6 +38942,7 @@ __webpack_require__.r(__webpack_exports__);
38923
38942
  /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
38924
38943
  /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../constants */ "./src/constants.js");
38925
38944
  /* harmony import */ var _sort_icon__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./sort_icon */ "./src/table/sort_icon.js");
38945
+ /* harmony import */ var _order_logic__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./order_logic */ "./src/table/order_logic.js");
38926
38946
  // LICENSE_CODE ZON
38927
38947
 
38928
38948
 
@@ -38937,11 +38957,13 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
38937
38957
 
38938
38958
 
38939
38959
 
38960
+
38940
38961
  var HeaderFunctions = function HeaderFunctions(props) {
38941
38962
  var header = props.header,
38942
38963
  visible = props.visible,
38943
38964
  onItemClick = props.onItemClick,
38944
38965
  orderLogic = props.orderLogic;
38966
+ if ((0,_order_logic__WEBPACK_IMPORTED_MODULE_9__.isSysColumn)(header.id)) return null;
38945
38967
  var id = header.id,
38946
38968
  on_sort = header.on_sort,
38947
38969
  canHide = header.canHide,
@@ -39176,12 +39198,12 @@ __webpack_require__.r(__webpack_exports__);
39176
39198
 
39177
39199
 
39178
39200
 
39179
- _table__WEBPACK_IMPORTED_MODULE_3__["default"].CustomizeButton = _customize_button__WEBPACK_IMPORTED_MODULE_2__["default"];
39180
- _table__WEBPACK_IMPORTED_MODULE_3__["default"].Pagination = _pagination__WEBPACK_IMPORTED_MODULE_4__["default"];
39181
- _table__WEBPACK_IMPORTED_MODULE_3__["default"].Provider = _context__WEBPACK_IMPORTED_MODULE_1__["default"];
39182
- _table__WEBPACK_IMPORTED_MODULE_3__["default"].withPlugins = _plugin__WEBPACK_IMPORTED_MODULE_5__.withPlugins;
39183
- _table__WEBPACK_IMPORTED_MODULE_3__["default"].plugins = _plugin__WEBPACK_IMPORTED_MODULE_5__.plugins;
39184
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_table__WEBPACK_IMPORTED_MODULE_3__["default"]);
39201
+ _table__WEBPACK_IMPORTED_MODULE_3__.Table.CustomizeButton = _customize_button__WEBPACK_IMPORTED_MODULE_2__["default"];
39202
+ _table__WEBPACK_IMPORTED_MODULE_3__.Table.Pagination = _pagination__WEBPACK_IMPORTED_MODULE_4__["default"];
39203
+ _table__WEBPACK_IMPORTED_MODULE_3__.Table.Provider = _context__WEBPACK_IMPORTED_MODULE_1__["default"];
39204
+ _table__WEBPACK_IMPORTED_MODULE_3__.Table.withPlugins = _plugin__WEBPACK_IMPORTED_MODULE_5__.withPlugins;
39205
+ _table__WEBPACK_IMPORTED_MODULE_3__.Table.plugins = _plugin__WEBPACK_IMPORTED_MODULE_5__.plugins;
39206
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_table__WEBPACK_IMPORTED_MODULE_3__.Table);
39185
39207
 
39186
39208
  /***/ }),
39187
39209
 
@@ -39194,6 +39216,7 @@ _table__WEBPACK_IMPORTED_MODULE_3__["default"].plugins = _plugin__WEBPACK_IMPORT
39194
39216
  "use strict";
39195
39217
  __webpack_require__.r(__webpack_exports__);
39196
39218
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39219
+ /* harmony export */ isSysColumn: () => (/* binding */ isSysColumn),
39197
39220
  /* harmony export */ useOrderLogic: () => (/* binding */ useOrderLogic)
39198
39221
  /* harmony export */ });
39199
39222
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
@@ -39219,6 +39242,10 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
39219
39242
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
39220
39243
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
39221
39244
 
39245
+ var sysColumns = ['selection', 'row_menu'];
39246
+ var isSysColumn = function isSysColumn(id) {
39247
+ return sysColumns.includes(id);
39248
+ };
39222
39249
  var useOrderLogic = function useOrderLogic(table) {
39223
39250
  var _table$state = table.state,
39224
39251
  columnOrder = _table$state.columnOrder,
@@ -39227,7 +39254,12 @@ var useOrderLogic = function useOrderLogic(table) {
39227
39254
  setColumnOrder = table.setColumnOrder,
39228
39255
  setHiddenColumns = table.setHiddenColumns,
39229
39256
  togglePinColumn = table.togglePinColumn,
39230
- allColumns = table.allColumns;
39257
+ _allColumns = table.allColumns;
39258
+ var allColumns = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
39259
+ return _allColumns.filter(function (col) {
39260
+ return !isSysColumn(col.id);
39261
+ });
39262
+ }, [_allColumns]);
39231
39263
  var getColumnCategory = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (id) {
39232
39264
  if (hiddenColumns.includes(id)) return 'hidden';
39233
39265
  if (pinnedColumns.includes(id)) return 'pinned';
@@ -39277,6 +39309,7 @@ var useOrderLogic = function useOrderLogic(table) {
39277
39309
  return setColumnOrder([].concat(_toConsumableArray(pinned), _toConsumableArray(visible), _toConsumableArray(hidden)));
39278
39310
  }, [setColumnOrder]);
39279
39311
  var moveBackwards = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (id) {
39312
+ if (isSysColumn(id)) return;
39280
39313
  var category = getColumnCategory(id);
39281
39314
  var arr = orders[category];
39282
39315
  var n = arr.indexOf(id);
@@ -39288,6 +39321,7 @@ var useOrderLogic = function useOrderLogic(table) {
39288
39321
  setOrders(newOrder);
39289
39322
  }, [getColumnCategory, orders, setOrders]);
39290
39323
  var moveForward = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (id) {
39324
+ if (isSysColumn(id)) return;
39291
39325
  var category = getColumnCategory(id);
39292
39326
  var arr = orders[category];
39293
39327
  var n = arr.indexOf(id);
@@ -39299,6 +39333,7 @@ var useOrderLogic = function useOrderLogic(table) {
39299
39333
  setOrders(newOrder);
39300
39334
  }, [getColumnCategory, orders, setOrders]);
39301
39335
  var moveColumn = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (id, cat, n) {
39336
+ if (isSysColumn(id)) return;
39302
39337
  var srcCat = getColumnCategory(id);
39303
39338
  if (srcCat == cat && orders[srcCat][n] == id) return;
39304
39339
  var newOrders = _objectSpread({}, orders);
@@ -39827,6 +39862,7 @@ var plugins = {};
39827
39862
  "use strict";
39828
39863
  __webpack_require__.r(__webpack_exports__);
39829
39864
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39865
+ /* harmony export */ preventOnClickClass: () => (/* binding */ preventOnClickClass),
39830
39866
  /* harmony export */ renderRow: () => (/* binding */ renderRow)
39831
39867
  /* harmony export */ });
39832
39868
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
@@ -39843,6 +39879,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
39843
39879
 
39844
39880
 
39845
39881
 
39882
+ var preventOnClickClass = 'tableCell--preventOnClick';
39846
39883
  var renderRow = function renderRow(opt) {
39847
39884
  var className = opt.className,
39848
39885
  row = opt.row,
@@ -39853,7 +39890,7 @@ var renderRow = function renderRow(opt) {
39853
39890
  renderRowSubComponent = opt.renderRowSubComponent;
39854
39891
  var rowProps = row.getRowProps(getRowProps === null || getRowProps === void 0 ? void 0 : getRowProps(row));
39855
39892
  var onClick = onRowClick ? function (evt) {
39856
- return onRowClick(row.original, evt);
39893
+ if (!evt.target.matches(".".concat(preventOnClickClass, " *"))) onRowClick(row.original, evt);
39857
39894
  } : undefined;
39858
39895
  var cursor = onRowClick ? 'pointer' : undefined;
39859
39896
  var tableRow = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_table_row__WEBPACK_IMPORTED_MODULE_3__.TableRow, _extends({}, rowProps, {
@@ -39888,6 +39925,158 @@ var renderRow = function renderRow(opt) {
39888
39925
 
39889
39926
  /***/ }),
39890
39927
 
39928
+ /***/ "./src/table/row_menu.js":
39929
+ /*!*******************************!*\
39930
+ !*** ./src/table/row_menu.js ***!
39931
+ \*******************************/
39932
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
39933
+
39934
+ "use strict";
39935
+ __webpack_require__.r(__webpack_exports__);
39936
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39937
+ /* harmony export */ addRowMenuInternalAction: () => (/* binding */ addRowMenuInternalAction),
39938
+ /* harmony export */ useRowMenu: () => (/* binding */ useRowMenu)
39939
+ /* harmony export */ });
39940
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
39941
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
39942
+ /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! styled-components */ "styled-components");
39943
+ /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
39944
+ /* harmony import */ var _hoc__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../hoc */ "./src/hoc/index.js");
39945
+ /* harmony import */ var _icon_button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icon_button */ "./src/icon_button.js");
39946
+ /* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../menu */ "./src/menu/index.js");
39947
+ /* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
39948
+ /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./context */ "./src/table/context.js");
39949
+ /* harmony import */ var _render_row__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./render_row */ "./src/table/render_row.js");
39950
+ // LICENSE_CODE ZON
39951
+
39952
+
39953
+ /*jslint react:true*/
39954
+ 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); }
39955
+ 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; }
39956
+ 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; }
39957
+ 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; }
39958
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
39959
+ 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); }
39960
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
39961
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
39962
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
39963
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
39964
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
39965
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
39966
+
39967
+
39968
+
39969
+
39970
+
39971
+
39972
+
39973
+
39974
+ var RowMenuCell = function RowMenuCell(_ref) {
39975
+ var row = _ref.row,
39976
+ column = _ref.column;
39977
+ var _useTableContext = (0,_context__WEBPACK_IMPORTED_MODULE_6__.useTableContext)(),
39978
+ rowActions = _useTableContext.rowActions;
39979
+ var allActions = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
39980
+ return [].concat(_toConsumableArray(rowActions || []), _toConsumableArray(Object.values(column.internalActions))).map(function (item) {
39981
+ return typeof item == 'function' ? item(row) : item;
39982
+ }).filter(function (item) {
39983
+ return item && !item.hidden && item.key;
39984
+ });
39985
+ }, [rowActions, column, row]);
39986
+ if (!allActions.length) return null;
39987
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(RowMenuCellPopover, {
39988
+ popoverProps: {
39989
+ allActions: allActions,
39990
+ row: row
39991
+ }
39992
+ });
39993
+ };
39994
+ RowMenuCell.displayName = 'RowMenuCell';
39995
+ var RowMenuCellPopover = (0,_hoc__WEBPACK_IMPORTED_MODULE_2__.withPopover)(function (p) {
39996
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icon_button__WEBPACK_IMPORTED_MODULE_3__.IconButton, {
39997
+ onClick: p.popover.toggle,
39998
+ icon: "DotsHorizontal",
39999
+ variant: "ghost",
40000
+ className: _render_row__WEBPACK_IMPORTED_MODULE_7__.preventOnClickClass
40001
+ });
40002
+ }, function (p) {
40003
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(PopoverMenu, {
40004
+ allActions: p.allActions,
40005
+ row: p.row,
40006
+ togglePopover: p.popover.toggle
40007
+ });
40008
+ }, {
40009
+ placement: 'left'
40010
+ });
40011
+ var PopoverMenu = function PopoverMenu(props) {
40012
+ var allActions = props.allActions,
40013
+ row = props.row,
40014
+ togglePopover = props.togglePopover;
40015
+ var items = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
40016
+ return allActions.map(function (item) {
40017
+ var func = item.onClick;
40018
+ var newFunc = function newFunc() {
40019
+ if (!item.keepPopover) togglePopover();
40020
+ func(row);
40021
+ };
40022
+ return _objectSpread(_objectSpread({}, item), {}, {
40023
+ onClick: newFunc
40024
+ });
40025
+ });
40026
+ }, [allActions]);
40027
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_menu__WEBPACK_IMPORTED_MODULE_4__["default"], {
40028
+ className: _render_row__WEBPACK_IMPORTED_MODULE_7__.preventOnClickClass,
40029
+ items: items,
40030
+ size: "sm"
40031
+ });
40032
+ };
40033
+ var RowMenuButton = styled_components__WEBPACK_IMPORTED_MODULE_1___default().button.withConfig({
40034
+ displayName: "RowMenuButton",
40035
+ componentId: "sc-q7kjip-0"
40036
+ })(["box-sizing:border-box;min-width:180px;display:flex;align-items:center;padding:7px 12px;gap:10px;border:0 none;background-color:unset;white-space:nowrap;"]);
40037
+ RowMenuButton.displayName = 'RowMenuButton';
40038
+ var rowMenuStyle = {
40039
+ backgroundColor: _theme__WEBPACK_IMPORTED_MODULE_5__["default"].color.white,
40040
+ display: 'flex',
40041
+ alignItems: 'center',
40042
+ position: 'sticky',
40043
+ right: 0,
40044
+ overflow: 'visible'
40045
+ };
40046
+ var getRowMenuCellProps = function getRowMenuCellProps(props, _ref2) {
40047
+ var cell = _ref2.cell;
40048
+ if (cell.column.id == 'row_menu') return [props, {
40049
+ style: rowMenuStyle
40050
+ }];
40051
+ return props;
40052
+ };
40053
+ var rowMenuColumn = {
40054
+ id: 'row_menu',
40055
+ name: ' ',
40056
+ Cell: RowMenuCell,
40057
+ disableHiding: true,
40058
+ disableResizing: true,
40059
+ disablePinning: true,
40060
+ canEdit: false,
40061
+ width: 48,
40062
+ minWidth: 48,
40063
+ maxWidth: 48,
40064
+ internalActions: {}
40065
+ };
40066
+ var useRowMenu = function useRowMenu(hooks) {
40067
+ hooks.visibleColumns.push(function (columns) {
40068
+ if (columns[columns.length - 1] == rowMenuColumn) return columns;
40069
+ return [].concat(_toConsumableArray(columns), [rowMenuColumn]);
40070
+ });
40071
+ hooks.getCellProps.push(getRowMenuCellProps);
40072
+ };
40073
+ useRowMenu.pluginName = 'useRowMenu';
40074
+ var addRowMenuInternalAction = function addRowMenuInternalAction(id, action) {
40075
+ if (!rowMenuColumn.internalActions[id]) rowMenuColumn.internalActions[id] = action;
40076
+ };
40077
+
40078
+ /***/ }),
40079
+
39891
40080
  /***/ "./src/table/select_rows.js":
39892
40081
  /*!**********************************!*\
39893
40082
  !*** ./src/table/select_rows.js ***!
@@ -40198,24 +40387,13 @@ __webpack_require__.r(__webpack_exports__);
40198
40387
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
40199
40388
  /* harmony import */ var react_table__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-table */ "react-table");
40200
40389
  /* harmony import */ var react_table__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_table__WEBPACK_IMPORTED_MODULE_1__);
40201
- /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "styled-components");
40202
- /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_2__);
40203
- /* harmony import */ var _hoc__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hoc */ "./src/hoc/index.js");
40204
- /* harmony import */ var _icon_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../icon_button */ "./src/icon_button.js");
40205
- /* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../menu */ "./src/menu/index.js");
40206
- /* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
40207
- /* harmony import */ var _plugin__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./plugin */ "./src/table/plugin.js");
40390
+ /* harmony import */ var _plugin__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./plugin */ "./src/table/plugin.js");
40391
+ /* harmony import */ var _row_menu_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./row_menu.js */ "./src/table/row_menu.js");
40208
40392
  // LICENSE_CODE ZON
40209
40393
 
40210
40394
 
40211
40395
  /*jslint react:true*/
40212
40396
  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); }
40213
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
40214
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
40215
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
40216
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
40217
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
40218
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
40219
40397
  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; }
40220
40398
  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; }
40221
40399
  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; }
@@ -40225,35 +40403,25 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
40225
40403
 
40226
40404
 
40227
40405
 
40228
-
40229
-
40230
-
40231
-
40232
40406
  var assign = Object.assign;
40233
40407
  react_table__WEBPACK_IMPORTED_MODULE_1__.actions.resetPinnedRows = 'resetPinnedRows';
40234
40408
  react_table__WEBPACK_IMPORTED_MODULE_1__.actions.toggleRowPinned = 'toggleRowPinned';
40235
40409
  var useStickyRows = function useStickyRows(hooks) {
40236
- hooks.getCellProps.push(getStickyCellProps);
40237
40410
  hooks.stateReducers.push(stickyRowsReducer);
40238
40411
  hooks.useInstance.push(useStickyRowInstance);
40239
40412
  hooks.prepareRow.push(prepareStickyRow);
40413
+ (0,_row_menu_js__WEBPACK_IMPORTED_MODULE_3__.addRowMenuInternalAction)('stick_row', function (row) {
40414
+ return {
40415
+ key: 'stick_row',
40416
+ text: "".concat(row.isPinned ? 'Unpin' : 'Pin', " row"),
40417
+ icon: row.isPinned ? 'Unpin' : 'Pin',
40418
+ onClick: function onClick() {
40419
+ return row.toggleRowPinned(!row.isPinned);
40420
+ }
40421
+ };
40422
+ });
40240
40423
  };
40241
40424
  useStickyRows.pluginName = 'useStickyRows';
40242
- var rowMenuStyle = {
40243
- backgroundColor: _theme__WEBPACK_IMPORTED_MODULE_6__["default"].color.white,
40244
- display: 'flex',
40245
- alignItems: 'center',
40246
- position: 'sticky',
40247
- right: 0,
40248
- overflow: 'visible'
40249
- };
40250
- var getStickyCellProps = function getStickyCellProps(props, _ref) {
40251
- var cell = _ref.cell;
40252
- if (cell.column.id == 'row_menu') return [props, {
40253
- style: rowMenuStyle
40254
- }];
40255
- return props;
40256
- };
40257
40425
  var stickyRowsReducer = function stickyRowsReducer(state, action, previousState, instance) {
40258
40426
  if (action.type == react_table__WEBPACK_IMPORTED_MODULE_1__.actions.init) return _objectSpread({
40259
40427
  pinnedRowIds: {}
@@ -40312,70 +40480,16 @@ var useStickyRowInstance = function useStickyRowInstance(instance) {
40312
40480
  toggleRowPinned: toggleRowPinned
40313
40481
  });
40314
40482
  };
40315
- var prepareStickyRow = function prepareStickyRow(row, _ref2) {
40316
- var instance = _ref2.instance;
40483
+ var prepareStickyRow = function prepareStickyRow(row, _ref) {
40484
+ var instance = _ref.instance;
40317
40485
  row.toggleRowPinned = function (set) {
40318
40486
  return instance.toggleRowPinned(row.id, set);
40319
40487
  };
40320
40488
  };
40321
- var RowMenuCell = function RowMenuCell(props) {
40322
- var _props$row = props.row,
40323
- isPinned = _props$row.isPinned,
40324
- toggleRowPinned = _props$row.toggleRowPinned;
40325
- var items = [{
40326
- key: 'stick_row',
40327
- text: "".concat(isPinned ? 'Unpin' : 'Pin', " row"),
40328
- icon: isPinned ? 'Unpin' : 'Pin',
40329
- onClick: function onClick() {
40330
- return toggleRowPinned(!isPinned);
40331
- }
40332
- }];
40333
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(RowMenuCellPopover, {
40334
- popoverProps: {
40335
- items: items
40336
- }
40337
- });
40338
- };
40339
- RowMenuCell.displayName = 'RowMenuCell';
40340
- var RowMenuCellPopover = (0,_hoc__WEBPACK_IMPORTED_MODULE_3__.withPopover)(function (p) {
40341
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icon_button__WEBPACK_IMPORTED_MODULE_4__.IconButton, {
40342
- onClick: p.popover.toggle,
40343
- icon: "DotsHorizontal",
40344
- variant: "ghost"
40345
- });
40346
- }, function (p) {
40347
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_menu__WEBPACK_IMPORTED_MODULE_5__["default"], {
40348
- items: p.items,
40349
- size: "sm"
40350
- });
40351
- }, {
40352
- placement: 'left'
40353
- });
40354
- var RowMenuButton = styled_components__WEBPACK_IMPORTED_MODULE_2___default().button.withConfig({
40355
- displayName: "RowMenuButton",
40356
- componentId: "sc-u1g3r9-0"
40357
- })(["box-sizing:border-box;min-width:180px;display:flex;align-items:center;padding:7px 12px;gap:10px;border:0 none;background-color:unset;white-space:nowrap;"]);
40358
- RowMenuButton.displayName = 'RowMenuButton';
40359
- var rowMenuColumn = {
40360
- id: 'row_menu',
40361
- name: ' ',
40362
- Cell: RowMenuCell,
40363
- disableHiding: true,
40364
- disableResizing: true,
40365
- disablePinning: true,
40366
- canEdit: false,
40367
- width: 48,
40368
- minWidth: 48,
40369
- maxWidth: 48
40370
- };
40371
- _plugin__WEBPACK_IMPORTED_MODULE_7__.plugins.stickyRows = function () {
40489
+ _plugin__WEBPACK_IMPORTED_MODULE_2__.plugins.stickyRows = function () {
40372
40490
  return {
40373
40491
  hooks: function hooks() {
40374
- return [useStickyRows, function (hooks) {
40375
- hooks.visibleColumns.push(function (columns) {
40376
- return [].concat(_toConsumableArray(columns), [rowMenuColumn]);
40377
- });
40378
- }];
40492
+ return [_row_menu_js__WEBPACK_IMPORTED_MODULE_3__.useRowMenu, useStickyRows];
40379
40493
  }
40380
40494
  };
40381
40495
  };
@@ -40391,7 +40505,7 @@ _plugin__WEBPACK_IMPORTED_MODULE_7__.plugins.stickyRows = function () {
40391
40505
  "use strict";
40392
40506
  __webpack_require__.r(__webpack_exports__);
40393
40507
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
40394
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
40508
+ /* harmony export */ Table: () => (/* binding */ Table)
40395
40509
  /* harmony export */ });
40396
40510
  /* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isObject */ "./node_modules/lodash/isObject.js");
40397
40511
  /* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isObject__WEBPACK_IMPORTED_MODULE_0__);
@@ -40412,9 +40526,15 @@ __webpack_require__.r(__webpack_exports__);
40412
40526
 
40413
40527
 
40414
40528
  /*jslint react:true*/
40529
+ 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); }
40415
40530
 
40416
40531
 
40417
40532
  var _excluded = ["getTableProps"];
40533
+ 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; }
40534
+ 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; }
40535
+ 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; }
40536
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
40537
+ 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); }
40418
40538
  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); }
40419
40539
  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; }
40420
40540
  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; }
@@ -40446,9 +40566,24 @@ var InnerTable = function InnerTable(props) {
40446
40566
  var onRowClick = (0,_util__WEBPACK_IMPORTED_MODULE_5__.firstDefined)(props.onRowClick, context.onRowClick);
40447
40567
  var stickyHeader = (0,_util__WEBPACK_IMPORTED_MODULE_5__.firstDefined)(props.stickyHeader, context.stickyHeader);
40448
40568
  var scrollTarget = (0,_util__WEBPACK_IMPORTED_MODULE_5__.firstDefined)(props.scrollTarget, context.scrollTarget);
40569
+ var scrollable = (0,_util__WEBPACK_IMPORTED_MODULE_5__.firstDefined)(props.scrollable, context.scrollable);
40570
+ var scrollHeight = (0,_util__WEBPACK_IMPORTED_MODULE_5__.firstDefined)(props.scrollHeight, context.scrollHeight);
40449
40571
  var offsetTop = lodash_isObject__WEBPACK_IMPORTED_MODULE_0___default()(stickyHeader) && stickyHeader.offsetTop || 0;
40450
40572
  var wrapperRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)();
40451
40573
  var tableRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)();
40574
+ var headerRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)();
40575
+ var footerRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)();
40576
+ var onScroll = scrollable ? function (evt) {
40577
+ if (footerRef.current) footerRef.current.scrollLeft = evt.target.scrollLeft;
40578
+ if (headerRef.current) headerRef.current.scrollLeft = evt.target.scrollLeft;
40579
+ } : undefined;
40580
+ var headStyle = scrollable ? {
40581
+ overflow: 'hidden'
40582
+ } : undefined;
40583
+ var bodyStyle = scrollable ? {
40584
+ overflow: 'auto',
40585
+ maxHeight: scrollHeight
40586
+ } : undefined;
40452
40587
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(TableWrapper, {
40453
40588
  ref: wrapperRef,
40454
40589
  className: (0,_util__WEBPACK_IMPORTED_MODULE_5__.classNames)(className, {
@@ -40461,14 +40596,20 @@ var InnerTable = function InnerTable(props) {
40461
40596
  table: true
40462
40597
  })
40463
40598
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_header__WEBPACK_IMPORTED_MODULE_8__.TableHeader, {
40464
- className: className
40599
+ ref: headerRef,
40600
+ className: className,
40601
+ style: headStyle
40465
40602
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(TableBody, {
40466
40603
  rowDensity: rowDensity,
40467
40604
  className: className,
40468
- onRowClick: onRowClick
40605
+ onRowClick: onRowClick,
40606
+ style: bodyStyle,
40607
+ onScroll: onScroll
40469
40608
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_footer__WEBPACK_IMPORTED_MODULE_7__.TableFooter, {
40609
+ ref: footerRef,
40470
40610
  rowDensity: rowDensity,
40471
- className: className
40611
+ className: className,
40612
+ style: headStyle
40472
40613
  }), !!stickyHeader && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_sticky_header__WEBPACK_IMPORTED_MODULE_10__.StickyHeader, {
40473
40614
  offsetTop: offsetTop,
40474
40615
  onRowClick: onRowClick,
@@ -40493,7 +40634,8 @@ StyledTable.displayName = 'StyledTable';
40493
40634
  var TableBody = function TableBody(props) {
40494
40635
  var className = props.className,
40495
40636
  rowDensity = props.rowDensity,
40496
- onRowClick = props.onRowClick;
40637
+ onRowClick = props.onRowClick,
40638
+ onScroll = props.onScroll;
40497
40639
  var _useTableContext2 = (0,_context__WEBPACK_IMPORTED_MODULE_6__.useTableContext)(),
40498
40640
  getTableBodyProps = _useTableContext2.getTableBodyProps,
40499
40641
  prepareRow = _useTableContext2.prepareRow,
@@ -40522,12 +40664,16 @@ var TableBody = function TableBody(props) {
40522
40664
  });
40523
40665
  });
40524
40666
  }();
40525
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement("div", _extends({
40667
+ var bodyProps = getTableBodyProps();
40668
+ var style = _objectSpread(_objectSpread({}, props.style), bodyProps.style);
40669
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(TableBodyRowGroup, _extends({
40526
40670
  "data-rowgroup-type": "body"
40527
- }, getTableBodyProps(), {
40671
+ }, bodyProps, {
40528
40672
  className: (0,_util__WEBPACK_IMPORTED_MODULE_5__.classNames)(className, {
40529
40673
  tableBody: true
40530
- })
40674
+ }),
40675
+ style: style,
40676
+ onScroll: onScroll
40531
40677
  }), pinnedRows.map(function (row) {
40532
40678
  prepareRow(row);
40533
40679
  return (0,_render_row__WEBPACK_IMPORTED_MODULE_9__.renderRow)({
@@ -40540,7 +40686,10 @@ var TableBody = function TableBody(props) {
40540
40686
  });
40541
40687
  }), body);
40542
40688
  };
40543
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Table);
40689
+ var TableBodyRowGroup = styled_components__WEBPACK_IMPORTED_MODULE_3___default().div.withConfig({
40690
+ displayName: "TableBodyRowGroup",
40691
+ componentId: "sc-ebeoik-2"
40692
+ })(["", ""], _theme__WEBPACK_IMPORTED_MODULE_4__["default"].scrollbars.thin);
40544
40693
 
40545
40694
  /***/ }),
40546
40695