@luminati-io/uikit 3.4.9 → 3.4.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -30447,11 +30447,14 @@ __webpack_require__.r(__webpack_exports__);
30447
30447
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
30448
30448
  /* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
30449
30449
  /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../layout */ "./src/layout/index.js");
30450
- /* harmony import */ var _code_snippet__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./code_snippet */ "./src/code/code_snippet.js");
30450
+ /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
30451
+ /* harmony import */ var _code_snippet__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./code_snippet */ "./src/code/code_snippet.js");
30451
30452
  // LICENSE_CODE ZON
30452
30453
 
30453
30454
 
30454
30455
  /*jslint react:true*/
30456
+ 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); }
30457
+
30455
30458
 
30456
30459
 
30457
30460
 
@@ -30467,15 +30470,18 @@ var CodeBlock = function CodeBlock(props) {
30467
30470
  themeProp = props.theme,
30468
30471
  lineNumbers = props.lineNumbers,
30469
30472
  copyButton = props.copyButton,
30470
- onCopy = props.onCopy,
30471
- with_dropdown = props.with_dropdown;
30472
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CodeBlockWrapper, {
30473
- className: className,
30473
+ onCopy = props.onCopy;
30474
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CodeBlockWrapper, _extends({
30474
30475
  "data-testid": "code_block"
30475
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CodeBlockHeader, {
30476
- $with_dropdown: with_dropdown,
30476
+ }, (0,_util__WEBPACK_IMPORTED_MODULE_5__.getCommonProps)(props)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CodeBlockHeader, {
30477
+ className: (0,_util__WEBPACK_IMPORTED_MODULE_5__.classNames)(className, {
30478
+ header: true
30479
+ }),
30477
30480
  $theme: themeProp
30478
- }, header), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_code_snippet__WEBPACK_IMPORTED_MODULE_5__.CodeSnippet, {
30481
+ }, header), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_code_snippet__WEBPACK_IMPORTED_MODULE_6__.CodeSnippet, {
30482
+ className: (0,_util__WEBPACK_IMPORTED_MODULE_5__.classNames)(className, {
30483
+ snippet: true
30484
+ }),
30479
30485
  max_height: max_height,
30480
30486
  lang: lang,
30481
30487
  code: code,
@@ -30509,12 +30515,11 @@ var CodeBlockHeader = styled_components__WEBPACK_IMPORTED_MODULE_1___default()(_
30509
30515
  }).withConfig({
30510
30516
  displayName: "CodeBlockHeader",
30511
30517
  componentId: "sc-dgi5hi-1"
30512
- })(["", ""], function (props) {
30513
- var padding = props.$with_dropdown ? '0.5em 0.8em' : '0.9em 1em';
30518
+ })(["padding:0.9em 1em;", ""], function (props) {
30514
30519
  if (props.$theme == 'white') {
30515
- return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["padding:", ";background-color:", ";color:", ";border-bottom:1px solid ", ";"], padding, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_2, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_9, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_5);
30520
+ return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["background-color:", ";color:", ";border-bottom:1px solid ", ";"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_2, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_9, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_5);
30516
30521
  }
30517
- return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["padding:", ";background-color:", ";color:", ";"], padding, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_11_50, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_9);
30522
+ return (0,styled_components__WEBPACK_IMPORTED_MODULE_1__.css)(["background-color:", ";color:", ";"], _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_11_50, _theme__WEBPACK_IMPORTED_MODULE_3__["default"].color.gray_9);
30518
30523
  });
30519
30524
 
30520
30525
  /***/ }),
@@ -33106,7 +33111,18 @@ var DragDrop = function DragDrop(props) {
33106
33111
  matrix = _removeItem.matrix,
33107
33112
  item = _removeItem.item;
33108
33113
  var newValue = addItem(matrix, dst_drop_id, +destination.index, item);
33109
- if (onChange) onChange(newValue);
33114
+ var info = {
33115
+ id: item,
33116
+ source: {
33117
+ section: src_drop_id,
33118
+ index: source.index
33119
+ },
33120
+ destination: {
33121
+ section: dst_drop_id,
33122
+ index: destination.index
33123
+ }
33124
+ };
33125
+ onChange(newValue, info);
33110
33126
  }, [value, onChange]);
33111
33127
  var itemsMap = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
33112
33128
  return items.reduce(function (acc, item) {
@@ -33130,7 +33146,8 @@ var DragDrop = function DragDrop(props) {
33130
33146
  isLast: i == value.length - 1,
33131
33147
  containerDirection: direction,
33132
33148
  Comp: props.CustomDrop,
33133
- DragComp: props.CustomDrag
33149
+ DragComp: props.CustomDrag,
33150
+ EmptyComp: props.EmptyComp
33134
33151
  });
33135
33152
  })));
33136
33153
  };
@@ -33279,6 +33296,7 @@ var DroppableArea = function DroppableArea(props) {
33279
33296
  containerDirection = props.containerDirection;
33280
33297
  var Comp = props.Comp || DropComp;
33281
33298
  var DragComp = props.DragComp || _draggable__WEBPACK_IMPORTED_MODULE_6__.DraggableItem;
33299
+ var EmptyComp = props.EmptyComp || EmptyDrop;
33282
33300
  var get_draggable = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (provided, snapshot, item) {
33283
33301
  return /*#__PURE__*/React.createElement("div", _extends({}, provided.draggableProps, {
33284
33302
  ref: provided.innerRef
@@ -33297,7 +33315,7 @@ var DroppableArea = function DroppableArea(props) {
33297
33315
  }, function (drop_provided, drop_snapshot) {
33298
33316
  return /*#__PURE__*/React.createElement("div", _extends({}, drop_provided.droppableProps, {
33299
33317
  ref: drop_provided.innerRef
33300
- }), items.map(function (item, i) {
33318
+ }), !(items !== null && items !== void 0 && items.length) && /*#__PURE__*/React.createElement(EmptyComp, null), items.map(function (item, i) {
33301
33319
  return /*#__PURE__*/React.createElement(react_beautiful_dnd__WEBPACK_IMPORTED_MODULE_7__.Draggable, {
33302
33320
  key: item.id,
33303
33321
  draggableId: item.id,
@@ -33305,9 +33323,19 @@ var DroppableArea = function DroppableArea(props) {
33305
33323
  }, function (provided, snapshot) {
33306
33324
  return snapshot.isDragging && portal ? /*#__PURE__*/react_dom__WEBPACK_IMPORTED_MODULE_0___default().createPortal(get_draggable(provided, snapshot, item), portal.current) : get_draggable(provided, snapshot, item);
33307
33325
  });
33308
- }));
33326
+ }), drop_provided.placeholder);
33309
33327
  }));
33310
33328
  };
33329
+ var EmptyDrop = function EmptyDrop() {
33330
+ return /*#__PURE__*/React.createElement(_typography__WEBPACK_IMPORTED_MODULE_4__.Label, {
33331
+ color: "gray_8",
33332
+ variant: "xs",
33333
+ style: {
33334
+ fontStyle: 'italic',
33335
+ padding: '12px'
33336
+ }
33337
+ }, "Empty");
33338
+ };
33311
33339
  var DropComp = function DropComp(props) {
33312
33340
  return /*#__PURE__*/React.createElement(SectionFlex, {
33313
33341
  flex_direction: "column",
@@ -38136,12 +38164,15 @@ __webpack_require__.r(__webpack_exports__);
38136
38164
 
38137
38165
  /*jslint react:true*/
38138
38166
  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); }
38167
+ var _excluded = ["Dragger", "isDragging"];
38168
+ 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; }
38169
+ 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; }
38170
+ 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); }
38139
38171
  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; }
38140
38172
  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; }
38141
38173
  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; }
38142
38174
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
38143
38175
  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); }
38144
- 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); }
38145
38176
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
38146
38177
  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."); }
38147
38178
  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); }
@@ -38162,7 +38193,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
38162
38193
 
38163
38194
  var CustomizeButton = function CustomizeButton(props) {
38164
38195
  var _useTableContext = (0,_context__WEBPACK_IMPORTED_MODULE_11__.useTableContext)(),
38165
- allColumns = _useTableContext.allColumns;
38196
+ allColumns = _useTableContext.allColumns,
38197
+ canOrderColumns = _useTableContext.canOrderColumns,
38198
+ orderLogic = _useTableContext.orderLogic;
38166
38199
  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''),
38167
38200
  _useState2 = _slicedToArray(_useState, 2),
38168
38201
  search = _useState2[0],
@@ -38175,16 +38208,13 @@ var CustomizeButton = function CustomizeButton(props) {
38175
38208
  });
38176
38209
  if (!columns.length) return null;
38177
38210
  var filtered = columns.filter(searchColumn(search));
38178
- var items = filtered.map(function (c) {
38179
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CustomizeButtonItem, _extends({
38180
- key: c.id
38181
- }, c));
38182
- });
38211
+ var orderProps = canOrderColumns && orderLogic;
38183
38212
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CustomizeButtonWithPopover, {
38184
38213
  popoverProps: _objectSpread(_objectSpread({}, props), {}, {
38185
- items: items,
38214
+ items: filtered,
38186
38215
  search: search,
38187
- setSearch: setSearch
38216
+ setSearch: setSearch,
38217
+ orderProps: orderProps
38188
38218
  })
38189
38219
  });
38190
38220
  };
@@ -38242,13 +38272,20 @@ var CustomizeButtonPopover = function CustomizeButtonPopover(props) {
38242
38272
  search = props.search,
38243
38273
  setSearch = props.setSearch,
38244
38274
  maxMenuHeight = props.maxMenuHeight,
38245
- items = props.items;
38275
+ items = props.items,
38276
+ orderProps = props.orderProps;
38277
+ var maxHeight = Number.parseInt(maxMenuHeight);
38278
+ var _maxMenuHeight = orderProps && (!maxHeight || maxHeight < 600) ? 600 : maxMenuHeight;
38246
38279
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(PopoverContainer, null, searchable && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Search, {
38247
38280
  search: search,
38248
38281
  setSearch: setSearch
38249
38282
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ItemsWrapper, {
38250
- $maxMenuHeight: maxMenuHeight
38251
- }, items));
38283
+ $maxMenuHeight: _maxMenuHeight
38284
+ }, orderProps ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CustomizeButtonDraggableItems, _extends({
38285
+ items: items
38286
+ }, orderProps)) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CustomizeButtonStaticItems, {
38287
+ items: items
38288
+ })));
38252
38289
  };
38253
38290
  CustomizeButtonPopover.displayName = 'CustomizeButtonPopover';
38254
38291
  var CustomizeButtonWithPopover = (0,_hoc__WEBPACK_IMPORTED_MODULE_3__.withPopover)(function (p) {
@@ -38260,6 +38297,82 @@ var CustomizeButtonWithPopover = (0,_hoc__WEBPACK_IMPORTED_MODULE_3__.withPopove
38260
38297
  }, CustomizeButtonPopover, {
38261
38298
  placement: 'bottom'
38262
38299
  });
38300
+ var CustomizeButtonStaticItems = function CustomizeButtonStaticItems(_ref) {
38301
+ var items = _ref.items;
38302
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, items.map(function (c) {
38303
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CustomizeButtonItem, _extends({
38304
+ key: c.id
38305
+ }, c));
38306
+ }));
38307
+ };
38308
+ var CustomizeButtonDraggableItems = function CustomizeButtonDraggableItems(props) {
38309
+ var items = props.items,
38310
+ orders = props.orders,
38311
+ moveColumn = props.moveColumn;
38312
+ var sections = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
38313
+ var _orders$pinned;
38314
+ return [((_orders$pinned = orders.pinned) === null || _orders$pinned === void 0 ? void 0 : _orders$pinned.length) && {
38315
+ name: 'Pinned',
38316
+ sectionId: 'pinned'
38317
+ }, {
38318
+ name: 'Visible',
38319
+ sectionId: 'visible'
38320
+ }, {
38321
+ name: 'Hidden',
38322
+ sectionId: 'hidden'
38323
+ }].filter(Boolean);
38324
+ }, [orders]);
38325
+ var sectionIds = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
38326
+ return sections.map(function (sec) {
38327
+ return sec.sectionId;
38328
+ });
38329
+ }, [sections]);
38330
+ var value = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
38331
+ var filtered = new Set(items.map(function (it) {
38332
+ return it.id;
38333
+ }));
38334
+ return sectionIds.map(function (sec) {
38335
+ return orders[sec].filter(function (id) {
38336
+ return filtered.has(id);
38337
+ });
38338
+ });
38339
+ }, [items, sectionIds, orders]);
38340
+ var onChange = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(function (newOrder, info) {
38341
+ var n,
38342
+ id = info.id,
38343
+ cat = sectionIds[info.destination.section];
38344
+ var dstIndex = info.destination.index;
38345
+ if (dstIndex == value[info.destination.section].length) n = orders[cat].length;else {
38346
+ var currentItem = value[info.destination.section][dstIndex];
38347
+ n = orders[cat].indexOf(currentItem);
38348
+ }
38349
+ moveColumn(id, cat, n);
38350
+ }, [sectionIds, value, orders, moveColumn]);
38351
+ var _items = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
38352
+ return items.map(function (it) {
38353
+ return _objectSpread({
38354
+ name: it.id
38355
+ }, it);
38356
+ });
38357
+ }, [items]);
38358
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_input__WEBPACK_IMPORTED_MODULE_6__.DragDrop, {
38359
+ value: value,
38360
+ onChange: onChange,
38361
+ items: _items,
38362
+ sections: sections,
38363
+ direction: "column",
38364
+ CustomDrag: CustomizeButtonDraggableItem
38365
+ });
38366
+ };
38367
+ var CustomizeButtonDraggableItem = function CustomizeButtonDraggableItem(props) {
38368
+ var Dragger = props.Dragger,
38369
+ isDragging = props.isDragging,
38370
+ itemProps = _objectWithoutProperties(props, _excluded);
38371
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_input__WEBPACK_IMPORTED_MODULE_6__.DragDrop.DraggableItem, {
38372
+ Dragger: Dragger,
38373
+ isDragging: isDragging
38374
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CustomizeButtonItem, itemProps));
38375
+ };
38263
38376
  var CustomizeButtonItem = function CustomizeButtonItem(props) {
38264
38377
  var id = props.id,
38265
38378
  name = props.name,
@@ -39113,7 +39226,7 @@ var useOrderLogic = function useOrderLogic(table) {
39113
39226
  pinnedColumns = _table$state.pinnedColumns,
39114
39227
  setColumnOrder = table.setColumnOrder,
39115
39228
  setHiddenColumns = table.setHiddenColumns,
39116
- setPinnedColumns = table.setPinnedColumns,
39229
+ togglePinColumn = table.togglePinColumn,
39117
39230
  allColumns = table.allColumns;
39118
39231
  var getColumnCategory = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (id) {
39119
39232
  if (hiddenColumns.includes(id)) return 'hidden';
@@ -39167,13 +39280,11 @@ var useOrderLogic = function useOrderLogic(table) {
39167
39280
  var category = getColumnCategory(id);
39168
39281
  var arr = orders[category];
39169
39282
  var n = arr.indexOf(id);
39170
- console.log('orders1', orders, category, n);
39171
39283
  if (n <= 0) return;
39172
39284
  var new_arr = arr.toSpliced(n, 1);
39173
39285
  new_arr.splice(n - 1, 0, id);
39174
39286
  var newOrder = _objectSpread({}, orders);
39175
39287
  newOrder[category] = new_arr;
39176
- console.log('orders', orders, newOrder);
39177
39288
  setOrders(newOrder);
39178
39289
  }, [getColumnCategory, orders, setOrders]);
39179
39290
  var moveForward = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (id) {
@@ -39194,12 +39305,12 @@ var useOrderLogic = function useOrderLogic(table) {
39194
39305
  newOrders[srcCat] = newOrders[srcCat].filter(function (_id) {
39195
39306
  return _id != id;
39196
39307
  });
39197
- newOrders[cat] = newOrders.toSpliced(n, 0, id);
39308
+ newOrders[cat] = newOrders[cat].toSpliced(n, 0, id);
39198
39309
  setOrders(newOrders);
39199
39310
  if (srcCat == cat) return;
39200
39311
  if (srcCat == 'hidden' || cat == 'hidden') setHiddenColumns(newOrders.hidden);
39201
- if (srcCat == 'pinned' || cat == 'pinned') setPinnedColumns(newOrders.pinned);
39202
- }, [getColumnCategory, orders, setOrders, setHiddenColumns, setPinnedColumns]);
39312
+ if (srcCat == 'pinned' || cat == 'pinned') togglePinColumn(id, cat == 'pinned');
39313
+ }, [getColumnCategory, orders, setOrders, setHiddenColumns]);
39203
39314
  var res = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
39204
39315
  return {
39205
39316
  orders: orders,