radar-ui 1.1.2 → 1.1.3

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.
Files changed (2) hide show
  1. package/dist/index.js +59 -59
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -158,7 +158,7 @@ function bt() {
158
158
  t++;
159
159
  }
160
160
  }
161
- function _() {
161
+ function x() {
162
162
  {
163
163
  if (t--, t === 0) {
164
164
  var e = {
@@ -260,17 +260,17 @@ function bt() {
260
260
  }
261
261
  } catch (te) {
262
262
  if (te && d && typeof te.stack == "string") {
263
- for (var x = te.stack.split(`
263
+ for (var _ = te.stack.split(`
264
264
  `), ee = d.stack.split(`
265
- `), J = x.length - 1, X = ee.length - 1; J >= 1 && X >= 0 && x[J] !== ee[X]; )
265
+ `), J = _.length - 1, X = ee.length - 1; J >= 1 && X >= 0 && _[J] !== ee[X]; )
266
266
  X--;
267
267
  for (; J >= 1 && X >= 0; J--, X--)
268
- if (x[J] !== ee[X]) {
268
+ if (_[J] !== ee[X]) {
269
269
  if (J !== 1 || X !== 1)
270
270
  do
271
- if (J--, X--, X < 0 || x[J] !== ee[X]) {
271
+ if (J--, X--, X < 0 || _[J] !== ee[X]) {
272
272
  var re = `
273
- ` + x[J].replace(" at new ", " at ");
273
+ ` + _[J].replace(" at new ", " at ");
274
274
  return e.displayName && re.includes("<anonymous>") && (re = re.replace("<anonymous>", e.displayName)), typeof e == "function" && ie.set(e, re), re;
275
275
  }
276
276
  while (J >= 1 && X >= 0);
@@ -278,7 +278,7 @@ function bt() {
278
278
  }
279
279
  }
280
280
  } finally {
281
- de = !1, Q.current = W, _(), Error.prepareStackTrace = P;
281
+ de = !1, Q.current = W, x(), Error.prepareStackTrace = P;
282
282
  }
283
283
  var ce = e ? e.displayName || e.name : "", se = ce ? le(ce) : "";
284
284
  return typeof e == "function" && ie.set(e, se), se;
@@ -332,17 +332,17 @@ function bt() {
332
332
  var W = Function.call.bind(fe);
333
333
  for (var R in e)
334
334
  if (W(e, R)) {
335
- var x = void 0;
335
+ var _ = void 0;
336
336
  try {
337
337
  if (typeof e[R] != "function") {
338
338
  var ee = Error((d || "React class") + ": " + a + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
339
339
  throw ee.name = "Invariant Violation", ee;
340
340
  }
341
- x = e[R](r, R, d, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
341
+ _ = e[R](r, R, d, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
342
342
  } catch (J) {
343
- x = J;
343
+ _ = J;
344
344
  }
345
- x && !(x instanceof Error) && (ye(P), n("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", d || "React class", a, R, typeof x), ye(null)), x instanceof Error && !(x.message in ke) && (ke[x.message] = !0, ye(P), n("Failed %s type: %s", a, x.message), ye(null));
345
+ _ && !(_ instanceof Error) && (ye(P), n("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", d || "React class", a, R, typeof _), ye(null)), _ instanceof Error && !(_.message in ke) && (ke[_.message] = !0, ye(P), n("Failed %s type: %s", a, _.message), ye(null));
346
346
  }
347
347
  }
348
348
  }
@@ -418,7 +418,7 @@ function bt() {
418
418
  }
419
419
  }
420
420
  var nt = function(e, r, a, d, P, W, R) {
421
- var x = {
421
+ var _ = {
422
422
  // This tag allows us to uniquely identify this as a React Element
423
423
  $$typeof: l,
424
424
  // Built-in properties that belong on the element
@@ -429,27 +429,27 @@ function bt() {
429
429
  // Record the component responsible for creating this element.
430
430
  _owner: W
431
431
  };
432
- return x._store = {}, Object.defineProperty(x._store, "validated", {
432
+ return _._store = {}, Object.defineProperty(_._store, "validated", {
433
433
  configurable: !1,
434
434
  enumerable: !1,
435
435
  writable: !0,
436
436
  value: !1
437
- }), Object.defineProperty(x, "_self", {
437
+ }), Object.defineProperty(_, "_self", {
438
438
  configurable: !1,
439
439
  enumerable: !1,
440
440
  writable: !1,
441
441
  value: d
442
- }), Object.defineProperty(x, "_source", {
442
+ }), Object.defineProperty(_, "_source", {
443
443
  configurable: !1,
444
444
  enumerable: !1,
445
445
  writable: !1,
446
446
  value: P
447
- }), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
447
+ }), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
448
448
  };
449
449
  function at(e, r, a, d, P) {
450
450
  {
451
- var W, R = {}, x = null, ee = null;
452
- a !== void 0 && (Se(a), x = "" + a), Qe(r) && (Se(r.key), x = "" + r.key), Ke(r) && (ee = r.ref, et(r, P));
451
+ var W, R = {}, _ = null, ee = null;
452
+ a !== void 0 && (Se(a), _ = "" + a), Qe(r) && (Se(r.key), _ = "" + r.key), Ke(r) && (ee = r.ref, et(r, P));
453
453
  for (W in r)
454
454
  fe.call(r, W) && !qe.hasOwnProperty(W) && (R[W] = r[W]);
455
455
  if (e && e.defaultProps) {
@@ -457,14 +457,14 @@ function bt() {
457
457
  for (W in J)
458
458
  R[W] === void 0 && (R[W] = J[W]);
459
459
  }
460
- if (x || ee) {
460
+ if (_ || ee) {
461
461
  var X = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
462
- x && tt(R, X), ee && rt(R, X);
462
+ _ && tt(R, X), ee && rt(R, X);
463
463
  }
464
- return nt(e, x, ee, P, d, De.current, R);
464
+ return nt(e, _, ee, P, d, De.current, R);
465
465
  }
466
466
  }
467
- var _e = o.ReactCurrentOwner, Ie = o.ReactDebugCurrentFrame;
467
+ var xe = o.ReactCurrentOwner, Ie = o.ReactDebugCurrentFrame;
468
468
  function ue(e) {
469
469
  if (e) {
470
470
  var r = e._owner, a = be(e.type, e._source, r ? r.type : null);
@@ -472,15 +472,15 @@ function bt() {
472
472
  } else
473
473
  Ie.setExtraStackFrame(null);
474
474
  }
475
- var xe;
476
- xe = !1;
475
+ var _e;
476
+ _e = !1;
477
477
  function Ce(e) {
478
478
  return typeof e == "object" && e !== null && e.$$typeof === l;
479
479
  }
480
480
  function $e() {
481
481
  {
482
- if (_e.current) {
483
- var e = c(_e.current.type);
482
+ if (xe.current) {
483
+ var e = c(xe.current.type);
484
484
  if (e)
485
485
  return `
486
486
 
@@ -515,7 +515,7 @@ Check the top-level render call using <` + a + ">.");
515
515
  return;
516
516
  Le[a] = !0;
517
517
  var d = "";
518
- e && e._owner && e._owner !== _e.current && (d = " It was passed a child from " + c(e._owner.type) + "."), ue(e), n('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, d), ue(null);
518
+ e && e._owner && e._owner !== xe.current && (d = " It was passed a child from " + c(e._owner.type) + "."), ue(e), n('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, d), ue(null);
519
519
  }
520
520
  }
521
521
  function We(e, r) {
@@ -554,8 +554,8 @@ Check the top-level render call using <` + a + ">.");
554
554
  if (a) {
555
555
  var d = c(r);
556
556
  He(a, e.props, "prop", d, e);
557
- } else if (r.PropTypes !== void 0 && !xe) {
558
- xe = !0;
557
+ } else if (r.PropTypes !== void 0 && !_e) {
558
+ _e = !0;
559
559
  var P = c(r);
560
560
  n("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", P || "Unknown");
561
561
  }
@@ -579,12 +579,12 @@ Check the top-level render call using <` + a + ">.");
579
579
  {
580
580
  var R = G(e);
581
581
  if (!R) {
582
- var x = "";
583
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (x += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
582
+ var _ = "";
583
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (_ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
584
584
  var ee = ot();
585
- ee ? x += ee : x += $e();
585
+ ee ? _ += ee : _ += $e();
586
586
  var J;
587
- e === null ? J = "null" : me(e) ? J = "array" : e !== void 0 && e.$$typeof === l ? (J = "<" + (c(e.type) || "Unknown") + " />", x = " Did you accidentally export a JSX literal instead of a component?") : J = typeof e, n("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", J, x);
587
+ e === null ? J = "null" : me(e) ? J = "array" : e !== void 0 && e.$$typeof === l ? (J = "<" + (c(e.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : J = typeof e, n("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", J, _);
588
588
  }
589
589
  var X = at(e, r, a, P, W);
590
590
  if (X == null)
@@ -726,10 +726,10 @@ function ze({
726
726
  S.style.width = `${N}px`, S.style.maxHeight = "100px", S.style.overflow = "hidden", S.style.position = "absolute", S.style.top = "-1000px", S.style.left = "-1000px", S.style.pointerEvents = "none", S.style.borderRadius = "10px";
727
727
  const T = f.cloneNode(!0);
728
728
  T.style.opacity = "0.7", T.style.borderRadius = "4px", T.style.pointerEvents = "none", T.style.transform = "scale(1)", T.style.transformOrigin = "0 0", T.style.width = `${k.width}px`, T.style.height = "50px", T.style.borderRadius = "10px", S.appendChild(T), document.body.appendChild(S), t.dataTransfer.setDragImage(S, 15, 15);
729
- const _ = setTimeout(() => {
729
+ const x = setTimeout(() => {
730
730
  document.body.contains(S) && document.body.removeChild(S);
731
731
  }, 0);
732
- return () => clearTimeout(_);
732
+ return () => clearTimeout(x);
733
733
  }
734
734
  }, []), G = q((t) => {
735
735
  t.preventDefault(), t.dataTransfer.dropEffect = "move";
@@ -773,13 +773,13 @@ function ze({
773
773
  const O = t.fixed && !t.width ? 200 : t.width, b = t.fixed && !t.minWidth ? 200 : t.minWidth;
774
774
  let v = t.fixedLeft ? t.fixedLeft : 0;
775
775
  if (s !== 0)
776
- for (let _ = 0; _ < s; _++) {
777
- const Q = u[_];
776
+ for (let x = 0; x < s; x++) {
777
+ const Q = u[x];
778
778
  Q.fixed && !Q.hidden && (v += (Q.width || Q.minWidth || 200) + (Q.fixedLeft || 0));
779
779
  }
780
- const S = ((_) => {
781
- if (_.groupColor)
782
- return _.groupColor;
780
+ const S = ((x) => {
781
+ if (x.groupColor)
782
+ return x.groupColor;
783
783
  if (l) {
784
784
  const Q = (le, de) => {
785
785
  for (const ie of le)
@@ -790,7 +790,7 @@ function ze({
790
790
  if (pe) return pe;
791
791
  }
792
792
  return null;
793
- }, oe = Q(l, _.key);
793
+ }, oe = Q(l, x.key);
794
794
  return oe == null ? void 0 : oe.groupColor;
795
795
  }
796
796
  })(t);
@@ -814,9 +814,9 @@ function ze({
814
814
  ...B,
815
815
  ...t.style
816
816
  },
817
- onDrop: (_) => g(_, t.key),
817
+ onDrop: (x) => g(x, t.key),
818
818
  onDragOver: G,
819
- onDragEnter: (_) => K(_, t.key),
819
+ onDragEnter: (x) => K(x, t.key),
820
820
  onDragLeave: ae,
821
821
  onDragEnd: c,
822
822
  children: /* @__PURE__ */ i.jsxs(
@@ -830,7 +830,7 @@ function ze({
830
830
  {
831
831
  className: `radar-table__drag-handle ${E === t.key ? "dragging" : ""}`,
832
832
  draggable: j,
833
- onDragStart: (_) => Y(_, t.key),
833
+ onDragStart: (x) => Y(x, t.key),
834
834
  onDragEnd: c,
835
835
  children: /* @__PURE__ */ i.jsxs("svg", { width: "8", height: "10", viewBox: "0 0 16 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
836
836
  /* @__PURE__ */ i.jsx("path", { d: "M2 2.62268e-07C3.10457 4.07115e-07 4 0.89543 4 2C4 3.10457 3.10457 4 2 4C0.895433 4 2.21557e-06 3.10457 2.36042e-06 2C2.50526e-06 0.89543 0.895433 1.17422e-07 2 2.62268e-07Z", fill: "#999999" }),
@@ -861,7 +861,7 @@ function ze({
861
861
  )
862
862
  );
863
863
  }
864
- function _t(u) {
864
+ function xt(u) {
865
865
  const {
866
866
  config: l,
867
867
  preset: C,
@@ -924,16 +924,16 @@ function _t(u) {
924
924
  }
925
925
  const I = (b, v, N = [], S = null) => {
926
926
  for (let T = 0; T < b.length; T++) {
927
- const _ = b[T], Q = [...N, T];
928
- if (_.key === v)
927
+ const x = b[T], Q = [...N, T];
928
+ if (x.key === v)
929
929
  return {
930
- column: _,
930
+ column: x,
931
931
  parent: S,
932
932
  path: Q,
933
933
  level: N.length
934
934
  };
935
- if (_.children && _.children.length > 0) {
936
- const oe = I(_.children, v, Q, _);
935
+ if (x.children && x.children.length > 0) {
936
+ const oe = I(x.children, v, Q, x);
937
937
  if (oe)
938
938
  return oe;
939
939
  }
@@ -943,7 +943,7 @@ function _t(u) {
943
943
  for (let v = 0; v < Object.keys(Z).length; v++) {
944
944
  const N = Z[v];
945
945
  if (N.length === b.length) {
946
- const S = N.map((_) => _.key).sort(), T = b.map((_) => _.key).sort();
946
+ const S = N.map((x) => x.key).sort(), T = b.map((x) => x.key).sort();
947
947
  if (JSON.stringify(S) === JSON.stringify(T))
948
948
  return v;
949
949
  }
@@ -990,8 +990,8 @@ function _t(u) {
990
990
  } else {
991
991
  const b = g.slice(0, -1);
992
992
  let v = E;
993
- for (let _ = 0; _ < b.length; _++)
994
- _ === 0 ? v = v[b[_]] : v = v.children[b[_]];
993
+ for (let x = 0; x < b.length; x++)
994
+ x === 0 ? v = v[b[x]] : v = v.children[b[x]];
995
995
  if (!v || !v.children) {
996
996
  console.error("Parent container not found or has no children");
997
997
  return;
@@ -1060,7 +1060,7 @@ function _t(u) {
1060
1060
  }
1061
1061
  );
1062
1062
  }
1063
- const xt = (u, l) => {
1063
+ const _t = (u, l) => {
1064
1064
  let C = "0";
1065
1065
  if (u != null) {
1066
1066
  const h = parseFloat(u);
@@ -1209,7 +1209,7 @@ function Ct({
1209
1209
  backgroundColor: v || "white"
1210
1210
  },
1211
1211
  children: [
1212
- t.units && xt(((S = c[t.key]) == null ? void 0 : S.toString()) || "", t.units),
1212
+ t.units && _t(((S = c[t.key]) == null ? void 0 : S.toString()) || "", t.units),
1213
1213
  !t.units && c[t.key]
1214
1214
  ]
1215
1215
  }
@@ -1222,7 +1222,7 @@ function Ct({
1222
1222
  ...Z,
1223
1223
  backgroundColor: v || "white"
1224
1224
  },
1225
- children: j == null ? void 0 : j.renderer(c[t.key], c, s, t.dataIndex)
1225
+ children: j == null ? void 0 : j.renderer(c[t.dataIndex], c, s, t.dataIndex)
1226
1226
  }
1227
1227
  )
1228
1228
  ]
@@ -1340,12 +1340,12 @@ function Rt({
1340
1340
  headerGroupCellWrapperClassName: N,
1341
1341
  headerGroupCellWrapperStyle: S,
1342
1342
  paginationContainerClassName: T = "",
1343
- paginationContainerStyle: _
1343
+ paginationContainerStyle: x
1344
1344
  }) {
1345
1345
  return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
1346
1346
  /* @__PURE__ */ i.jsxs("table", { className: `radar-table ${l || ""} ${A}`, style: o, children: [
1347
1347
  /* @__PURE__ */ i.jsx(
1348
- _t,
1348
+ xt,
1349
1349
  {
1350
1350
  draggableColumns: H,
1351
1351
  config: C,
@@ -1394,7 +1394,7 @@ function Rt({
1394
1394
  }
1395
1395
  )
1396
1396
  ] }),
1397
- /* @__PURE__ */ i.jsx("div", { className: `radar-table-pagination-container ${T}`, style: _, children: p && /* @__PURE__ */ i.jsx(wt, { config: p }) })
1397
+ /* @__PURE__ */ i.jsx("div", { className: `radar-table-pagination-container ${T}`, style: x, children: p && /* @__PURE__ */ i.jsx(wt, { config: p }) })
1398
1398
  ] });
1399
1399
  }
1400
1400
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "radar-ui",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "A powerful React table component with drag & drop, resizing, sorting, grouped columns, and pagination",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",