@luminati-io/uikit 6.3.8 → 6.3.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -36695,10 +36695,10 @@ __webpack_require__.r(__webpack_exports__);
36695
36695
  /* harmony export */ });
36696
36696
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
36697
36697
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
36698
- /* harmony import */ var _hoc__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../hoc */ "./src/hoc/index.js");
36699
- /* harmony import */ var _icon_button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../icon_button */ "./src/icon_button.js");
36700
- /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../layout */ "./src/layout/index.js");
36701
- /* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../menu */ "./src/menu/index.js");
36698
+ /* harmony import */ var _icon_button__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../icon_button */ "./src/icon_button.js");
36699
+ /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../layout */ "./src/layout/index.js");
36700
+ /* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../menu */ "./src/menu/index.js");
36701
+ /* harmony import */ var _popover__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../popover */ "./src/popover/index.js");
36702
36702
  /* harmony import */ var _divider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./divider */ "./src/breadcrumbs/divider.js");
36703
36703
  // LICENSE_CODE ZON
36704
36704
 
@@ -36710,6 +36710,12 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
36710
36710
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
36711
36711
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
36712
36712
  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); }
36713
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
36714
+ 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."); }
36715
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
36716
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
36717
+ 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; } }
36718
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
36713
36719
 
36714
36720
 
36715
36721
 
@@ -36718,42 +36724,45 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
36718
36724
 
36719
36725
  var CollapsedItems = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (_ref, ref) {
36720
36726
  var items = _ref.items;
36721
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_3__.Flex, {
36727
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_2__.Flex, {
36722
36728
  ref: ref,
36723
36729
  "data-testid": "button-more",
36724
36730
  align_items: "center"
36725
36731
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(MenuButton, {
36726
- popoverProps: {
36727
- items: items
36728
- }
36732
+ items: items
36729
36733
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_divider__WEBPACK_IMPORTED_MODULE_5__.Divider, null));
36730
36734
  });
36731
36735
  CollapsedItems.displayName = 'CollapsedItems';
36732
- var MenuButton = (0,_hoc__WEBPACK_IMPORTED_MODULE_1__.withPopover)(function (_ref2) {
36733
- var popover = _ref2.popover;
36734
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icon_button__WEBPACK_IMPORTED_MODULE_2__.IconButton, {
36735
- size: "xs",
36736
- icon: "DotsHorizontal",
36737
- onClick: popover.toggle
36738
- });
36739
- }, function (_ref3) {
36740
- var items = _ref3.items,
36741
- popover = _ref3.popover;
36736
+ var MenuButton = function MenuButton(_ref2) {
36737
+ var items = _ref2.items;
36738
+ var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
36739
+ _useState2 = _slicedToArray(_useState, 2),
36740
+ visible = _useState2[0],
36741
+ setVisible = _useState2[1];
36742
36742
  var menuItems = items.map(function (i) {
36743
36743
  return _objectSpread(_objectSpread({
36744
36744
  key: i.text
36745
36745
  }, i), {}, {
36746
36746
  onClick: function onClick(e) {
36747
- popover.hide();
36747
+ setVisible(false);
36748
36748
  i === null || i === void 0 || i.onClick(e);
36749
36749
  }
36750
36750
  });
36751
36751
  });
36752
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_menu__WEBPACK_IMPORTED_MODULE_4__.Menu, {
36753
- size: "sm",
36754
- items: menuItems
36755
- });
36756
- });
36752
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_popover__WEBPACK_IMPORTED_MODULE_4__.Popover, {
36753
+ trigger: "click",
36754
+ visible: visible,
36755
+ onVisibleChange: setVisible,
36756
+ popover: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_menu__WEBPACK_IMPORTED_MODULE_3__.Menu, {
36757
+ size: "sm",
36758
+ items: menuItems,
36759
+ noBorder: true
36760
+ })
36761
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icon_button__WEBPACK_IMPORTED_MODULE_1__.IconButton, {
36762
+ size: "xs",
36763
+ icon: "DotsHorizontal"
36764
+ }));
36765
+ };
36757
36766
 
36758
36767
  /***/ }),
36759
36768
 
@@ -39236,8 +39245,9 @@ __webpack_require__.r(__webpack_exports__);
39236
39245
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
39237
39246
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "styled-components");
39238
39247
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_2__);
39239
- /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
39240
- /* harmony import */ var _code_snippet__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./code_snippet */ "./src/code/code_snippet.js");
39248
+ /* harmony import */ var rc_util_lib_pickAttrs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/lib/pickAttrs */ "./node_modules/rc-util/lib/pickAttrs.js");
39249
+ /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
39250
+ /* harmony import */ var _code_snippet__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./code_snippet */ "./src/code/code_snippet.js");
39241
39251
  // LICENSE_CODE ZON
39242
39252
 
39243
39253
 
@@ -39248,6 +39258,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
39248
39258
 
39249
39259
 
39250
39260
 
39261
+
39251
39262
  var CodeBlock = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
39252
39263
  var className = props.className,
39253
39264
  classNamePrefix = props.classNamePrefix,
@@ -39269,16 +39280,16 @@ var CodeBlock = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(f
39269
39280
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CodeBlockWrapper, _extends({
39270
39281
  ref: ref,
39271
39282
  "data-testid": "code_block"
39272
- }, (0,_util__WEBPACK_IMPORTED_MODULE_3__.getCommonProps)(props), {
39273
- className: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(classNamePrefix, {
39283
+ }, (0,rc_util_lib_pickAttrs__WEBPACK_IMPORTED_MODULE_3__["default"])(props), {
39284
+ className: (0,_util__WEBPACK_IMPORTED_MODULE_4__.classNames)(classNamePrefix, {
39274
39285
  wrapper: true
39275
39286
  }, className)
39276
39287
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CodeBlockHeader, {
39277
- className: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(classNamePrefix, {
39288
+ className: (0,_util__WEBPACK_IMPORTED_MODULE_4__.classNames)(classNamePrefix, {
39278
39289
  header: true
39279
39290
  }, variant)
39280
- }, header), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_code_snippet__WEBPACK_IMPORTED_MODULE_4__.CodeSnippet, {
39281
- className: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(classNamePrefix, {
39291
+ }, header), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_code_snippet__WEBPACK_IMPORTED_MODULE_5__.CodeSnippet, {
39292
+ className: (0,_util__WEBPACK_IMPORTED_MODULE_4__.classNames)(classNamePrefix, {
39282
39293
  snippet: true
39283
39294
  }),
39284
39295
  maxHeight: maxHeight || max_height,
@@ -39287,7 +39298,7 @@ var CodeBlock = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(f
39287
39298
  variant: variant,
39288
39299
  lineNumbers: lineNumbers,
39289
39300
  copyButton: copyButton,
39290
- copyButtonClassName: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(classNamePrefix, {
39301
+ copyButtonClassName: (0,_util__WEBPACK_IMPORTED_MODULE_4__.classNames)(classNamePrefix, {
39291
39302
  copyButton: true
39292
39303
  }),
39293
39304
  copyButtonPlacement: copyButtonPlacement,
@@ -39315,7 +39326,7 @@ CodeBlock.propTypes = {
39315
39326
  var CodeBlockWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
39316
39327
  displayName: "CodeBlockWrapper",
39317
39328
  componentId: "sc-dgi5hi-0"
39318
- })(["", "{border-top-left-radius:0;border-top-right-radius:0;}"], _code_snippet__WEBPACK_IMPORTED_MODULE_4__.CodeSnippetWrapper);
39329
+ })(["", "{border-top-left-radius:0;border-top-right-radius:0;}"], _code_snippet__WEBPACK_IMPORTED_MODULE_5__.CodeSnippetWrapper);
39319
39330
  var CodeBlockHeader = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
39320
39331
  displayName: "CodeBlockHeader",
39321
39332
  componentId: "sc-dgi5hi-1"
@@ -41143,7 +41154,7 @@ __webpack_require__.r(__webpack_exports__);
41143
41154
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "prop-types");
41144
41155
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
41145
41156
  /* harmony import */ var _icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @icons */ "./assets/icons/index.js");
41146
- /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util */ "./src/util/index.js");
41157
+ /* harmony import */ var rc_util_lib_pickAttrs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/lib/pickAttrs */ "./node_modules/rc-util/lib/pickAttrs.js");
41147
41158
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ "./src/utils.js");
41148
41159
  // LICENSE_CODE ZON
41149
41160
 
@@ -41159,19 +41170,19 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
41159
41170
 
41160
41171
 
41161
41172
 
41162
- var Icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (_ref, ref) {
41163
- var name = _ref.name,
41164
- _ref$size = _ref.size,
41165
- size = _ref$size === void 0 ? 'md' : _ref$size,
41166
- color = _ref.color,
41167
- verticalAlign = _ref.verticalAlign,
41168
- rest = _objectWithoutProperties(_ref, _excluded);
41173
+ var Icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (props, ref) {
41174
+ var name = props.name,
41175
+ _props$size = props.size,
41176
+ size = _props$size === void 0 ? 'md' : _props$size,
41177
+ color = props.color,
41178
+ verticalAlign = props.verticalAlign,
41179
+ rest = _objectWithoutProperties(props, _excluded);
41169
41180
  var theme = (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.useTheme)();
41170
41181
  var ic = _icons__WEBPACK_IMPORTED_MODULE_3__["default"][name];
41171
41182
  if (!ic) return null;
41172
41183
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(StyledSvg, _extends({
41173
41184
  ref: ref
41174
- }, (0,_util__WEBPACK_IMPORTED_MODULE_4__.getCommonProps)(rest), {
41185
+ }, (0,rc_util_lib_pickAttrs__WEBPACK_IMPORTED_MODULE_4__["default"])(rest), {
41175
41186
  $size: size,
41176
41187
  viewBox: ic.viewBox,
41177
41188
  $color: theme.color[color],
@@ -41349,10 +41360,10 @@ __webpack_require__.r(__webpack_exports__);
41349
41360
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
41350
41361
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "styled-components");
41351
41362
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_2__);
41352
- /* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./icon */ "./src/icon.js");
41353
- /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./layout */ "./src/layout/index.js");
41354
- /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./typography */ "./src/typography/index.js");
41355
- /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./util */ "./src/util/index.js");
41363
+ /* harmony import */ var rc_util_lib_pickAttrs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/lib/pickAttrs */ "./node_modules/rc-util/lib/pickAttrs.js");
41364
+ /* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./icon */ "./src/icon.js");
41365
+ /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./layout */ "./src/layout/index.js");
41366
+ /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./typography */ "./src/typography/index.js");
41356
41367
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils */ "./src/utils.js");
41357
41368
  // LICENSE_CODE ZON
41358
41369
 
@@ -41388,15 +41399,14 @@ var InfoChip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forward
41388
41399
  warning: 'icon_warning',
41389
41400
  info: 'icon_primary'
41390
41401
  }[variant] || 'icon_accent';
41391
- var commonProps = (0,_util__WEBPACK_IMPORTED_MODULE_6__.getCommonProps)(rest);
41392
41402
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(InfoChipWrapper, _extends({
41393
41403
  ref: ref,
41394
41404
  $variant: variant
41395
- }, commonProps), icon && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_3__.Icon, {
41405
+ }, (0,rc_util_lib_pickAttrs__WEBPACK_IMPORTED_MODULE_3__["default"])(rest)), icon && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_4__.Icon, {
41396
41406
  size: "xxs",
41397
41407
  color: iconColor,
41398
41408
  name: icon
41399
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_5__.Label, {
41409
+ }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_6__.Label, {
41400
41410
  variant: "xs",
41401
41411
  color: textColor
41402
41412
  }, text));
@@ -41407,7 +41417,7 @@ InfoChip.propTypes = {
41407
41417
  text: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
41408
41418
  icon: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_7__.iconNames)
41409
41419
  };
41410
- var InfoChipWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_layout__WEBPACK_IMPORTED_MODULE_4__.Flex).attrs({
41420
+ var InfoChipWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_layout__WEBPACK_IMPORTED_MODULE_5__.Flex).attrs({
41411
41421
  align_items: 'center',
41412
41422
  gap: '02',
41413
41423
  padding_top: '0',
@@ -46273,7 +46283,7 @@ var InputContentWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default
46273
46283
  var InputWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
46274
46284
  displayName: "InputWrapper",
46275
46285
  componentId: "sc-r60v1b-7"
46276
- })(["position:relative;width:100%;border:1px solid;border-radius:4px;box-sizing:border-box;font-family:", ";padding:", "px ", "px;overflow:auto;display:flex;gap:8px;align-items:", ";border-left-width:1px;border-right-width:1px;border-top-left-radius:", ";border-bottom-left-radius:", ";border-top-right-radius:", ";border-bottom-right-radius:", ";", " ", " box-shadow:", ";"], function (_ref32) {
46286
+ })(["position:relative;width:100%;border:1px solid;border-radius:4px;box-sizing:border-box;font-family:", ";padding:", "px ", "px;overflow:auto;display:flex;gap:8px;align-items:", ";border-left-width:1px;border-right-width:1px;border-top-left-radius:", ";border-bottom-left-radius:", ";border-top-right-radius:", ";border-bottom-right-radius:", ";", " cursor:", ";background-color:", ";color:", ";border-color:", ";&:hover{border-color:", ";}box-shadow:", ";"], function (_ref32) {
46277
46287
  var font_family = _ref32.theme.font_family;
46278
46288
  return font_family.sans;
46279
46289
  }, _constants__WEBPACK_IMPORTED_MODULE_12__.INPUT_VERTICAL_PADDING, _constants__WEBPACK_IMPORTED_MODULE_12__.INPUT_HORIZONTAL_PADDING, function (_ref33) {
@@ -46291,23 +46301,36 @@ var InputWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.
46291
46301
  var _props$$heightCalcula;
46292
46302
  return (_props$$heightCalcula = props.$heightCalculationCallback) === null || _props$$heightCalcula === void 0 ? void 0 : _props$$heightCalcula.call(props);
46293
46303
  }, function (_ref34) {
46294
- var $disabled = _ref34.$disabled,
46295
- $invalid = _ref34.$invalid,
46296
- $active = _ref34.$active,
46297
- color = _ref34.theme.color;
46298
- if ($disabled) {
46299
- return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["cursor:default;background-color:", ";border-color:", ";color:", ";"], color.bg_fill_teritary, color.border_disabled, color.text_disabled);
46300
- }
46301
- return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["cursor:text;background-color:", ";color:", ";border-color:", ";&:hover{border-color:", ";}"], color.bg, color.text_tertiary, $invalid ? color.border_error : $active ? color.border_primary : color.border, color.border_accent);
46304
+ var $disabled = _ref34.$disabled;
46305
+ return $disabled ? 'default' : 'text';
46302
46306
  }, function (_ref35) {
46303
- var $active = _ref35.$active,
46304
- shadow = _ref35.theme.shadow;
46307
+ var $disabled = _ref35.$disabled,
46308
+ color = _ref35.theme.color;
46309
+ return $disabled ? color.bg_fill_teritary : color.bg;
46310
+ }, function (_ref36) {
46311
+ var $disabled = _ref36.$disabled,
46312
+ color = _ref36.theme.color;
46313
+ return $disabled ? color.text_disabled : color.text_tertiary;
46314
+ }, function (_ref37) {
46315
+ var $disabled = _ref37.$disabled,
46316
+ $invalid = _ref37.$invalid,
46317
+ $active = _ref37.$active,
46318
+ color = _ref37.theme.color;
46319
+ return $disabled ? color.border_disabled : $invalid ? color.border_error : $active ? color.border_primary : color.border;
46320
+ }, function (_ref38) {
46321
+ var $disabled = _ref38.$disabled,
46322
+ $active = _ref38.$active,
46323
+ color = _ref38.theme.color;
46324
+ return $disabled ? color.border_disabled : $active ? color.border_primary : color.border_accent;
46325
+ }, function (_ref39) {
46326
+ var $active = _ref39.$active,
46327
+ shadow = _ref39.theme.shadow;
46305
46328
  return $active ? shadow.primary : null;
46306
46329
  });
46307
- var HelperText = function HelperText(_ref36) {
46308
- var classNamePrefix = _ref36.classNamePrefix,
46309
- children = _ref36.children,
46310
- invalid = _ref36.invalid;
46330
+ var HelperText = function HelperText(_ref40) {
46331
+ var classNamePrefix = _ref40.classNamePrefix,
46332
+ children = _ref40.children,
46333
+ invalid = _ref40.invalid;
46311
46334
  if (!children) return null;
46312
46335
  var color = invalid ? 'text_error' : 'text_quaternary';
46313
46336
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_9__.Label, {
@@ -50983,14 +51006,15 @@ __webpack_require__.r(__webpack_exports__);
50983
51006
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
50984
51007
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "styled-components");
50985
51008
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_2__);
50986
- /* harmony import */ var _hoc__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hoc */ "./src/hoc/index.js");
50987
- /* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../icon */ "./src/icon.js");
50988
- /* harmony import */ var _icon_button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../icon_button */ "./src/icon_button.js");
50989
- /* harmony import */ var _input__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../input */ "./src/input/index.js");
50990
- /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../tooltip */ "./src/tooltip/index.js");
50991
- /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
51009
+ /* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icon */ "./src/icon.js");
51010
+ /* harmony import */ var _icon_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../icon_button */ "./src/icon_button.js");
51011
+ /* harmony import */ var _input__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../input */ "./src/input/index.js");
51012
+ /* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../tooltip */ "./src/tooltip/index.js");
51013
+ /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
51014
+ /* harmony import */ var _popover__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../popover */ "./src/popover/index.js");
50992
51015
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
50993
- /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./context */ "./src/table/context.js");
51016
+ /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../constants */ "./src/constants.js");
51017
+ /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./context */ "./src/table/context.js");
50994
51018
  // LICENSE_CODE ZON
50995
51019
 
50996
51020
 
@@ -50999,12 +51023,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
50999
51023
  var _excluded = ["Dragger", "isDragging"];
51000
51024
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
51001
51025
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
51002
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
51003
51026
  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; }
51004
51027
  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; }
51005
51028
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
51006
51029
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
51007
51030
  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); }
51031
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
51008
51032
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
51009
51033
  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."); }
51010
51034
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
@@ -51022,8 +51046,14 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
51022
51046
 
51023
51047
 
51024
51048
 
51025
- var CustomizeButton = function CustomizeButton(props) {
51026
- var _useTableContext = (0,_context__WEBPACK_IMPORTED_MODULE_10__.useTableContext)(),
51049
+
51050
+ var CustomizeButton = function CustomizeButton(_ref) {
51051
+ var searchable = _ref.searchable,
51052
+ _ref$popoverPlacement = _ref.popoverPlacement,
51053
+ popoverPlacement = _ref$popoverPlacement === void 0 ? 'bottom' : _ref$popoverPlacement,
51054
+ _ref$maxMenuHeight = _ref.maxMenuHeight,
51055
+ maxMenuHeight = _ref$maxMenuHeight === void 0 ? 300 : _ref$maxMenuHeight;
51056
+ var _useTableContext = (0,_context__WEBPACK_IMPORTED_MODULE_11__.useTableContext)(),
51027
51057
  allColumns = _useTableContext.allColumns,
51028
51058
  canOrderColumns = _useTableContext.canOrderColumns,
51029
51059
  orderLogic = _useTableContext.orderLogic;
@@ -51033,43 +51063,46 @@ var CustomizeButton = function CustomizeButton(props) {
51033
51063
  setSearch = _useState2[1];
51034
51064
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
51035
51065
  return setSearch('');
51036
- }, [props.searchable]);
51066
+ }, [searchable]);
51037
51067
  var columns = allColumns.filter(function (col) {
51038
51068
  return col.canHide || col.canPin;
51039
51069
  });
51040
51070
  if (!columns.length) return null;
51041
51071
  var filtered = columns.filter(searchColumn(search));
51042
51072
  var orderProps = canOrderColumns && orderLogic;
51043
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CustomizeButtonWithPopover, {
51044
- popoverProps: _objectSpread(_objectSpread({}, props), {}, {
51045
- items: filtered,
51073
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_popover__WEBPACK_IMPORTED_MODULE_8__.Popover, {
51074
+ trigger: "click",
51075
+ popover: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CustomizeButtonPopover, {
51076
+ searchable: searchable,
51046
51077
  search: search,
51047
51078
  setSearch: setSearch,
51079
+ maxMenuHeight: maxMenuHeight,
51080
+ items: filtered,
51048
51081
  orderProps: orderProps
51049
- })
51050
- });
51082
+ }),
51083
+ placement: popoverPlacement,
51084
+ style: {
51085
+ padding: '4px 0',
51086
+ minWidth: 168,
51087
+ maxWidth: 540
51088
+ }
51089
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon_button__WEBPACK_IMPORTED_MODULE_4__.IconButton, {
51090
+ tooltip: "Customize columns",
51091
+ icon: "Customize"
51092
+ }));
51051
51093
  };
51052
51094
  CustomizeButton.displayName = 'Table.CustomizeButton';
51053
51095
  CustomizeButton.propTypes = {
51054
51096
  searchable: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
51055
- maxMenuHeight: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
51097
+ maxMenuHeight: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
51098
+ popoverPlacement: _constants__WEBPACK_IMPORTED_MODULE_10__.PT_TOOLTIP_PLACEMENT
51056
51099
  };
51057
- var PopoverContainer = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
51058
- displayName: "PopoverContainer",
51059
- componentId: "sc-1uptv2h-0"
51060
- })(["box-shadow:", ";background:", ";border-radius:4px;padding:4px 0;min-width:168px;max-width:540px;"], function (_ref) {
51061
- var shadow = _ref.theme.shadow;
51062
- return shadow.medium;
51063
- }, function (_ref2) {
51064
- var color = _ref2.theme.color;
51065
- return color.bg_elevated;
51066
- });
51067
- var Search = function Search(_ref3) {
51068
- var search = _ref3.search,
51069
- setSearch = _ref3.setSearch;
51100
+ var Search = function Search(_ref2) {
51101
+ var search = _ref2.search,
51102
+ setSearch = _ref2.setSearch;
51070
51103
  var _useTheme = (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.useTheme)(),
51071
51104
  spacing = _useTheme.spacing;
51072
- var clearButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon_button__WEBPACK_IMPORTED_MODULE_5__.IconButton, {
51105
+ var clearButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon_button__WEBPACK_IMPORTED_MODULE_4__.IconButton, {
51073
51106
  size: "xs",
51074
51107
  icon: "Close",
51075
51108
  style: {
@@ -51083,8 +51116,8 @@ var Search = function Search(_ref3) {
51083
51116
  style: {
51084
51117
  padding: spacing['03']
51085
51118
  }
51086
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_input__WEBPACK_IMPORTED_MODULE_6__.Textbox, {
51087
- leftInnerContent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_4__.Icon, {
51119
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_input__WEBPACK_IMPORTED_MODULE_5__.Textbox, {
51120
+ leftInnerContent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_3__.Icon, {
51088
51121
  size: "xs",
51089
51122
  name: "Search",
51090
51123
  color: "icon"
@@ -51096,25 +51129,24 @@ var Search = function Search(_ref3) {
51096
51129
  };
51097
51130
  var ItemsWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
51098
51131
  displayName: "ItemsWrapper",
51099
- componentId: "sc-1uptv2h-1"
51100
- })(["width:100%;display:flex;flex-direction:column;gap:2px;box-sizing:border-box;", ""], function (_ref4) {
51101
- var $maxMenuHeight = _ref4.$maxMenuHeight,
51102
- scrollbars = _ref4.theme.scrollbars;
51132
+ componentId: "sc-1uptv2h-0"
51133
+ })(["width:100%;display:flex;flex-direction:column;gap:2px;box-sizing:border-box;", ""], function (_ref3) {
51134
+ var $maxMenuHeight = _ref3.$maxMenuHeight,
51135
+ scrollbars = _ref3.theme.scrollbars;
51103
51136
  if ($maxMenuHeight > 0) {
51104
51137
  return (0,styled_components__WEBPACK_IMPORTED_MODULE_2__.css)(["max-height:", ";overflow-y:auto;", ""], (0,_utils__WEBPACK_IMPORTED_MODULE_9__.toPixel)($maxMenuHeight), scrollbars.thin);
51105
51138
  }
51106
51139
  });
51107
- var CustomizeButtonPopover = function CustomizeButtonPopover(_ref5) {
51108
- var searchable = _ref5.searchable,
51109
- search = _ref5.search,
51110
- setSearch = _ref5.setSearch,
51111
- _ref5$maxMenuHeight = _ref5.maxMenuHeight,
51112
- maxMenuHeight = _ref5$maxMenuHeight === void 0 ? 300 : _ref5$maxMenuHeight,
51113
- items = _ref5.items,
51114
- orderProps = _ref5.orderProps;
51140
+ var CustomizeButtonPopover = function CustomizeButtonPopover(_ref4) {
51141
+ var searchable = _ref4.searchable,
51142
+ search = _ref4.search,
51143
+ setSearch = _ref4.setSearch,
51144
+ maxMenuHeight = _ref4.maxMenuHeight,
51145
+ items = _ref4.items,
51146
+ orderProps = _ref4.orderProps;
51115
51147
  var maxHeight = Number.parseInt(maxMenuHeight);
51116
51148
  var _maxMenuHeight = orderProps && (!maxHeight || maxHeight < 600) ? 600 : maxMenuHeight;
51117
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(PopoverContainer, null, searchable && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Search, {
51149
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, searchable && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Search, {
51118
51150
  search: search,
51119
51151
  setSearch: setSearch
51120
51152
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ItemsWrapper, {
@@ -51125,28 +51157,18 @@ var CustomizeButtonPopover = function CustomizeButtonPopover(_ref5) {
51125
51157
  items: items
51126
51158
  })));
51127
51159
  };
51128
- var CustomizeButtonWithPopover = (0,_hoc__WEBPACK_IMPORTED_MODULE_3__.withPopover)(function (_ref6) {
51129
- var popover = _ref6.popover;
51130
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon_button__WEBPACK_IMPORTED_MODULE_5__.IconButton, {
51131
- onClick: popover.toggle,
51132
- tooltip: "Customize columns",
51133
- icon: "Customize"
51134
- });
51135
- }, CustomizeButtonPopover, {
51136
- placement: 'bottom'
51137
- });
51138
- var CustomizeButtonStaticItems = function CustomizeButtonStaticItems(_ref7) {
51139
- var items = _ref7.items;
51160
+ var CustomizeButtonStaticItems = function CustomizeButtonStaticItems(_ref5) {
51161
+ var items = _ref5.items;
51140
51162
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, items.map(function (c) {
51141
51163
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CustomizeButtonItem, _extends({
51142
51164
  key: c.id
51143
51165
  }, c));
51144
51166
  }));
51145
51167
  };
51146
- var CustomizeButtonDraggableItems = function CustomizeButtonDraggableItems(_ref8) {
51147
- var items = _ref8.items,
51148
- orders = _ref8.orders,
51149
- moveColumn = _ref8.moveColumn;
51168
+ var CustomizeButtonDraggableItems = function CustomizeButtonDraggableItems(_ref6) {
51169
+ var items = _ref6.items,
51170
+ orders = _ref6.orders,
51171
+ moveColumn = _ref6.moveColumn;
51150
51172
  var sections = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
51151
51173
  var _orders$pinned;
51152
51174
  return [((_orders$pinned = orders.pinned) === null || _orders$pinned === void 0 ? void 0 : _orders$pinned.length) && {
@@ -51193,7 +51215,7 @@ var CustomizeButtonDraggableItems = function CustomizeButtonDraggableItems(_ref8
51193
51215
  }, it);
51194
51216
  });
51195
51217
  }, [items]);
51196
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_input__WEBPACK_IMPORTED_MODULE_6__.DragDrop, {
51218
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_input__WEBPACK_IMPORTED_MODULE_5__.DragDrop, {
51197
51219
  value: value,
51198
51220
  onChange: onChange,
51199
51221
  items: _items,
@@ -51202,32 +51224,32 @@ var CustomizeButtonDraggableItems = function CustomizeButtonDraggableItems(_ref8
51202
51224
  CustomDrag: CustomizeButtonDraggableItem
51203
51225
  });
51204
51226
  };
51205
- var CustomizeButtonDraggableItem = function CustomizeButtonDraggableItem(_ref9) {
51206
- var Dragger = _ref9.Dragger,
51207
- isDragging = _ref9.isDragging,
51208
- itemProps = _objectWithoutProperties(_ref9, _excluded);
51209
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_input__WEBPACK_IMPORTED_MODULE_6__.DragDrop.DraggableItem, {
51227
+ var CustomizeButtonDraggableItem = function CustomizeButtonDraggableItem(_ref7) {
51228
+ var Dragger = _ref7.Dragger,
51229
+ isDragging = _ref7.isDragging,
51230
+ itemProps = _objectWithoutProperties(_ref7, _excluded);
51231
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_input__WEBPACK_IMPORTED_MODULE_5__.DragDrop.DraggableItem, {
51210
51232
  Dragger: Dragger,
51211
51233
  isDragging: isDragging
51212
51234
  }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CustomizeButtonItem, itemProps));
51213
51235
  };
51214
- var CustomizeButtonItem = function CustomizeButtonItem(_ref10) {
51215
- var id = _ref10.id,
51216
- name = _ref10.name,
51217
- canPin = _ref10.canPin,
51218
- isPinned = _ref10.isPinned,
51219
- togglePinned = _ref10.togglePinned,
51220
- canHide = _ref10.canHide,
51221
- isVisible = _ref10.isVisible,
51222
- toggleHidden = _ref10.toggleHidden,
51223
- className = _ref10.className;
51236
+ var CustomizeButtonItem = function CustomizeButtonItem(_ref8) {
51237
+ var id = _ref8.id,
51238
+ name = _ref8.name,
51239
+ canPin = _ref8.canPin,
51240
+ isPinned = _ref8.isPinned,
51241
+ togglePinned = _ref8.togglePinned,
51242
+ canHide = _ref8.canHide,
51243
+ isVisible = _ref8.isVisible,
51244
+ toggleHidden = _ref8.toggleHidden,
51245
+ className = _ref8.className;
51224
51246
  var handlePinned = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
51225
51247
  togglePinned(!isPinned);
51226
51248
  }, [isPinned, togglePinned]);
51227
51249
  var handleHidden = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function () {
51228
51250
  toggleHidden(isVisible);
51229
51251
  }, [isVisible, toggleHidden]);
51230
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CustomizeButtonItemWrapper, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_8__.Label, {
51252
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CustomizeButtonItemWrapper, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_7__.Label, {
51231
51253
  variant: "sm",
51232
51254
  color: isVisible ? 'text_secondary' : 'text_disabled',
51233
51255
  "data-label": true,
@@ -51244,21 +51266,21 @@ var CustomizeButtonItem = function CustomizeButtonItem(_ref10) {
51244
51266
  };
51245
51267
  var CustomizeButtonItemWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
51246
51268
  displayName: "CustomizeButtonItemWrapper",
51247
- componentId: "sc-1uptv2h-2"
51248
- })(["margin:0;padding:8px 16px;display:flex;align-items:center;gap:4px;min-width:230px;div[data-label]{margin-right:auto;}&:hover{background-color:", ";}"], function (_ref11) {
51249
- var color = _ref11.theme.color;
51269
+ componentId: "sc-1uptv2h-1"
51270
+ })(["margin:0;padding:8px 16px;display:flex;align-items:center;gap:4px;min-width:230px;div[data-label]{margin-right:auto;}&:hover{background-color:", ";}"], function (_ref9) {
51271
+ var color = _ref9.theme.color;
51250
51272
  return color.bg_fill_secondary;
51251
51273
  });
51252
- var CustomizeButtonItemAction = function CustomizeButtonItemAction(_ref12) {
51253
- var onClick = _ref12.onClick,
51254
- tooltip = _ref12.tooltip,
51255
- icon = _ref12.icon;
51274
+ var CustomizeButtonItemAction = function CustomizeButtonItemAction(_ref10) {
51275
+ var onClick = _ref10.onClick,
51276
+ tooltip = _ref10.tooltip,
51277
+ icon = _ref10.icon;
51256
51278
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CustomizeButtonItemActionWrapper, {
51257
51279
  onClick: onClick
51258
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_tooltip__WEBPACK_IMPORTED_MODULE_7__.Tooltip2, {
51280
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_tooltip__WEBPACK_IMPORTED_MODULE_6__.Tooltip2, {
51259
51281
  tooltip: tooltip,
51260
51282
  tooltipPlacement: "top"
51261
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_4__.Icon, {
51283
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_3__.Icon, {
51262
51284
  name: icon,
51263
51285
  size: "xs",
51264
51286
  color: "icon"
@@ -51266,7 +51288,7 @@ var CustomizeButtonItemAction = function CustomizeButtonItemAction(_ref12) {
51266
51288
  };
51267
51289
  var CustomizeButtonItemActionWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
51268
51290
  displayName: "CustomizeButtonItemActionWrapper",
51269
- componentId: "sc-1uptv2h-3"
51291
+ componentId: "sc-1uptv2h-2"
51270
51292
  })(["cursor:pointer;visibility:hidden;", ":hover &{visibility:visible;}"], CustomizeButtonItemWrapper);
51271
51293
  var searchColumn = function searchColumn(search) {
51272
51294
  return function (col) {
@@ -51522,14 +51544,21 @@ var ExpandHandle = function ExpandHandle(_ref) {
51522
51544
  isExpanded = _ref.isExpanded;
51523
51545
  var _useTheme = (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.useTheme)(),
51524
51546
  spacing = _useTheme.spacing;
51525
- var icon = isExpanded ? 'ChevronDown' : 'ChevronRight';
51526
51547
  if (!canExpand) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_2__.Box, {
51527
51548
  width: spacing['06']
51528
51549
  });
51550
+ var icon = isExpanded ? 'ChevronDown' : 'ChevronRight';
51551
+ var props = getToggleRowExpandedProps();
51552
+ var onClick = function onClick(e) {
51553
+ e.stopPropagation(); // prevents onRowClick
51554
+ props.onClick(e);
51555
+ };
51529
51556
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icon_button__WEBPACK_IMPORTED_MODULE_3__.IconButton, _extends({
51530
51557
  icon: icon,
51531
51558
  size: "xs"
51532
- }, getToggleRowExpandedProps()));
51559
+ }, props, {
51560
+ onClick: onClick
51561
+ }));
51533
51562
  };
51534
51563
  var withAttachedProps = function withAttachedProps(Comp, rowProps) {
51535
51564
  return function WithAttachedProps() {
@@ -52246,6 +52275,12 @@ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(
52246
52275
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
52247
52276
 
52248
52277
 
52278
+ if (!Array.prototype.toSpliced) {
52279
+ Array.prototype.toSpliced = function () {
52280
+ var _Array$from;
52281
+ return (_Array$from = Array.from(this)).splice.apply(_Array$from, arguments);
52282
+ };
52283
+ }
52249
52284
  var useOrderLogic = function useOrderLogic(table) {
52250
52285
  var _table$state = table.state,
52251
52286
  columnOrder = _table$state.columnOrder,
@@ -53952,7 +53987,8 @@ var TableBody = function TableBody(props) {
53952
53987
  setIsDraggingRow = _useTableContext2.setIsDraggingRow,
53953
53988
  onRowDragStart = _useTableContext2.onRowDragStart,
53954
53989
  onRowDragEnd = _useTableContext2.onRowDragEnd,
53955
- rowsById = _useTableContext2.rowsById;
53990
+ rowsById = _useTableContext2.rowsById,
53991
+ draggableRows = _useTableContext2.draggableRows;
53956
53992
  var rows = (0,react__WEBPACK_IMPORTED_MODULE_2__.useMemo)(function () {
53957
53993
  return [].concat(_toConsumableArray(pinnedRows), _toConsumableArray(page.filter(function (row) {
53958
53994
  return !row.isPinned;
@@ -54013,10 +54049,7 @@ var TableBody = function TableBody(props) {
54013
54049
  cache.current.clearAll();
54014
54050
  onRowDragEnd === null || onRowDragEnd === void 0 || onRowDragEnd(event, originRow, destRow, context);
54015
54051
  }, [rows, cache.current]);
54016
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(react_beautiful_dnd__WEBPACK_IMPORTED_MODULE_13__.DragDropContext, {
54017
- onDragStart: onDragStart,
54018
- onDragEnd: onDragEnd
54019
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(TableBodyRowGroup, _extends({
54052
+ var content = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(TableBodyRowGroup, _extends({
54020
54053
  "data-rowgroup-type": "body"
54021
54054
  }, bodyProps, {
54022
54055
  style: style,
@@ -54024,21 +54057,39 @@ var TableBody = function TableBody(props) {
54024
54057
  tableBody: true
54025
54058
  }),
54026
54059
  onScroll: onScroll
54027
- }), body));
54060
+ }), body);
54061
+ if (draggableRows) {
54062
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(react_beautiful_dnd__WEBPACK_IMPORTED_MODULE_13__.DragDropContext, {
54063
+ onDragStart: onDragStart,
54064
+ onDragEnd: onDragEnd
54065
+ }, content);
54066
+ }
54067
+ return content;
54028
54068
  };
54029
54069
  var Body = function Body(props) {
54030
54070
  var _useTableContext3 = (0,_context__WEBPACK_IMPORTED_MODULE_6__.useTableContext)(),
54031
- virtualized = _useTableContext3.virtualized;
54071
+ virtualized = _useTableContext3.virtualized,
54072
+ draggableRows = _useTableContext3.draggableRows;
54032
54073
  var droppableProps = (0,react__WEBPACK_IMPORTED_MODULE_2__.useMemo)(function () {
54033
54074
  return {
54034
54075
  droppableId: 'table-body-rows',
54035
54076
  type: 'ROWS'
54036
54077
  };
54037
54078
  }, []);
54038
- var BodyComp = virtualized ? _virtualized_body__WEBPACK_IMPORTED_MODULE_11__.VirtualizedBody : _dnd__WEBPACK_IMPORTED_MODULE_12__.DroppableBody;
54039
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(BodyComp, _extends({}, props, {
54079
+ if (virtualized) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_virtualized_body__WEBPACK_IMPORTED_MODULE_11__.VirtualizedBody, _extends({}, props, {
54080
+ droppableProps: droppableProps
54081
+ }));
54082
+ if (draggableRows) return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_dnd__WEBPACK_IMPORTED_MODULE_12__.DroppableBody, _extends({}, props, {
54040
54083
  droppableProps: droppableProps
54041
54084
  }));
54085
+ var rows = props.rows,
54086
+ _renderRow = props.renderRow;
54087
+ return rows.map(function (row, index) {
54088
+ return _renderRow({
54089
+ row: row,
54090
+ index: index
54091
+ });
54092
+ });
54042
54093
  };
54043
54094
  var TableBodyRowGroup = styled_components__WEBPACK_IMPORTED_MODULE_3___default().div.withConfig({
54044
54095
  displayName: "TableBodyRowGroup",
@@ -54246,8 +54297,10 @@ var RowRenderer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().memo
54246
54297
  index = props.index,
54247
54298
  style = props.style,
54248
54299
  parent = props.parent,
54249
- rowHoverEvents = props.rowHoverEvents;
54250
- // padding is needed to see the divider between rows when new rows are added
54300
+ rowHoverEvents = props.rowHoverEvents,
54301
+ draggableRows = props.draggableRows;
54302
+ // padding is needed to see the divider between rows
54303
+ // when new rows are added
54251
54304
  var _style = _objectSpread(_objectSpread({}, style), {}, {
54252
54305
  padding: '0.3px 0'
54253
54306
  });
@@ -54258,28 +54311,34 @@ var RowRenderer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().memo
54258
54311
  rowIndex: index
54259
54312
  }, function (_ref) {
54260
54313
  var measure = _ref.measure;
54261
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_dnd__WEBPACK_IMPORTED_MODULE_4__.DraggableWrapper, {
54262
- key: row.id,
54314
+ if (draggableRows) {
54315
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_dnd__WEBPACK_IMPORTED_MODULE_4__.DraggableWrapper, {
54316
+ key: row.id,
54317
+ row: row,
54318
+ index: index,
54319
+ render: function render(wrapperProps, dragHandleProps) {
54320
+ return renderRow({
54321
+ row: row,
54322
+ index: index,
54323
+ wrapperProps: _objectSpread(_objectSpread(_objectSpread({}, wrapperProps), rowHoverEvents), {}, {
54324
+ onPointerEnter: function onPointerEnter(e) {
54325
+ return rowHoverEvents.onPointerEnter(e, row, dragHandleProps);
54326
+ },
54327
+ style: _style,
54328
+ measureContentSize: measure
54329
+ })
54330
+ });
54331
+ }
54332
+ });
54333
+ }
54334
+ return renderRow({
54263
54335
  row: row,
54264
- index: index,
54265
- render: function render(wrapperProps, dragHandleProps) {
54266
- return renderRow({
54267
- row: row,
54268
- index: index,
54269
- wrapperProps: _objectSpread(_objectSpread(_objectSpread({}, wrapperProps), rowHoverEvents), {}, {
54270
- onPointerEnter: function onPointerEnter(e) {
54271
- return rowHoverEvents.onPointerEnter(e, row, dragHandleProps);
54272
- },
54273
- style: _style,
54274
- measureContentSize: measure
54275
- })
54276
- });
54277
- }
54336
+ index: index
54278
54337
  });
54279
54338
  });
54280
54339
  });
54281
54340
  RowRenderer.displayName = 'RowRenderer';
54282
- var rowRenderer = function rowRenderer(rows, cache, renderRow, rowHoverEvents) {
54341
+ var rowRenderer = function rowRenderer(rows, cache, renderRow, rowHoverEvents, draggableRows) {
54283
54342
  var RendererWrapper = function RendererWrapper(_ref2) {
54284
54343
  var key = _ref2.key,
54285
54344
  index = _ref2.index,
@@ -54294,7 +54353,8 @@ var rowRenderer = function rowRenderer(rows, cache, renderRow, rowHoverEvents) {
54294
54353
  parent: parent,
54295
54354
  cache: cache,
54296
54355
  renderRow: renderRow,
54297
- rowHoverEvents: rowHoverEvents
54356
+ rowHoverEvents: rowHoverEvents,
54357
+ draggableRows: draggableRows
54298
54358
  });
54299
54359
  };
54300
54360
  return RendererWrapper;
@@ -54320,7 +54380,7 @@ var listRefHandler = function listRefHandler(setListDOMRef, droppableProvided) {
54320
54380
  var element = ref === null || ref === void 0 || (_ref$Grid = ref.Grid) === null || _ref$Grid === void 0 ? void 0 : _ref$Grid._scrollingContainer;
54321
54381
  if (element instanceof window.HTMLElement) {
54322
54382
  setListDOMRef(element === null || element === void 0 ? void 0 : element.firstChild);
54323
- droppableProvided.innerRef(element);
54383
+ droppableProvided === null || droppableProvided === void 0 || droppableProvided.innerRef(element);
54324
54384
  }
54325
54385
  };
54326
54386
  };
@@ -54328,7 +54388,8 @@ var VirtualizedBodyComp = function VirtualizedBodyComp(props) {
54328
54388
  var rows = props.rows,
54329
54389
  measurerCache = props.measurerCache,
54330
54390
  renderRow = props.renderRow,
54331
- droppableProps = props.droppableProps;
54391
+ droppableProps = props.droppableProps,
54392
+ draggableRows = props.draggableRows;
54332
54393
  var _useTableContext = (0,_context__WEBPACK_IMPORTED_MODULE_3__.useTableContext)(),
54333
54394
  maxHeight = _useTableContext.scrollHeight;
54334
54395
  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(),
@@ -54348,40 +54409,72 @@ var VirtualizedBodyComp = function VirtualizedBodyComp(props) {
54348
54409
  return acc += measurerCache.current.getHeight(index, 0);
54349
54410
  }, 0));
54350
54411
  }, [listDOMRef, rows]);
54351
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_beautiful_dnd__WEBPACK_IMPORTED_MODULE_6__.Droppable, _extends({}, droppableProps, {
54352
- mode: "virtual",
54353
- renderClone: renderClone(rows, renderRow)
54354
- }), function (provided) {
54355
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
54356
- style: {
54357
- height: _height,
54358
- maxHeight: maxHeight,
54359
- width: '100%'
54360
- }
54361
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_virtualized__WEBPACK_IMPORTED_MODULE_1__.AutoSizer, null, function (_ref3) {
54362
- var width = _ref3.width,
54363
- height = _ref3.height;
54364
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(StyledList, {
54365
- width: width,
54366
- height: height,
54367
- overscanRowCount: 5,
54368
- estimatedRowSize: 30,
54369
- rowHeight: measurerCache.current.rowHeight,
54370
- rowCount: rows.length,
54371
- deferredMeasurementCache: measurerCache.current,
54372
- ref: listRefHandler(setListDOMRef, provided),
54373
- rowRenderer: rowRenderer(rows, measurerCache, renderRow, rowHoverEvents)
54374
- });
54375
- })), renderHoverActions());
54412
+ if (draggableRows) {
54413
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_beautiful_dnd__WEBPACK_IMPORTED_MODULE_6__.Droppable, _extends({}, droppableProps, {
54414
+ mode: "virtual",
54415
+ renderClone: renderClone(rows, renderRow)
54416
+ }), function (provided) {
54417
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(VirtualizedBodyList, {
54418
+ rows: rows,
54419
+ measurerCache: measurerCache,
54420
+ renderRow: renderRow,
54421
+ rowHoverEvents: rowHoverEvents,
54422
+ style: {
54423
+ height: _height,
54424
+ maxHeight: maxHeight,
54425
+ width: '100%'
54426
+ },
54427
+ listRef: listRefHandler(setListDOMRef, provided),
54428
+ draggableRows: true
54429
+ }), renderHoverActions());
54430
+ });
54431
+ }
54432
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(VirtualizedBodyList, {
54433
+ rows: rows,
54434
+ measurerCache: measurerCache,
54435
+ renderRow: renderRow,
54436
+ rowHoverEvents: rowHoverEvents,
54437
+ style: {
54438
+ height: _height,
54439
+ maxHeight: maxHeight,
54440
+ width: '100%'
54441
+ },
54442
+ listRef: listRefHandler(setListDOMRef, undefined)
54376
54443
  });
54377
54444
  };
54378
54445
  var VirtualizedBody = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().memo(VirtualizedBodyComp);
54379
54446
  VirtualizedBody.displayName = 'VirtualizedBody';
54447
+ var VirtualizedBodyList = function VirtualizedBodyList(_ref3) {
54448
+ var rows = _ref3.rows,
54449
+ measurerCache = _ref3.measurerCache,
54450
+ renderRow = _ref3.renderRow,
54451
+ rowHoverEvents = _ref3.rowHoverEvents,
54452
+ style = _ref3.style,
54453
+ listRef = _ref3.listRef,
54454
+ draggableRows = _ref3.draggableRows;
54455
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
54456
+ style: style
54457
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_virtualized__WEBPACK_IMPORTED_MODULE_1__.AutoSizer, null, function (_ref4) {
54458
+ var width = _ref4.width,
54459
+ height = _ref4.height;
54460
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(StyledList, {
54461
+ width: width,
54462
+ height: height,
54463
+ overscanRowCount: 5,
54464
+ estimatedRowSize: 30,
54465
+ rowHeight: measurerCache.current.rowHeight,
54466
+ rowCount: rows.length,
54467
+ deferredMeasurementCache: measurerCache.current,
54468
+ ref: listRef,
54469
+ rowRenderer: rowRenderer(rows, measurerCache, renderRow, rowHoverEvents, draggableRows)
54470
+ });
54471
+ }));
54472
+ };
54380
54473
  var StyledList = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(react_virtualized__WEBPACK_IMPORTED_MODULE_1__.List).withConfig({
54381
54474
  displayName: "StyledList",
54382
54475
  componentId: "sc-1mdy9tq-0"
54383
- })(["", ""], function (_ref4) {
54384
- var scrollbars = _ref4.theme.scrollbars;
54476
+ })(["", ""], function (_ref5) {
54477
+ var scrollbars = _ref5.theme.scrollbars;
54385
54478
  return scrollbars.thin;
54386
54479
  });
54387
54480