@oliasoft-open-source/react-ui-library 4.19.2-beta-3 → 4.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/global.css CHANGED
@@ -9375,14 +9375,14 @@ tbody:after {
9375
9375
  justify-content: space-between;
9376
9376
  border-top: 1px solid var(--color-border);
9377
9377
  }
9378
- ._clickableRow_kqvtd_1 {
9378
+ ._clickableRow_10f34_1 {
9379
9379
  cursor: pointer;
9380
9380
  }
9381
- ._hoverableRow_kqvtd_4:not(._rowActive_kqvtd_4):hover,
9382
- ._clickableRow_kqvtd_1:not(._rowActive_kqvtd_4):hover {
9381
+ ._hoverableRow_10f34_4:not(._rowActive_10f34_4):hover,
9382
+ ._clickableRow_10f34_1:not(._rowActive_10f34_4):hover {
9383
9383
  background-color: var(--color-background-listitem-hover) !important;
9384
9384
  }
9385
- ._expandableRow_kqvtd_8._flush_kqvtd_8 {
9385
+ ._expandableRow_10f34_8._flush_10f34_8 {
9386
9386
  padding: 0 !important;
9387
9387
  height: auto !important;
9388
9388
  }
@@ -9392,11 +9392,11 @@ tr[data-warning] {
9392
9392
  tr[data-error] {
9393
9393
  background-color: var(--color-background-error-muted) !important;
9394
9394
  }
9395
- ._rowActive_kqvtd_4 {
9395
+ ._rowActive_10f34_4 {
9396
9396
  position: relative;
9397
9397
  background-color: var(--color-background-listitem-active) !important;
9398
9398
  }
9399
- ._rowActive_kqvtd_4:after {
9399
+ ._rowActive_10f34_4:after {
9400
9400
  content: '';
9401
9401
  position: absolute;
9402
9402
  left: 0;
@@ -9408,12 +9408,12 @@ tr[data-error] {
9408
9408
  transition: background 0.3s;
9409
9409
  background: var(--color-background-primary);
9410
9410
  }
9411
- ._dragIconCell_kqvtd_34 {
9411
+ ._dragIconCell_10f34_34 {
9412
9412
  width: var(--size);
9413
9413
  min-width: var(--size);
9414
9414
  position: relative;
9415
9415
  }
9416
- ._dragIcon_kqvtd_34 {
9416
+ ._dragIcon_10f34_34 {
9417
9417
  display: flex;
9418
9418
  align-items: center;
9419
9419
  justify-content: center;
@@ -9422,16 +9422,13 @@ tr[data-error] {
9422
9422
  color: var(--color-text-faint);
9423
9423
  cursor: grab;
9424
9424
  }
9425
- ._dragIcon_kqvtd_34:hover {
9425
+ ._dragIcon_10f34_34:hover {
9426
9426
  color: var(--color-text-primary-hover);
9427
9427
  }
9428
- ._dragIcon_kqvtd_34:active {
9428
+ ._dragIcon_10f34_34:active {
9429
9429
  cursor: grabbing;
9430
9430
  color: var(--color-text-primary-active);
9431
9431
  }
9432
- ._dragIcon_kqvtd_34._dragIconDisabled_kqvtd_55 {
9433
- cursor: not-allowed;
9434
- }
9435
9432
  ._inputInTable_ie6ng_1 {
9436
9433
  background-color: transparent;
9437
9434
  border-radius: inherit !important;
package/dist/index.d.ts CHANGED
@@ -1346,10 +1346,6 @@ export declare interface ITableProps {
1346
1346
  from: number;
1347
1347
  to: number;
1348
1348
  }) => void;
1349
- canListReorder?: (obj: {
1350
- from: number;
1351
- to: number;
1352
- }) => boolean;
1353
1349
  table: ITableTableProps;
1354
1350
  }
1355
1351
 
package/dist/index.js CHANGED
@@ -199,21 +199,27 @@ function _objectWithoutPropertiesLoose$5(r2, e2) {
199
199
  }
200
200
  return t;
201
201
  }
202
- function _extends$4() {
203
- return _extends$4 = Object.assign ? Object.assign.bind() : function(n2) {
204
- for (var e2 = 1; e2 < arguments.length; e2++) {
205
- var t = arguments[e2];
206
- for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n2[r2] = t[r2]);
202
+ var _extends$6 = { exports: {} };
203
+ var hasRequired_extends;
204
+ function require_extends() {
205
+ if (hasRequired_extends) return _extends$6.exports;
206
+ hasRequired_extends = 1;
207
+ (function(module) {
208
+ function _extends3() {
209
+ return module.exports = _extends3 = Object.assign ? Object.assign.bind() : function(n2) {
210
+ for (var e2 = 1; e2 < arguments.length; e2++) {
211
+ var t = arguments[e2];
212
+ for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n2[r2] = t[r2]);
213
+ }
214
+ return n2;
215
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends3.apply(null, arguments);
207
216
  }
208
- return n2;
209
- }, _extends$4.apply(null, arguments);
217
+ module.exports = _extends3, module.exports.__esModule = true, module.exports["default"] = module.exports;
218
+ })(_extends$6);
219
+ return _extends$6.exports;
210
220
  }
211
- const _extends$5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
212
- __proto__: null,
213
- get default() {
214
- return _extends$4;
215
- }
216
- }, Symbol.toStringTag, { value: "Module" }));
221
+ var _extendsExports = require_extends();
222
+ const _extends$5 = /* @__PURE__ */ getDefaultExportFromCjs(_extendsExports);
217
223
  function _setPrototypeOf$3(t, e2) {
218
224
  return _setPrototypeOf$3 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e3) {
219
225
  return t2.__proto__ = e3, t2;
@@ -792,7 +798,7 @@ var ReactSVG = /* @__PURE__ */ function(_React$Component) {
792
798
  };
793
799
  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
794
800
  var _this3 = this;
795
- if (shallowDiffers(_extends$4({}, prevProps), this.props)) {
801
+ if (shallowDiffers(_extends$5({}, prevProps), this.props)) {
796
802
  this.setState(function() {
797
803
  return _this3.initialState;
798
804
  }, function() {
@@ -820,7 +826,7 @@ var ReactSVG = /* @__PURE__ */ function(_React$Component) {
820
826
  _this$props2.useRequestCache;
821
827
  var wrapper2 = _this$props2.wrapper, rest = _objectWithoutPropertiesLoose$5(_this$props2, _excluded$8);
822
828
  var Wrapper2 = wrapper2;
823
- return /* @__PURE__ */ React$4.createElement(Wrapper2, _extends$4({}, rest, {
829
+ return /* @__PURE__ */ React$4.createElement(Wrapper2, _extends$5({}, rest, {
824
830
  ref: this.refCallback
825
831
  }, wrapper2 === "svg" ? {
826
832
  xmlns: svgNamespace,
@@ -2235,8 +2241,8 @@ function _createClass(Constructor, protoProps, staticProps) {
2235
2241
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
2236
2242
  return Constructor;
2237
2243
  }
2238
- function _extends$3() {
2239
- _extends$3 = Object.assign || function(target) {
2244
+ function _extends$4() {
2245
+ _extends$4 = Object.assign || function(target) {
2240
2246
  for (var i = 1; i < arguments.length; i++) {
2241
2247
  var source = arguments[i];
2242
2248
  for (var key2 in source) {
@@ -2247,7 +2253,7 @@ function _extends$3() {
2247
2253
  }
2248
2254
  return target;
2249
2255
  };
2250
- return _extends$3.apply(this, arguments);
2256
+ return _extends$4.apply(this, arguments);
2251
2257
  }
2252
2258
  function _inheritsLoose$2(subClass, superClass) {
2253
2259
  subClass.prototype = Object.create(superClass.prototype);
@@ -2571,7 +2577,7 @@ function useTrackElements(_ref) {
2571
2577
  var layerRef = useTrackRef(useCallback(function(layer2) {
2572
2578
  var _get3 = get3(), previousLayer = _get3.layer;
2573
2579
  set2(function(state) {
2574
- return _extends$3({}, state, {
2580
+ return _extends$4({}, state, {
2575
2581
  layer: layer2
2576
2582
  });
2577
2583
  });
@@ -2594,7 +2600,7 @@ function useTrackElements(_ref) {
2594
2600
  var scrollContainers = getScrollContainers(trigger2);
2595
2601
  var _get4 = get3(), previousTrigger = _get4.trigger;
2596
2602
  set2(function(state) {
2597
- return _extends$3({}, state, {
2603
+ return _extends$4({}, state, {
2598
2604
  trigger: trigger2,
2599
2605
  scrollContainers
2600
2606
  });
@@ -2607,7 +2613,7 @@ function useTrackElements(_ref) {
2607
2613
  return;
2608
2614
  }
2609
2615
  set2(function(state) {
2610
- return _extends$3({}, state, {
2616
+ return _extends$4({}, state, {
2611
2617
  scrollContainers: getScrollContainers(triggerOptionParent)
2612
2618
  });
2613
2619
  });
@@ -2774,7 +2780,7 @@ var BoundSide = {
2774
2780
  left: /* @__PURE__ */ createSide("left"),
2775
2781
  right: /* @__PURE__ */ createSide("right")
2776
2782
  };
2777
- var Side = /* @__PURE__ */ _extends$3({}, BoundSide, {
2783
+ var Side = /* @__PURE__ */ _extends$4({}, BoundSide, {
2778
2784
  center: /* @__PURE__ */ createSide("center")
2779
2785
  });
2780
2786
  var SIDES = ["top", "left", "bottom", "right"];
@@ -2870,7 +2876,7 @@ var Bounds = /* @__PURE__ */ function() {
2870
2876
  var _environment$getCompu = environment2.getComputedStyle(element), width2 = _environment$getCompu.width, height2 = _environment$getCompu.height, boxSizing = _environment$getCompu.boxSizing, borderLeft = _environment$getCompu.borderLeft, borderRight = _environment$getCompu.borderRight, borderTop = _environment$getCompu.borderTop, borderBottom = _environment$getCompu.borderBottom, paddingLeft = _environment$getCompu.paddingLeft, paddingRight = _environment$getCompu.paddingRight, paddingTop = _environment$getCompu.paddingTop, paddingBottom = _environment$getCompu.paddingBottom;
2871
2877
  var boxWidth = boxSizing === "border-box" ? getPixelValue(width2) : sumOfPropertyValues(width2, borderLeft, borderRight, paddingLeft, paddingRight);
2872
2878
  var boxHeight = boxSizing === "border-box" ? getPixelValue(height2) : sumOfPropertyValues(height2, borderTop, borderBottom, paddingTop, paddingBottom);
2873
- bounds = new Bounds2(_extends$3({}, bounds, {
2879
+ bounds = new Bounds2(_extends$4({}, bounds, {
2874
2880
  width: boxWidth,
2875
2881
  height: boxHeight
2876
2882
  }));
@@ -2917,7 +2923,7 @@ var Bounds = /* @__PURE__ */ function() {
2917
2923
  };
2918
2924
  _proto.merge = function merge(partialBoundsOrMergeFn) {
2919
2925
  var current = this.toObject();
2920
- return new Bounds2(_extends$3({}, current, typeof partialBoundsOrMergeFn === "function" ? partialBoundsOrMergeFn(current) : partialBoundsOrMergeFn));
2926
+ return new Bounds2(_extends$4({}, current, typeof partialBoundsOrMergeFn === "function" ? partialBoundsOrMergeFn(current) : partialBoundsOrMergeFn));
2921
2927
  };
2922
2928
  _proto.substract = function substract(bounds) {
2923
2929
  var result = this.toObject();
@@ -2984,7 +2990,7 @@ var Placement = /* @__PURE__ */ function() {
2984
2990
  typeof layerDimensions === "function" ? layerDimensions(this.primary.prop) : layerDimensions
2985
2991
  );
2986
2992
  this.subjectsBounds = subjectBounds.merge({
2987
- layer: _extends$3({}, subjectBounds.layer, dimensions)
2993
+ layer: _extends$4({}, subjectBounds.layer, dimensions)
2988
2994
  });
2989
2995
  };
2990
2996
  _proto.getLayerBounds = function getLayerBounds(secondaryOffset) {
@@ -3159,7 +3165,7 @@ function getArrowStyle(subjectsBounds, placement, arrowOffset) {
3159
3165
  var primarySide = placement.primary.prop;
3160
3166
  var secondarySide = placement.primary.oppositeCssProp;
3161
3167
  var secondaryValue = triggerIsBigger ? layer2[sizeProperty] / 2 + negativeOffset : trigger2[secondarySide] + trigger2[sizeProperty] / 2 - layer2[secondarySide];
3162
- return _extends$3({}, STYLE_BASE, (_extends22 = {}, _extends22[primarySide] = "100%", _extends22[secondarySide] = limit(secondaryValue, min, max), _extends22));
3168
+ return _extends$4({}, STYLE_BASE, (_extends22 = {}, _extends22[primarySide] = "100%", _extends22[secondarySide] = limit(secondaryValue, min, max), _extends22));
3163
3169
  }
3164
3170
  var Placements = /* @__PURE__ */ function() {
3165
3171
  function Placements2(placements, config, subjectsBounds) {
@@ -3288,11 +3294,11 @@ var Placements = /* @__PURE__ */ function() {
3288
3294
  var arrow2 = getArrowStyle(this.subjectsBounds.merge({
3289
3295
  layer: layerBounds
3290
3296
  }), placement, this.config.arrowOffset);
3291
- var layer2 = this.config.overflowContainer ? _extends$3({}, layerStyleBase, {
3297
+ var layer2 = this.config.overflowContainer ? _extends$4({}, layerStyleBase, {
3292
3298
  position: "fixed",
3293
3299
  top: layerBounds.top,
3294
3300
  left: layerBounds.left
3295
- }) : _extends$3({}, layerStyleBase, {
3301
+ }) : _extends$4({}, layerStyleBase, {
3296
3302
  position: "absolute",
3297
3303
  top: layerBounds.top - this.subjectsBounds.parent.top + scrollOffsets.top - borderOffsets.top,
3298
3304
  left: layerBounds.left - this.subjectsBounds.parent.left + scrollOffsets.left - borderOffsets.left
@@ -3367,7 +3373,7 @@ var SubjectsBounds = /* @__PURE__ */ function() {
3367
3373
  };
3368
3374
  var _proto = SubjectsBounds2.prototype;
3369
3375
  _proto.merge = function merge(subjectsBounds) {
3370
- return new SubjectsBounds2(_extends$3({}, this, subjectsBounds), this.overflowContainer);
3376
+ return new SubjectsBounds2(_extends$4({}, this, subjectsBounds), this.overflowContainer);
3371
3377
  };
3372
3378
  _proto.offsetsToScrollContainers = function offsetsToScrollContainers(subject, allContainers) {
3373
3379
  if (allContainers === void 0) {
@@ -3602,10 +3608,10 @@ var Arrow = /* @__PURE__ */ forwardRef(function Arrow2(_ref2, ref) {
3602
3608
  var sizeA = size2;
3603
3609
  var sizeB = getWidthBasedOnAngle(angle, size2) * 2;
3604
3610
  var maxSize = Math.max(sizeA, sizeB);
3605
- return createElement("svg", _extends$3({
3611
+ return createElement("svg", _extends$4({
3606
3612
  ref
3607
3613
  }, rest, {
3608
- style: _extends$3({}, style, {
3614
+ style: _extends$4({}, style, {
3609
3615
  transform: "translate" + (side.isHorizontal ? "Y" : "X") + "(-50%)"
3610
3616
  }),
3611
3617
  width: maxSize,
@@ -8269,8 +8275,8 @@ function _interopRequireWildcard$2(obj, nodeInterop) {
8269
8275
  }
8270
8276
  return newObj;
8271
8277
  }
8272
- function _extends$2() {
8273
- _extends$2 = Object.assign ? Object.assign.bind() : function(target) {
8278
+ function _extends$3() {
8279
+ _extends$3 = Object.assign ? Object.assign.bind() : function(target) {
8274
8280
  for (var i = 1; i < arguments.length; i++) {
8275
8281
  var source = arguments[i];
8276
8282
  for (var key2 in source) {
@@ -8281,7 +8287,7 @@ function _extends$2() {
8281
8287
  }
8282
8288
  return target;
8283
8289
  };
8284
- return _extends$2.apply(this, arguments);
8290
+ return _extends$3.apply(this, arguments);
8285
8291
  }
8286
8292
  function _objectWithoutPropertiesLoose$3(source, excluded) {
8287
8293
  if (source == null) return {};
@@ -8486,7 +8492,7 @@ var Resizable$1 = /* @__PURE__ */ function(_React$Component) {
8486
8492
  children: [].concat(children.props.children, resizeHandles.map(function(handleAxis) {
8487
8493
  var _this3$handleRefs$han;
8488
8494
  var ref = (_this3$handleRefs$han = _this3.handleRefs[handleAxis]) != null ? _this3$handleRefs$han : _this3.handleRefs[handleAxis] = /* @__PURE__ */ React$2.createRef();
8489
- return /* @__PURE__ */ React$2.createElement(_reactDraggable.DraggableCore, _extends$2({}, draggableOpts, {
8495
+ return /* @__PURE__ */ React$2.createElement(_reactDraggable.DraggableCore, _extends$3({}, draggableOpts, {
8490
8496
  nodeRef: ref,
8491
8497
  key: "resizableHandle-" + handleAxis,
8492
8498
  onStop: _this3.resizeHandler("onResizeStop", handleAxis),
@@ -8557,8 +8563,8 @@ function _interopRequireWildcard$1(obj, nodeInterop) {
8557
8563
  }
8558
8564
  return newObj;
8559
8565
  }
8560
- function _extends$1() {
8561
- _extends$1 = Object.assign ? Object.assign.bind() : function(target) {
8566
+ function _extends$2() {
8567
+ _extends$2 = Object.assign ? Object.assign.bind() : function(target) {
8562
8568
  for (var i = 1; i < arguments.length; i++) {
8563
8569
  var source = arguments[i];
8564
8570
  for (var key2 in source) {
@@ -8569,7 +8575,7 @@ function _extends$1() {
8569
8575
  }
8570
8576
  return target;
8571
8577
  };
8572
- return _extends$1.apply(this, arguments);
8578
+ return _extends$2.apply(this, arguments);
8573
8579
  }
8574
8580
  function ownKeys$1(object2, enumerableOnly) {
8575
8581
  var keys2 = Object.keys(object2);
@@ -8700,7 +8706,7 @@ var ResizableBox = /* @__PURE__ */ function(_React$Component) {
8700
8706
  resizeHandles,
8701
8707
  transformScale,
8702
8708
  width: this.state.width
8703
- }, /* @__PURE__ */ React$1.createElement("div", _extends$1({}, props, {
8709
+ }, /* @__PURE__ */ React$1.createElement("div", _extends$2({}, props, {
8704
8710
  style: _objectSpread$5(_objectSpread$5({}, style), {}, {
8705
8711
  width: this.state.width + "px",
8706
8712
  height: this.state.height + "px"
@@ -13873,9 +13879,6 @@ const ListDragWrapper = ({
13873
13879
  onListReorder
13874
13880
  }) => {
13875
13881
  const [dragIndex, setDragIndex] = useState(null);
13876
- if (!draggable) {
13877
- return children;
13878
- }
13879
13882
  const handleDragStart2 = (event) => {
13880
13883
  setDragIndex(event.active.id);
13881
13884
  };
@@ -13895,6 +13898,9 @@ const ListDragWrapper = ({
13895
13898
  () => list2.items.map((_2, index2) => index2.toString()),
13896
13899
  [list2.items]
13897
13900
  );
13901
+ if (!draggable) {
13902
+ return children;
13903
+ }
13898
13904
  return /* @__PURE__ */ jsxs(
13899
13905
  DndContext$1,
13900
13906
  {
@@ -15692,6 +15698,15 @@ const useWindowWidth = () => {
15692
15698
  }, []);
15693
15699
  return width2;
15694
15700
  };
15701
+ function _extends$1() {
15702
+ return _extends$1 = Object.assign ? Object.assign.bind() : function(n2) {
15703
+ for (var e2 = 1; e2 < arguments.length; e2++) {
15704
+ var t = arguments[e2];
15705
+ for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n2[r2] = t[r2]);
15706
+ }
15707
+ return n2;
15708
+ }, _extends$1.apply(null, arguments);
15709
+ }
15695
15710
  function _assertThisInitialized(e2) {
15696
15711
  if (void 0 === e2) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
15697
15712
  return e2;
@@ -16064,7 +16079,7 @@ function createListComponent(_ref) {
16064
16079
  className,
16065
16080
  onScroll,
16066
16081
  ref: this._outerRefSetter,
16067
- style: _extends$4({
16082
+ style: _extends$1({
16068
16083
  position: "relative",
16069
16084
  height: height2,
16070
16085
  width: width2,
@@ -48152,7 +48167,6 @@ var interopRequireDefault = { exports: {} };
48152
48167
  module.exports = _interopRequireDefault2, module.exports.__esModule = true, module.exports["default"] = module.exports;
48153
48168
  })(interopRequireDefault);
48154
48169
  var interopRequireDefaultExports = interopRequireDefault.exports;
48155
- const require$$2 = /* @__PURE__ */ getAugmentedNamespace(_extends$5);
48156
48170
  const richTextToolbar = "_richTextToolbar_1gbkk_1";
48157
48171
  const richTextToolbarContainer = "_richTextToolbarContainer_1gbkk_5";
48158
48172
  const styles$h = {
@@ -49453,7 +49467,7 @@ var Handle$2 = /* @__PURE__ */ React$4.forwardRef(function(props, ref) {
49453
49467
  }
49454
49468
  };
49455
49469
  var positionStyle = getDirectionStyle(direction, value, min, max);
49456
- var handleNode = /* @__PURE__ */ React$4.createElement("div", _extends$4({
49470
+ var handleNode = /* @__PURE__ */ React$4.createElement("div", _extends$1({
49457
49471
  ref,
49458
49472
  className: cx$2(handlePrefixCls, (_classNames = {}, _defineProperty$7(_classNames, "".concat(handlePrefixCls, "-").concat(valueIndex + 1), range2), _defineProperty$7(_classNames, "".concat(handlePrefixCls, "-dragging"), dragging), _classNames)),
49459
49473
  style: _objectSpread2$1(_objectSpread2$1({}, positionStyle), style),
@@ -49497,7 +49511,7 @@ var Handles = /* @__PURE__ */ React$4.forwardRef(function(props, ref) {
49497
49511
  };
49498
49512
  });
49499
49513
  return /* @__PURE__ */ React$4.createElement(React$4.Fragment, null, values2.map(function(value, index2) {
49500
- return /* @__PURE__ */ React$4.createElement(Handle$2, _extends$4({
49514
+ return /* @__PURE__ */ React$4.createElement(Handle$2, _extends$1({
49501
49515
  ref: function ref2(node2) {
49502
49516
  if (!node2) {
49503
49517
  delete handlesRef.current[index2];
@@ -50867,7 +50881,7 @@ Object.defineProperty(Handle$1, "__esModule", {
50867
50881
  value: true
50868
50882
  });
50869
50883
  var default_1 = Handle$1.default = void 0;
50870
- var _extends2 = _interopRequireDefault(require$$2);
50884
+ var _extends2 = _interopRequireDefault(require_extends());
50871
50885
  var _objectSpread2 = _interopRequireDefault(requireObjectSpread2());
50872
50886
  var _defineProperty2 = _interopRequireDefault(requireDefineProperty());
50873
50887
  var _objectWithoutProperties2 = _interopRequireDefault(requireObjectWithoutProperties());
@@ -51263,14 +51277,13 @@ const hasActions = (rows) => rows.reduce(
51263
51277
  const hasRowActions = (rows, headers) => {
51264
51278
  return hasActions(headers) > 0 || hasActions(rows) > 0;
51265
51279
  };
51266
- const clickableRow = "_clickableRow_kqvtd_1";
51267
- const hoverableRow = "_hoverableRow_kqvtd_4";
51268
- const rowActive = "_rowActive_kqvtd_4";
51269
- const expandableRow = "_expandableRow_kqvtd_8";
51270
- const flush = "_flush_kqvtd_8";
51271
- const dragIconCell = "_dragIconCell_kqvtd_34";
51272
- const dragIcon = "_dragIcon_kqvtd_34";
51273
- const dragIconDisabled = "_dragIconDisabled_kqvtd_55";
51280
+ const clickableRow = "_clickableRow_10f34_1";
51281
+ const hoverableRow = "_hoverableRow_10f34_4";
51282
+ const rowActive = "_rowActive_10f34_4";
51283
+ const expandableRow = "_expandableRow_10f34_8";
51284
+ const flush = "_flush_10f34_8";
51285
+ const dragIconCell = "_dragIconCell_10f34_34";
51286
+ const dragIcon = "_dragIcon_10f34_34";
51274
51287
  const styles$9 = {
51275
51288
  clickableRow,
51276
51289
  hoverableRow,
@@ -51278,8 +51291,7 @@ const styles$9 = {
51278
51291
  expandableRow,
51279
51292
  flush,
51280
51293
  dragIconCell,
51281
- dragIcon,
51282
- dragIconDisabled
51294
+ dragIcon
51283
51295
  };
51284
51296
  const ExpandedContentRow = ({
51285
51297
  colSpan,
@@ -51976,7 +51988,6 @@ const Row = ({
51976
51988
  hasRowActions: hasRowActions2,
51977
51989
  draggableTable = false,
51978
51990
  columnWidths,
51979
- dropDisabled = false,
51980
51991
  height: height2,
51981
51992
  testId
51982
51993
  //TODO: add testId
@@ -52034,8 +52045,8 @@ const Row = ({
52034
52045
  animateLayoutChanges: () => false
52035
52046
  });
52036
52047
  const style = {
52037
- transform: !dropDisabled ? CSS.Translate.toString(transform) : void 0,
52038
52048
  height: height2,
52049
+ transform: CSS.Transform.toString(transform),
52039
52050
  transition,
52040
52051
  opacity: isDragging ? 0 : void 0
52041
52052
  };
@@ -52043,18 +52054,7 @@ const Row = ({
52043
52054
  if (row2.noDrag) {
52044
52055
  return /* @__PURE__ */ jsx("td", { "aria-labelledby": "unique-label-id" });
52045
52056
  }
52046
- return /* @__PURE__ */ jsx("td", { className: styles$9.dragIconCell, children: /* @__PURE__ */ jsx(
52047
- "div",
52048
- {
52049
- className: cx$2(
52050
- styles$9.dragIcon,
52051
- dropDisabled ? styles$9.dragIconDisabled : ""
52052
- ),
52053
- ...attributes,
52054
- ...listeners,
52055
- children: /* @__PURE__ */ jsx(Icon, { icon: IconType.DRAG })
52056
- }
52057
- ) });
52057
+ return /* @__PURE__ */ jsx("td", { className: styles$9.dragIconCell, children: /* @__PURE__ */ jsx("div", { className: styles$9.dragIcon, ...attributes, ...listeners, children: /* @__PURE__ */ jsx(Icon, { icon: IconType.DRAG }) }) });
52058
52058
  };
52059
52059
  return isHeader ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
52060
52060
  /* @__PURE__ */ jsxs(
@@ -52135,44 +52135,28 @@ const TableDragWrapper = (props) => {
52135
52135
  draggable,
52136
52136
  onListReorder = () => {
52137
52137
  },
52138
- canListReorder = () => true,
52139
52138
  rowActions,
52140
52139
  rows = [],
52141
52140
  tbodyRef
52142
52141
  } = props;
52143
52142
  const [dragIndex, setDragIndex] = useState(null);
52144
- const [canDragToIndexes, setCanDragToIndexes] = useState([]);
52145
- const [dropDisabled, setDropDisabled] = useState(false);
52146
52143
  const itemIds = useMemo(
52147
52144
  () => rows.map((_2, index2) => index2.toString()),
52148
52145
  [rows]
52149
52146
  );
52150
52147
  const handleDragStart2 = (event) => {
52151
52148
  setDragIndex(event.active.id);
52152
- const enabledIndexes = rows.map((_2, index2) => index2).filter((index2) => {
52153
- if (rows[index2].noDrag) return false;
52154
- if (canListReorder({ from: Number(event.active.id), to: index2 }))
52155
- return true;
52156
- return false;
52157
- });
52158
- setCanDragToIndexes(enabledIndexes);
52159
52149
  };
52160
52150
  const handleDragEnd = (event) => {
52161
52151
  setDragIndex(null);
52162
- setDropDisabled(false);
52163
- setCanDragToIndexes([]);
52164
52152
  const { active: active2, over } = event;
52165
- if (!active2 || !over || active2.id === over.id) return;
52166
- if (!canDragToIndexes.includes(Number(over.id))) return;
52167
- onListReorder({
52168
- from: Number(active2.id),
52169
- to: Number(over.id)
52170
- });
52171
- };
52172
- const handleDragOver = (event) => {
52173
- const { active: active2, over } = event;
52174
- const disabled2 = (active2 == null ? void 0 : active2.id) !== (over == null ? void 0 : over.id) && !canDragToIndexes.includes(Number(over == null ? void 0 : over.id));
52175
- setDropDisabled(disabled2);
52153
+ if (!active2 || !over) return;
52154
+ if (active2.id !== over.id) {
52155
+ onListReorder({
52156
+ from: Number(active2.id),
52157
+ to: Number(over.id)
52158
+ });
52159
+ }
52176
52160
  };
52177
52161
  const getCalculatedWidths = () => {
52178
52162
  if (!(tbodyRef == null ? void 0 : tbodyRef.current)) return [];
@@ -52180,22 +52164,19 @@ const TableDragWrapper = (props) => {
52180
52164
  const activeRow = rows2[Number(dragIndex)];
52181
52165
  const cells = activeRow == null ? void 0 : activeRow.querySelectorAll("td");
52182
52166
  if (!cells) return [];
52183
- const widths = Array.from(cells).map(
52184
- (cell2) => `${cell2.getBoundingClientRect().width}px`
52185
- );
52167
+ const widths = Array.from(cells).map((cell2) => `${cell2.offsetWidth}px`);
52186
52168
  widths.shift();
52187
52169
  return widths;
52188
52170
  };
52189
- if (!draggable) return children({});
52171
+ if (!draggable) return children;
52190
52172
  return /* @__PURE__ */ jsxs(
52191
52173
  DndContext$1,
52192
52174
  {
52193
52175
  collisionDetection: closestCenter,
52194
52176
  onDragStart: handleDragStart2,
52195
52177
  onDragEnd: handleDragEnd,
52196
- onDragOver: handleDragOver,
52197
52178
  children: [
52198
- /* @__PURE__ */ jsx(SortableContext, { items: itemIds, strategy: verticalListSortingStrategy, children: children({ dropDisabled }) }),
52179
+ /* @__PURE__ */ jsx(SortableContext, { items: itemIds, strategy: verticalListSortingStrategy, children }),
52199
52180
  !!dragIndex && createPortal(
52200
52181
  /* @__PURE__ */ jsx(DragOverlay, { dropAnimation: null, children: /* @__PURE__ */ jsx("table", { className: cx$2(styles$c.table, styles$c.dragOverlay), children: /* @__PURE__ */ jsx("tbody", { children: /* @__PURE__ */ jsx(
52201
52182
  Row,
@@ -52207,8 +52188,7 @@ const TableDragWrapper = (props) => {
52207
52188
  colSpan,
52208
52189
  hasRowActions: rowActions,
52209
52190
  columnAlignment,
52210
- draggableTable: draggable,
52211
- dropDisabled
52191
+ draggableTable: draggable
52212
52192
  }
52213
52193
  ) }) }) }),
52214
52194
  document.body
@@ -52257,12 +52237,8 @@ const TableScrollWrapper = ({
52257
52237
  };
52258
52238
  const Table = (props) => {
52259
52239
  var _a2, _b, _c, _d, _e2, _f, _g;
52260
- const {
52261
- onListReorder = () => {
52262
- },
52263
- canListReorder = () => true,
52264
- table: propTable
52265
- } = props;
52240
+ const { onListReorder = () => {
52241
+ }, table: propTable } = props;
52266
52242
  const {
52267
52243
  columnWidths,
52268
52244
  footer: footer2,
@@ -52354,65 +52330,64 @@ const Table = (props) => {
52354
52330
  rowActions,
52355
52331
  rows,
52356
52332
  tbodyRef,
52357
- canListReorder,
52358
- children: ({ dropDisabled }) => /* @__PURE__ */ jsx(TableScrollWrapper, { table: table2, theadRef, children: ({ virtualizer, tableStyle }) => /* @__PURE__ */ jsxs(
52359
- "table",
52360
- {
52361
- className: cx$2(styles$c.table, striped2 ? styles$c.striped : ""),
52362
- "data-testid": testId,
52363
- style: tableStyle,
52364
- children: [
52365
- /* @__PURE__ */ jsx("thead", { ref: theadRef, children: headers.map((row2, rowIndex) => {
52366
- return /* @__PURE__ */ jsx(
52333
+ children: /* @__PURE__ */ jsx(TableScrollWrapper, { table: table2, theadRef, children: ({ virtualizer, tableStyle }) => {
52334
+ return /* @__PURE__ */ jsxs(
52335
+ "table",
52336
+ {
52337
+ className: cx$2(styles$c.table, striped2 ? styles$c.striped : ""),
52338
+ "data-testid": testId,
52339
+ style: tableStyle,
52340
+ children: [
52341
+ /* @__PURE__ */ jsx("thead", { ref: theadRef, children: headers.map((row2, rowIndex) => {
52342
+ return /* @__PURE__ */ jsx(
52343
+ Row,
52344
+ {
52345
+ rowIndex,
52346
+ isHeader: true,
52347
+ row: row2,
52348
+ columnCount,
52349
+ columnWidths,
52350
+ colSpan,
52351
+ hasRowActions: rowActions,
52352
+ columnAlignment,
52353
+ columnHeaderAlignments,
52354
+ draggableTable: draggable
52355
+ },
52356
+ `0_${rowIndex}`
52357
+ );
52358
+ }) }),
52359
+ /* @__PURE__ */ jsx("tbody", { ref: tbodyRef, children: virtualizer ? virtualizer.getVirtualItems().map((virtualRow2) => /* @__PURE__ */ jsx(
52360
+ Row,
52361
+ {
52362
+ rowIndex: virtualRow2.index,
52363
+ row: rows[virtualRow2.index],
52364
+ columnCount,
52365
+ columnWidths,
52366
+ colSpan,
52367
+ hasRowActions: rowActions,
52368
+ columnAlignment,
52369
+ draggableTable: draggable,
52370
+ height: virtualRow2.size
52371
+ },
52372
+ `1_${virtualRow2.index}`
52373
+ )) : rows.map((row2, index2) => /* @__PURE__ */ jsx(
52367
52374
  Row,
52368
52375
  {
52369
- rowIndex,
52370
- isHeader: true,
52376
+ rowIndex: index2,
52371
52377
  row: row2,
52372
52378
  columnCount,
52373
52379
  columnWidths,
52374
52380
  colSpan,
52375
52381
  hasRowActions: rowActions,
52376
52382
  columnAlignment,
52377
- columnHeaderAlignments,
52378
52383
  draggableTable: draggable
52379
52384
  },
52380
- `0_${rowIndex}`
52381
- );
52382
- }) }),
52383
- /* @__PURE__ */ jsx("tbody", { ref: tbodyRef, children: virtualizer ? virtualizer.getVirtualItems().map((virtualRow2) => /* @__PURE__ */ jsx(
52384
- Row,
52385
- {
52386
- rowIndex: virtualRow2.index,
52387
- row: rows[virtualRow2.index],
52388
- columnCount,
52389
- columnWidths,
52390
- colSpan,
52391
- hasRowActions: rowActions,
52392
- columnAlignment,
52393
- draggableTable: draggable,
52394
- height: virtualRow2.size,
52395
- dropDisabled
52396
- },
52397
- `1_${virtualRow2.index}`
52398
- )) : rows.map((row2, index2) => /* @__PURE__ */ jsx(
52399
- Row,
52400
- {
52401
- rowIndex: index2,
52402
- row: row2,
52403
- columnCount,
52404
- columnWidths,
52405
- colSpan,
52406
- hasRowActions: rowActions,
52407
- columnAlignment,
52408
- draggableTable: draggable,
52409
- dropDisabled
52410
- },
52411
- `1_${index2}`
52412
- )) })
52413
- ]
52414
- }
52415
- ) })
52385
+ `1_${index2}`
52386
+ )) })
52387
+ ]
52388
+ }
52389
+ );
52390
+ } })
52416
52391
  }
52417
52392
  ),
52418
52393
  footer2 && /* @__PURE__ */ jsx(