@warkypublic/oranguru 0.0.21 → 0.0.22

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/lib.es.js CHANGED
@@ -54,12 +54,12 @@ function Xe() {
54
54
  function o(l) {
55
55
  if (l == null) return null;
56
56
  if (typeof l == "function")
57
- return l.$$typeof === M ? null : l.displayName || l.name || null;
57
+ return l.$$typeof === j ? null : l.displayName || l.name || null;
58
58
  if (typeof l == "string") return l;
59
59
  switch (l) {
60
60
  case b:
61
61
  return "Fragment";
62
- case A:
62
+ case M:
63
63
  return "Profiler";
64
64
  case E:
65
65
  return "StrictMode";
@@ -78,14 +78,14 @@ function Xe() {
78
78
  return "Portal";
79
79
  case q:
80
80
  return l.displayName || "Context";
81
- case j:
81
+ case P:
82
82
  return (l._context.displayName || "Context") + ".Consumer";
83
83
  case v:
84
84
  var m = l.render;
85
85
  return l = l.displayName, l || (l = m.displayName || m.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
86
86
  case I:
87
87
  return m = l.displayName || null, m !== null ? m : o(l.type) || "Memo";
88
- case P:
88
+ case A:
89
89
  m = l._payload, l = l._init;
90
90
  try {
91
91
  return o(l(m));
@@ -116,7 +116,7 @@ function Xe() {
116
116
  }
117
117
  function t(l) {
118
118
  if (l === b) return "<>";
119
- if (typeof l == "object" && l !== null && l.$$typeof === P)
119
+ if (typeof l == "object" && l !== null && l.$$typeof === A)
120
120
  return "<...>";
121
121
  try {
122
122
  var m = o(l);
@@ -239,12 +239,12 @@ React keys must be passed directly to JSX without using spread:
239
239
  );
240
240
  }
241
241
  function d(l) {
242
- S(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === P && (l._payload.status === "fulfilled" ? S(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
242
+ S(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === A && (l._payload.status === "fulfilled" ? S(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
243
243
  }
244
244
  function S(l) {
245
245
  return typeof l == "object" && l !== null && l.$$typeof === C;
246
246
  }
247
- var _ = N, C = Symbol.for("react.transitional.element"), R = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), A = Symbol.for("react.profiler"), j = Symbol.for("react.consumer"), q = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), M = Symbol.for("react.client.reference"), $ = _.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, T = Object.prototype.hasOwnProperty, H = Array.isArray, D = console.createTask ? console.createTask : function() {
247
+ var _ = N, C = Symbol.for("react.transitional.element"), R = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), M = Symbol.for("react.profiler"), P = Symbol.for("react.consumer"), q = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), j = Symbol.for("react.client.reference"), $ = _.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, T = Object.prototype.hasOwnProperty, H = Array.isArray, D = console.createTask ? console.createTask : function() {
248
248
  return null;
249
249
  };
250
250
  _ = {
@@ -715,7 +715,7 @@ const it = [
715
715
  },
716
716
  onCellClicked: (e, t) => {
717
717
  const n = c(), [r, i] = e;
718
- n.glideProps?.onCellClicked ? n.glideProps?.onCellClicked?.(e, t) : n.values?.length && (n.onChange ? n.onChange(n.values) : n.setState("values", n.values)), n._events.dispatchEvent(
718
+ n.glideProps?.onCellClicked && n.glideProps?.onCellClicked?.(e, t), n.values?.length && n.onChange && n.onChange(n.values), n._events.dispatchEvent(
719
719
  new CustomEvent("onCellClicked", {
720
720
  detail: { cell: e, col: r, row: i, state: n }
721
721
  })
@@ -1059,19 +1059,19 @@ function dt(o) {
1059
1059
  type: "custom-sql-w",
1060
1060
  value: o.filter
1061
1061
  }), (o.options ?? []).length > 0 && E.push(...o.options ?? []);
1062
- const A = g?.filter((f) => !f.virtual)?.map((f) => f.id) ?? [];
1063
- if (o.hotfields && o.hotfields.length > 0 && A?.push(o.hotfields.join(",")), A && A.length > 0 && E.push({
1062
+ const M = g?.filter((f) => !f.virtual)?.map((f) => f.id) ?? [];
1063
+ if (o.hotfields && o.hotfields.length > 0 && M?.push(o.hotfields.join(",")), M && M.length > 0 && E.push({
1064
1064
  type: "select-fields",
1065
- value: A.join(",")
1065
+ value: M.join(",")
1066
1066
  }), E && E.length > 0) {
1067
1067
  const f = Q(E);
1068
1068
  for (const w in Q(E))
1069
1069
  b.set(w, f[w]);
1070
1070
  }
1071
- const j = R?.findIndex((f) => f.page === a) ?? -1;
1071
+ const P = R?.findIndex((f) => f.page === a) ?? -1;
1072
1072
  if (R?.forEach((f) => {
1073
1073
  (f.page >= 0 && f.page < a - 2 || a >= 0 && f.page > a + 2) && f.controller?.abort?.();
1074
- }), R && j >= 0 && R[j]) {
1074
+ }), R && P >= 0 && R[P]) {
1075
1075
  e("loadingData", !1);
1076
1076
  return;
1077
1077
  }
@@ -1377,8 +1377,8 @@ const Ie = N.memo(() => {
1377
1377
  searchStr: R,
1378
1378
  selectedRowKey: b,
1379
1379
  setState: E,
1380
- setStateFN: A,
1381
- values: j
1380
+ setStateFN: M,
1381
+ values: P
1382
1382
  } = L((v) => ({
1383
1383
  _glideref: v._glideref,
1384
1384
  _gridSelectionRows: v._gridSelectionRows,
@@ -1414,43 +1414,43 @@ const Ie = N.memo(() => {
1414
1414
  }
1415
1415
  );
1416
1416
  return x(() => {
1417
- j && (async () => {
1418
- const f = d("_page_data"), w = d("pageSize"), I = d("keyField") ?? "id", P = [];
1419
- for (const O in j) {
1420
- let M = -1;
1417
+ P && (async () => {
1418
+ const f = d("_page_data"), w = d("pageSize"), I = d("keyField") ?? "id", A = [];
1419
+ for (const O in P) {
1420
+ let j = -1;
1421
1421
  const $ = String(
1422
- typeof j?.[O] == "object" ? j?.[O]?.[I] : typeof j?.[O] == "string" ? j?.[O] : void 0
1422
+ typeof P?.[O] == "object" ? P?.[O]?.[I] : typeof P?.[O] == "string" ? P?.[O] : void 0
1423
1423
  );
1424
1424
  for (const T in f) {
1425
1425
  for (const H in f[T]) {
1426
1426
  const D = Number(T) * w + Number(H);
1427
1427
  if (String(f[T][H]?.[I]) === $) {
1428
- M = D;
1428
+ j = D;
1429
1429
  break;
1430
1430
  }
1431
1431
  }
1432
- if (M >= 0) {
1433
- P.push(M);
1432
+ if (j >= 0) {
1433
+ A.push(j);
1434
1434
  break;
1435
1435
  }
1436
1436
  }
1437
- if (!(M >= 0)) {
1437
+ if (!(j >= 0)) {
1438
1438
  const T = await u($);
1439
- T && P.push(T);
1439
+ T && A.push(T);
1440
1440
  }
1441
1441
  }
1442
- return P;
1442
+ return A;
1443
1443
  })().then((f) => {
1444
1444
  let w = W.empty();
1445
1445
  f.forEach((I) => {
1446
1446
  w = w.add(I);
1447
- }), A("_gridSelectionRows", () => w), A("_gridSelection", (I) => ({
1447
+ }), M("_gridSelectionRows", () => w), M("_gridSelection", (I) => ({
1448
1448
  columns: I?.columns ?? W.empty(),
1449
1449
  ...I,
1450
1450
  rows: w
1451
1451
  }));
1452
1452
  });
1453
- }, [j]), x(() => {
1453
+ }, [P]), x(() => {
1454
1454
  const v = d("onChange");
1455
1455
  if (v && typeof v == "function") {
1456
1456
  const w = d("getGridSelectedRows")(), I = d("values");
@@ -1476,7 +1476,7 @@ const Ie = N.memo(() => {
1476
1476
  columns: W.empty(),
1477
1477
  current: void 0,
1478
1478
  rows: W.empty()
1479
- }), E("_gridSelectionRows", W.empty()), A("renderColumns", (v) => v?.map((f) => ({
1479
+ }), E("_gridSelectionRows", W.empty()), M("renderColumns", (v) => v?.map((f) => ({
1480
1480
  ...f,
1481
1481
  icon: f.id && a?.find((w) => w.id === f.id)?.direction ? a?.find((w) => w.id === f.id)?.direction === "asc" ? "sortup" : "sortdown" : f.defaultIcon ?? "sort"
1482
1482
  }))).then(() => {
@@ -1497,14 +1497,14 @@ const Ie = N.memo(() => {
1497
1497
  );
1498
1498
  }), e.current = r);
1499
1499
  }, [r]), x(() => {
1500
- s && A("renderColumns", (v) => v?.map((f) => ({
1500
+ s && M("renderColumns", (v) => v?.map((f) => ({
1501
1501
  ...f,
1502
1502
  width: f.id && s?.[f.id] ? s?.[f.id] : f.width
1503
1503
  }))).then(() => {
1504
1504
  d("refreshCells")?.();
1505
1505
  });
1506
1506
  }, [s]), x(() => {
1507
- i && A("renderColumns", (v) => v?.sort((w, I) => i[w.id] > i[I.id] ? 1 : -1)).then(() => {
1507
+ i && M("renderColumns", (v) => v?.sort((w, I) => i[w.id] > i[I.id] ? 1 : -1)).then(() => {
1508
1508
  d("refreshCells")?.();
1509
1509
  });
1510
1510
  }, [i]), x(() => {
@@ -1518,9 +1518,9 @@ const Ie = N.memo(() => {
1518
1518
  const I = d("scrollToRowKey");
1519
1519
  if (I && I >= 0)
1520
1520
  return;
1521
- const P = d("keyField") ?? "id", M = d("_page_data")?.[0]?.[0], $ = M?.[P], T = d("values") ?? [];
1522
- if ($ && $ > 0 && (T.length ?? 0) === 0) {
1523
- const H = [M, ...T], D = d("onChange");
1521
+ const A = d("keyField") ?? "id", j = d("_page_data")?.[0]?.[0], $ = j?.[A], T = d("values") ?? [];
1522
+ if (!(P && P.length > 0) && $ && $ > 0 && (T.length ?? 0) === 0) {
1523
+ const H = [j, ...T], D = d("onChange");
1524
1524
  D ? D(H) : E("values", H), E("scrollToRowKey", $);
1525
1525
  }
1526
1526
  }
@@ -1530,16 +1530,16 @@ const Ie = N.memo(() => {
1530
1530
  };
1531
1531
  }, [_]), x(() => {
1532
1532
  const v = d("ready"), f = d("_glideref"), w = d("getRowIndexByKey"), I = b ?? C;
1533
- I && f && v && w?.(I).then((P) => {
1534
- if (P !== void 0) {
1533
+ I && f && v && w?.(I).then((A) => {
1534
+ if (A !== void 0) {
1535
1535
  if (b) {
1536
- const O = d("onChange"), M = [{ [d("keyField") ?? "id"]: b }];
1537
- O ? O(M) : E("values", M);
1536
+ const O = d("onChange"), j = [{ [d("keyField") ?? "id"]: b }];
1537
+ JSON.stringify(d("values")) !== JSON.stringify(j) && (O ? O(j) : E("values", j));
1538
1538
  }
1539
- f.scrollTo(0, P), d("_events").dispatchEvent(
1539
+ f.scrollTo(0, A), d("_events").dispatchEvent(
1540
1540
  new CustomEvent("scrollToRowKeyFound", {
1541
1541
  detail: {
1542
- rowNumber: P,
1542
+ rowNumber: A,
1543
1543
  scrollToRowKey: C,
1544
1544
  selectedRowKey: b
1545
1545
  }
@@ -1664,16 +1664,16 @@ const Ct = (o) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" w
1664
1664
  mounted: R,
1665
1665
  onCellActivated: b,
1666
1666
  onCellClicked: E,
1667
- onCellEdited: A,
1668
- onColumnMoved: j,
1667
+ onCellEdited: M,
1668
+ onColumnMoved: P,
1669
1669
  onColumnProposeMove: q,
1670
1670
  onColumnResize: v,
1671
1671
  onContextClick: f,
1672
1672
  onHeaderClicked: w,
1673
1673
  onHeaderMenuClick: I,
1674
- onItemHovered: P,
1674
+ onItemHovered: A,
1675
1675
  onVisibleRegionChanged: O,
1676
- renderColumns: M,
1676
+ renderColumns: j,
1677
1677
  rowHeight: $,
1678
1678
  sections: T,
1679
1679
  selectMode: H,
@@ -1751,7 +1751,7 @@ const Ct = (o) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" w
1751
1751
  Me,
1752
1752
  {
1753
1753
  cellActivationBehavior: "double-click",
1754
- columns: M ?? [],
1754
+ columns: j ?? [],
1755
1755
  columnSelect: "none",
1756
1756
  drawFocusRing: !0,
1757
1757
  height: e ?? 400,
@@ -1783,8 +1783,8 @@ const Ct = (o) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" w
1783
1783
  c.current = !1;
1784
1784
  }, 100));
1785
1785
  },
1786
- onCellEdited: A,
1787
- onColumnMoved: j,
1786
+ onCellEdited: M,
1787
+ onColumnMoved: P,
1788
1788
  onColumnProposeMove: q,
1789
1789
  onColumnResize: v,
1790
1790
  onGridSelectionChange: (l) => {
@@ -1798,7 +1798,7 @@ const Ct = (o) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" w
1798
1798
  if (m.length === 0)
1799
1799
  for (const F of y?.rows ?? [])
1800
1800
  z && z(F)?.[p] && (m = m.hasIndex(F) ? m : m.add(F));
1801
- (JSON.stringify(y?.columns) !== JSON.stringify(l.columns) || JSON.stringify(y?.rows) !== JSON.stringify(m) || JSON.stringify(y?.current) !== JSON.stringify(l.current)) && (D("_gridSelection", { ...l, rows: m }), JSON.stringify(y?.rows) !== JSON.stringify(m) && D("_gridSelectionRows", m));
1801
+ (JSON.stringify(y?.columns) !== JSON.stringify(l.columns) || JSON.stringify(y?.rows) !== JSON.stringify(m) || JSON.stringify(y?.current) !== JSON.stringify(l.current)) && (D("_gridSelection", { ...l, rows: m }), D("_gridSelectionRows", m));
1802
1802
  },
1803
1803
  onHeaderClicked: w,
1804
1804
  onHeaderContextMenu: (l, m) => {
@@ -1807,7 +1807,7 @@ const Ct = (o) => `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" w
1807
1807
  }, 100));
1808
1808
  },
1809
1809
  onHeaderMenuClick: I,
1810
- onItemHovered: P,
1810
+ onItemHovered: A,
1811
1811
  onVisibleRegionChanged: O,
1812
1812
  ref: ne,
1813
1813
  rightElement: T?.rightElementDisabled ? void 0 : /* @__PURE__ */ h.jsxs(Ke, { children: [