@luminati-io/uikit 3.5.14 → 3.5.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -40369,11 +40369,14 @@ __webpack_require__.r(__webpack_exports__);
40369
40369
 
40370
40370
  /*jslint react:true*/
40371
40371
  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); }
40372
+ var _excluded = ["onClick", "keepPopover"];
40372
40373
  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; }
40373
40374
  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; }
40374
40375
  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; }
40375
40376
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
40376
40377
  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); }
40378
+ 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; }
40379
+ 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; }
40377
40380
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
40378
40381
  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."); }
40379
40382
  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); }
@@ -40411,6 +40414,7 @@ var RowMenuCell = function RowMenuCell(_ref) {
40411
40414
  RowMenuCell.displayName = 'RowMenuCell';
40412
40415
  var RowMenuCellPopover = (0,_hoc__WEBPACK_IMPORTED_MODULE_2__.withPopover)(function (p) {
40413
40416
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icon_button__WEBPACK_IMPORTED_MODULE_3__.IconButton, {
40417
+ "data-testid": "row-actions-toggle",
40414
40418
  onClick: p.popover.toggle,
40415
40419
  icon: "DotsHorizontal",
40416
40420
  variant: "ghost",
@@ -40430,14 +40434,16 @@ var PopoverMenu = function PopoverMenu(props) {
40430
40434
  row = props.row,
40431
40435
  togglePopover = props.togglePopover;
40432
40436
  var items = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
40433
- return allActions.map(function (item) {
40434
- var func = item.onClick;
40435
- var newFunc = function newFunc() {
40436
- if (!item.keepPopover) togglePopover();
40437
- func(row);
40437
+ return allActions.map(function (_ref2) {
40438
+ var onClick = _ref2.onClick,
40439
+ keepPopover = _ref2.keepPopover,
40440
+ item = _objectWithoutProperties(_ref2, _excluded);
40441
+ var onItemClick = function onItemClick(evt) {
40442
+ if (!keepPopover) togglePopover();
40443
+ onClick === null || onClick === void 0 || onClick(row, evt);
40438
40444
  };
40439
40445
  return _objectSpread(_objectSpread({}, item), {}, {
40440
- onClick: newFunc
40446
+ onClick: onItemClick
40441
40447
  });
40442
40448
  });
40443
40449
  }, [allActions]);
@@ -40460,8 +40466,8 @@ var rowMenuStyle = {
40460
40466
  right: 0,
40461
40467
  overflow: 'visible'
40462
40468
  };
40463
- var getRowMenuCellProps = function getRowMenuCellProps(props, _ref2) {
40464
- var cell = _ref2.cell;
40469
+ var getRowMenuCellProps = function getRowMenuCellProps(props, _ref3) {
40470
+ var cell = _ref3.cell;
40465
40471
  if (cell.column.id == 'row_menu') return [props, {
40466
40472
  style: rowMenuStyle
40467
40473
  }];