@ynput/ayon-frontend-shared 0.8.0 → 0.9.0

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 (43) hide show
  1. package/dist/DetailsPanel.es.js +2 -2
  2. package/dist/ListTable.es.js +1 -1
  3. package/dist/NewEntity.es.js +5 -3
  4. package/dist/ProjectTreeTable.es.js +4153 -4130
  5. package/dist/ProjectsTable.es.js +5 -4
  6. package/dist/Slicer.es.js +326 -293
  7. package/dist/Views.es.js +724 -714
  8. package/dist/chunks/ColumnDropIndicator.es.js +10 -10
  9. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +44 -38
  10. package/dist/chunks/EntityPickerDialog.es.js +1 -1
  11. package/dist/chunks/Feed.es.js +41 -39
  12. package/dist/chunks/FilmstripEntityCard.es.js +1 -1
  13. package/dist/chunks/GroupSettingsFallback.es.js +3 -2
  14. package/dist/chunks/MetaWidget.es.js +425 -411
  15. package/dist/chunks/NewEntityContextInstance.es.js +6 -5
  16. package/dist/chunks/ReviewablesSelector.es.js +76 -76
  17. package/dist/chunks/SimpleTable.es.js +151 -149
  18. package/dist/chunks/Slicer.es.js +637 -617
  19. package/dist/chunks/TableExportContextInstance.es.js +141 -136
  20. package/dist/chunks/ThumbnailSimple.es.js +11 -11
  21. package/dist/chunks/Watchers.es.js +46 -46
  22. package/dist/chunks/getUris.es.js +1 -1
  23. package/dist/chunks/searchTerms.es.js +618 -581
  24. package/dist/chunks/useCreateContextMenu.es.js +15 -13
  25. package/dist/components.es.js +1393 -1314
  26. package/dist/context.es.js +1 -1
  27. package/dist/hooks.es.js +2 -2
  28. package/dist/index.es.js +11 -10
  29. package/dist/types/ContextMenu.d.ts +1 -1
  30. package/dist/types/Feed.d.ts +1 -1
  31. package/dist/types/ListTable.d.ts +1 -1
  32. package/dist/types/NewEntity.d.ts +2 -0
  33. package/dist/types/ProjectTreeTable.d.ts +121 -3
  34. package/dist/types/ProjectsTable.d.ts +1 -1
  35. package/dist/types/SimpleTable.d.ts +1 -1
  36. package/dist/types/Slicer.d.ts +7 -1
  37. package/dist/types/Views.d.ts +5 -0
  38. package/dist/types/api.d.ts +1 -0
  39. package/dist/types/components.d.ts +164 -1
  40. package/dist/types/context.d.ts +2 -1
  41. package/dist/types/util.d.ts +21 -0
  42. package/dist/util.es.js +116 -113
  43. package/package.json +2 -2
@@ -1,8 +1,8 @@
1
1
  import { jsx as g, jsxs as O, Fragment as Re } from "react/jsx-runtime";
2
- import { useCallback as w, createContext as He, useContext as Oe, forwardRef as _e, useState as Ce, useEffect as ce, useMemo as le, useRef as C } from "react";
3
- import { theme as Je, Button as Ee, Icon as ve, InputText as Qe, Spacer as Ue, Dialog as We } from "@ynput/ayon-react-components";
2
+ import { useCallback as w, createContext as qe, useContext as Oe, forwardRef as _e, useState as Ce, useEffect as ce, useMemo as le, useRef as C } from "react";
3
+ import { theme as Je, Button as Ee, Icon as ve, InputText as Qe, Spacer as Ue, Dialog as Ge } from "@ynput/ayon-react-components";
4
4
  import _ from "styled-components";
5
- import { functionalUpdate as Se, useReactTable as Xe, getExpandedRowModel as Ye, getFilteredRowModel as Ge, getCoreRowModel as Ze, flexRender as et, sortingFns as tt } from "@tanstack/react-table";
5
+ import { functionalUpdate as Se, useReactTable as We, getExpandedRowModel as Xe, getFilteredRowModel as Ye, getCoreRowModel as Ze, flexRender as et, sortingFns as tt } from "@tanstack/react-table";
6
6
  import { useVirtualizer as nt } from "@tanstack/react-virtual";
7
7
  import z from "clsx";
8
8
  import { compareItems as ot } from "@tanstack/match-sorter-utils";
@@ -10,15 +10,15 @@ import "lodash";
10
10
  import "primereact/confirmdialog";
11
11
  import "react-toastify";
12
12
  import "uuid";
13
- import { bE as rt, bF as at } from "./searchTerms.es.js";
13
+ import { bM as rt, bG as at, bH as it } from "./searchTerms.es.js";
14
14
  import "axios";
15
- import { E as it } from "./EmptyPlaceholder.es.js";
15
+ import { E as st } from "./EmptyPlaceholder.es.js";
16
16
  import "./ContextMenuContextInstance.es.js";
17
17
  import "primereact-context/contextmenu";
18
- import { u as st } from "./useCreateContextMenu.es.js";
19
- import { ContributionView as lt, useContributions as ct, runContribution as dt } from "@ynput/ayon-addon";
20
- import { reportContributionError as ut, parseShortcut as pt, matchesShortcut as gt } from "@ynput/ayon-addon/host";
21
- const mt = _.div`
18
+ import { u as lt } from "./useCreateContextMenu.es.js";
19
+ import { ContributionView as ct, useContributions as dt, runContribution as ut } from "@ynput/ayon-addon";
20
+ import { reportContributionError as pt, parseShortcut as gt, matchesShortcut as mt } from "@ynput/ayon-addon/host";
21
+ const ft = _.div`
22
22
  display: flex;
23
23
 
24
24
  height: 100%;
@@ -74,7 +74,7 @@ const mt = _.div`
74
74
  padding: 1px 0px;
75
75
  width: 100%;
76
76
  }
77
- `, ft = _.div`
77
+ `, ht = _.div`
78
78
  width: 100%;
79
79
  min-height: 32px;
80
80
  user-select: none;
@@ -280,7 +280,7 @@ const mt = _.div`
280
280
  border-radius: 2px;
281
281
  }
282
282
  }
283
- `, ht = _(Ee)`
283
+ `, yt = _(Ee)`
284
284
  &.expander {
285
285
  background-color: unset;
286
286
  padding: 2px;
@@ -299,7 +299,7 @@ const mt = _.div`
299
299
  display: flex;
300
300
  flex-direction: column;
301
301
  position: relative;
302
- `, Gt = _.div`
302
+ `, Zt = _.div`
303
303
  padding: 2px;
304
304
  width: 100%;
305
305
  justify-content: space-between;
@@ -310,7 +310,7 @@ const mt = _.div`
310
310
  gap: var(--base-gap-small);
311
311
 
312
312
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
313
- `, Zt = _(Ee)`
313
+ `, en = _(Ee)`
314
314
  background-color: unset !important;
315
315
  z-index: 110;
316
316
  position: relative;
@@ -331,7 +331,7 @@ const mt = _.div`
331
331
  background-color: var(--md-sys-color-surface-container-hover) !important;
332
332
  }
333
333
  `;
334
- function yt({
334
+ function xt({
335
335
  handleRowSelect: t,
336
336
  handleArrowNavigation: o,
337
337
  handleRename: a
@@ -349,19 +349,19 @@ function yt({
349
349
  [t, o, a]
350
350
  ) };
351
351
  }
352
- const ke = He(void 0), xt = () => {
352
+ const ke = qe(void 0), bt = () => {
353
353
  const t = Oe(ke);
354
354
  if (t === void 0)
355
355
  throw new Error("useSimpleTableContext must be used within a SimpleTableProvider");
356
356
  return t;
357
- }, en = ({ children: t, ...o }) => /* @__PURE__ */ g(ke.Provider, { value: { ...o }, children: t }), bt = ({
357
+ }, tn = ({ children: t, ...o }) => /* @__PURE__ */ g(ke.Provider, { value: { ...o }, children: t }), wt = ({
358
358
  isRowExpandable: t,
359
359
  isRowExpanded: o,
360
360
  enableNonFolderIndent: a = !0,
361
361
  isTableExpandable: d,
362
362
  onExpandClick: n
363
363
  }) => t ? /* @__PURE__ */ g(
364
- ht,
364
+ yt,
365
365
  {
366
366
  onClick: (u) => {
367
367
  u.stopPropagation(), n?.(u);
@@ -370,7 +370,7 @@ const ke = He(void 0), xt = () => {
370
370
  className: "expander",
371
371
  style: { cursor: "pointer" }
372
372
  }
373
- ) : d && a && /* @__PURE__ */ g("div", { style: { display: "inline-block", minWidth: 24 } }), wt = _e(
373
+ ) : d && a && /* @__PURE__ */ g("div", { style: { display: "inline-block", minWidth: 24 } }), vt = _e(
374
374
  ({
375
375
  value: t,
376
376
  icon: o,
@@ -383,32 +383,32 @@ const ke = He(void 0), xt = () => {
383
383
  imgPosition: b = "start",
384
384
  isRowExpandable: S,
385
385
  isRowExpanded: E,
386
- isTableExpandable: M,
386
+ isTableExpandable: K,
387
387
  enableNonFolderIndent: D = !0,
388
388
  onExpandClick: I,
389
- startContent: K,
389
+ startContent: M,
390
390
  endContent: J,
391
391
  badge: N,
392
- actions: j,
392
+ actions: $,
393
393
  isRenaming: T,
394
- renameInitialValue: $,
394
+ renameInitialValue: j,
395
395
  onSubmitRename: Z,
396
396
  onCancelRename: Q,
397
397
  renamePlaceholder: ee,
398
398
  depth: U = 0,
399
- isDisabled: W,
399
+ isDisabled: G,
400
400
  disabledMessage: L,
401
401
  active: de,
402
402
  inactive: P,
403
- style: X,
403
+ style: W,
404
404
  pt: y,
405
405
  ...te
406
406
  }, ne) => {
407
- const [oe, Y] = Ce($ ?? t);
407
+ const [oe, X] = Ce(j ?? t);
408
408
  ce(() => {
409
- T && Y($ ?? t);
410
- }, [t, T, $]);
411
- const G = u ? /* @__PURE__ */ g(
409
+ T && X(j ?? t);
410
+ }, [t, T, j]);
411
+ const Y = u ? /* @__PURE__ */ g(
412
412
  "img",
413
413
  {
414
414
  src: u,
@@ -434,34 +434,34 @@ const ke = He(void 0), xt = () => {
434
434
  )
435
435
  );
436
436
  return /* @__PURE__ */ O(
437
- ft,
437
+ ht,
438
438
  {
439
439
  ...te,
440
440
  ref: ne,
441
441
  className: z(te.className, {
442
- disabled: W,
442
+ disabled: G,
443
443
  inactive: P || de === !1,
444
- "has-actions": !!j?.length
444
+ "has-actions": !!$?.length
445
445
  }),
446
446
  style: {
447
- ...X,
447
+ ...W,
448
448
  paddingLeft: `calc(${U * 1.5}rem + 4px)`
449
449
  },
450
- title: W ? L : void 0,
450
+ title: G ? L : void 0,
451
451
  children: [
452
452
  /* @__PURE__ */ g(
453
- bt,
453
+ wt,
454
454
  {
455
455
  isRowExpandable: S,
456
456
  isRowExpanded: E,
457
- isTableExpandable: M,
457
+ isTableExpandable: K,
458
458
  onExpandClick: I,
459
459
  enableNonFolderIndent: D,
460
460
  ...y?.expander
461
461
  }
462
462
  ),
463
- b === "start" && G,
464
- K,
463
+ b === "start" && Y,
464
+ M,
465
465
  o && /* @__PURE__ */ g(
466
466
  ve,
467
467
  {
@@ -479,7 +479,7 @@ const ke = He(void 0), xt = () => {
479
479
  {
480
480
  autoFocus: !0,
481
481
  style: { flex: 1 },
482
- onChange: (v) => Y(v.target.value),
482
+ onChange: (v) => X(v.target.value),
483
483
  value: oe,
484
484
  placeholder: ee,
485
485
  onKeyDown: (v) => {
@@ -503,7 +503,7 @@ const ke = He(void 0), xt = () => {
503
503
  !T && /* @__PURE__ */ O(Re, { children: [
504
504
  /* @__PURE__ */ g(Ue, { className: "spacer" }),
505
505
  N?.toString() && /* @__PURE__ */ g("div", { className: "badges", children: typeof N == "string" ? /* @__PURE__ */ g("span", { children: N }) : N }),
506
- j && /* @__PURE__ */ g("div", { className: "actions", children: j.map((v, F) => {
506
+ $ && /* @__PURE__ */ g("div", { className: "actions", children: $.map((v, F) => {
507
507
  const { show: k = "hover", ...A } = v;
508
508
  return k === "hidden" ? null : /* @__PURE__ */ g(
509
509
  ve,
@@ -515,57 +515,57 @@ const ke = He(void 0), xt = () => {
515
515
  );
516
516
  }) })
517
517
  ] }),
518
- b === "end" && G,
518
+ b === "end" && Y,
519
519
  J && J
520
520
  ]
521
521
  }
522
522
  );
523
523
  }
524
- ), vt = ({
524
+ ), St = ({
525
525
  contribution: t,
526
526
  error: o,
527
527
  onReported: a
528
528
  }) => (ce(() => {
529
- ut(t, o), a();
530
- }, [t, o, a]), null), St = ({ contribution: t, context: o }) => {
529
+ pt(t, o), a();
530
+ }, [t, o, a]), null), Rt = ({ contribution: t, context: o }) => {
531
531
  const a = t;
532
532
  return /* @__PURE__ */ g(
533
- We,
533
+ Ge,
534
534
  {
535
535
  isOpen: !0,
536
536
  header: String(a.dialogTitle || a.label || a.id),
537
537
  size: a.dialogSize || "md",
538
538
  onClose: o.close,
539
539
  children: /* @__PURE__ */ g(
540
- lt,
540
+ ct,
541
541
  {
542
542
  contribution: t,
543
543
  piece: "dialog",
544
544
  context: o,
545
- error: (d) => /* @__PURE__ */ g(vt, { contribution: a, error: d, onReported: o.close })
545
+ error: (d) => /* @__PURE__ */ g(St, { contribution: a, error: d, onReported: o.close })
546
546
  }
547
547
  )
548
548
  }
549
549
  );
550
- }, Rt = ["overview", "products", "lists"], Ct = (t, o, a) => Rt.includes(t) && o ? a.flatMap(
550
+ }, Ct = ["overview", "products", "lists"], Et = (t, o, a) => Ct.includes(t) && o ? a.flatMap(
551
551
  ({ id: d, entityType: n, name: u, label: x }) => n ? [{ id: d, entityType: n, projectName: o, name: u, label: x }] : []
552
- ) : [], Et = (t) => {
553
- const { contributions: o } = ct("table.shortcut"), [a, d] = Ce(null), n = le(
552
+ ) : [], kt = (t) => {
553
+ const { contributions: o } = dt("table.shortcut"), [a, d] = Ce(null), n = le(
554
554
  () => t ? o.flatMap((c) => {
555
- const b = pt(c.keys), S = !c.tables?.length || c.tables.includes(t);
555
+ const b = gt(c.keys), S = !c.tables?.length || c.tables.includes(t);
556
556
  return b && S ? [{ contribution: c, shortcut: b }] : [];
557
557
  }) : [],
558
558
  [o, t]
559
559
  ), u = w(
560
560
  (c, b) => {
561
- const { table: S, projectName: E, rows: M } = b, D = { ...b, entities: Ct(S, E, M) };
562
- c.dialog ? d({ contribution: c, context: { ...D, close: () => d(null) } }) : dt(c, D);
561
+ const { table: S, projectName: E, rows: K } = b, D = { ...b, entities: Et(S, E, K) };
562
+ c.dialog ? d({ contribution: c, context: { ...D, close: () => d(null) } }) : ut(c, D);
563
563
  },
564
564
  []
565
565
  ), x = w(
566
566
  (c, b) => {
567
567
  if (!t || c.repeat) return !1;
568
- const S = n.find(({ shortcut: M }) => gt(c, M));
568
+ const S = n.find(({ shortcut: K }) => mt(c, K));
569
569
  if (!S) return !1;
570
570
  const E = b();
571
571
  return E?.rows.length ? (c.preventDefault(), c.stopPropagation(), u(S.contribution, { ...E, table: t }), !0) : !1;
@@ -573,18 +573,20 @@ const ke = He(void 0), xt = () => {
573
573
  [n, t, u]
574
574
  );
575
575
  return { hasShortcuts: n.length > 0, handleShortcut: x, runShortcut: u, dialog: a };
576
- }, kt = (t) => t ? Array.isArray(t) ? t.filter(Boolean) : [t] : [], Ke = (t, o) => {
577
- t.toggleExpanded(o), t.subRows.forEach((a) => Ke(a, o));
578
- }, Me = (t, o, a, d) => {
576
+ }, Mt = (t) => t ? Array.isArray(t) ? t.filter(Boolean) : [t] : [], Me = (t, o) => {
577
+ t.toggleExpanded(o), t.subRows.forEach((a) => Me(a, o));
578
+ }, Ke = (t, o, a, d) => {
579
579
  const n = t.getValue(o);
580
580
  let u = typeof n == "string" ? n : Array.isArray(n) ? n.join(" ") : JSON.stringify(n);
581
- o === "label" && (u = [t.original.label, t.original.name, ...t.original.parents || []].join(
582
- " "
581
+ o === "label" && (u = rt(
582
+ t.original.label,
583
+ t.original.name,
584
+ t.original.parents
583
585
  ));
584
- const x = rt(u, a);
586
+ const x = at(u, a);
585
587
  return d({ itemRank: x }), x.passed;
586
588
  };
587
- Me.resolveFilterValue = at;
589
+ Ke.resolveFilterValue = it;
588
590
  const Kt = (t, o, a) => {
589
591
  let d = 0;
590
592
  return t.columnFiltersMeta[a] && (d = ot(
@@ -592,7 +594,7 @@ const Kt = (t, o, a) => {
592
594
  o.columnFiltersMeta[a]?.itemRank
593
595
  )), d === 0 ? tt.alphanumeric(t, o, a) : d;
594
596
  };
595
- function Mt(t, o, a) {
597
+ function Ft(t, o, a) {
596
598
  let d = -1, n = -1;
597
599
  for (let c = 0; c < t.length && (t[c].id === o && (d = c), t[c].id === a && (n = c), !(d !== -1 && n !== -1)); c++)
598
600
  ;
@@ -600,7 +602,7 @@ function Mt(t, o, a) {
600
602
  const u = Math.min(d, n), x = Math.max(d, n);
601
603
  return t.slice(u, x + 1);
602
604
  }
603
- const tn = ({
605
+ const nn = ({
604
606
  data: t = [],
605
607
  isLoading: o,
606
608
  error: a,
@@ -612,45 +614,45 @@ const tn = ({
612
614
  globalFilter: b,
613
615
  meta: S,
614
616
  rowHeight: E,
615
- imgRatio: M,
617
+ imgRatio: K,
616
618
  imgPosition: D,
617
619
  onScrollBottom: I,
618
- scrollToRowId: K,
620
+ scrollToRowId: M,
619
621
  onRename: J,
620
622
  renamingId: N,
621
- renameInitialValue: j,
623
+ renameInitialValue: $,
622
624
  onSubmitRename: T,
623
- onCancelRename: $,
625
+ onCancelRename: j,
624
626
  onRowDoubleClick: Z,
625
627
  onRowOptionClick: Q,
626
628
  rowContextMenuBuilders: ee = [],
627
629
  addonShortcuts: U,
628
- children: W,
630
+ children: G,
629
631
  pt: L,
630
632
  fitContent: de,
631
633
  rowIdPrefix: P,
632
- ...X
634
+ ...W
633
635
  }) => {
634
636
  const {
635
637
  rowSelection: y,
636
638
  expanded: te,
637
639
  setExpanded: ne,
638
640
  onExpandedChange: oe,
639
- onRowSelectionChange: Y,
640
- rowPinning: G,
641
+ onRowSelectionChange: X,
642
+ rowPinning: Y,
641
643
  onRowPinningChange: v
642
- } = xt(), F = C(null), k = C(null), A = C(P);
644
+ } = bt(), F = C(null), k = C(null), A = C(P);
643
645
  A.current = P;
644
- const re = (e) => A.current ? `${A.current}-${e}` : e, [ge] = st(), me = C(Z);
646
+ const re = (e) => A.current ? `${A.current}-${e}` : e, [ge] = lt(), me = C(Z);
645
647
  me.current = Z;
646
648
  const ue = C(N);
647
649
  ue.current = N;
648
- const fe = C(j);
649
- fe.current = j;
650
+ const fe = C($);
651
+ fe.current = $;
650
652
  const pe = C(T);
651
653
  pe.current = T;
652
- const he = C($);
653
- he.current = $;
654
+ const he = C(j);
655
+ he.current = j;
654
656
  const ye = C(J);
655
657
  ye.current = J;
656
658
  const Fe = le(() => o ? Array.from({ length: 10 }, (e, i) => ({
@@ -663,7 +665,7 @@ const tn = ({
663
665
  data: {
664
666
  id: `placeholder-${i}`
665
667
  }
666
- })) : t, [o, t, c]), B = w(
668
+ })) : t, [o, t, c]), H = w(
667
669
  (e, i, s, p) => {
668
670
  const m = i, f = e.getRowModel(), r = f.rows, R = f.rowsById[m], h = e.getState().rowSelection || {};
669
671
  if (!R) return { ...h };
@@ -673,8 +675,8 @@ const tn = ({
673
675
  return e.setRowSelection({}), F.current = null, {};
674
676
  let l;
675
677
  if (n && s && F.current) {
676
- const se = F.current, we = Mt(r, m, se);
677
- we.length === 0 ? l = { ...h, [m]: !0 } : (l = { ...h }, we.forEach((qe) => l[qe.id] = !0));
678
+ const se = F.current, we = Ft(r, m, se);
679
+ we.length === 0 ? l = { ...h, [m]: !0 } : (l = { ...h }, we.forEach((Ve) => l[Ve.id] = !0));
678
680
  } else n && p ? (l = { ...h }, l[m] ? delete l[m] : l[m] = !0) : (l = { ...h }, Object.keys(l).length === 1 && l[m] || (l = { [m]: !0 }));
679
681
  return e.setRowSelection(l), F.current = m, l;
680
682
  },
@@ -686,7 +688,7 @@ const tn = ({
686
688
  return;
687
689
  }
688
690
  const s = e.shiftKey, p = e.ctrlKey || e.metaKey;
689
- B(
691
+ H(
690
692
  k.current,
691
693
  // Pass the main table instance
692
694
  i.id,
@@ -694,7 +696,7 @@ const tn = ({
694
696
  p
695
697
  );
696
698
  },
697
- [B]
699
+ [H]
698
700
  // Depends only on handleSelectionLogic
699
701
  ), Ne = w(
700
702
  (e, i, s) => {
@@ -706,7 +708,7 @@ const tn = ({
706
708
  for (; f >= 0 && f < p.length; ) {
707
709
  const r = p[f];
708
710
  if (!r.original.isDisabled) {
709
- B(
711
+ H(
710
712
  k.current,
711
713
  r.id,
712
714
  s.shiftKey,
@@ -720,14 +722,14 @@ const tn = ({
720
722
  f = e === "down" ? f + 1 : f - 1;
721
723
  }
722
724
  },
723
- [B]
725
+ [H]
724
726
  ), Te = w(
725
727
  (e, i) => {
726
728
  i.original.isDisabled || ye.current?.(i.id, i);
727
729
  },
728
730
  []
729
731
  // eslint-disable-line react-hooks/exhaustive-deps
730
- ), { handleRowKeyDown: xe } = yt({
732
+ ), { handleRowKeyDown: xe } = xt({
731
733
  handleRowSelect: De,
732
734
  handleArrowNavigation: Ne,
733
735
  handleRename: Te
@@ -743,7 +745,7 @@ const tn = ({
743
745
  const p = s.options.meta, m = (r) => {
744
746
  if (r.target instanceof HTMLInputElement || r.target instanceof HTMLButtonElement || r.target instanceof HTMLTextAreaElement || r.target instanceof HTMLSelectElement || r.target instanceof HTMLAnchorElement || r.target.closest("button, a, input, textarea, select"))
745
747
  return;
746
- const h = r.altKey && e.getIsSelected() && !r.shiftKey && !r.ctrlKey && !r.metaKey ? s.getState().rowSelection || {} : B(
748
+ const h = r.altKey && e.getIsSelected() && !r.shiftKey && !r.ctrlKey && !r.metaKey ? s.getState().rowSelection || {} : H(
747
749
  s,
748
750
  // Pass the cell's table instance
749
751
  e.id,
@@ -772,14 +774,14 @@ const tn = ({
772
774
  iconFilled: e.original.iconFilled,
773
775
  img: e.original.img,
774
776
  imgShape: e.original.imgShape,
775
- imgRatio: M,
777
+ imgRatio: K,
776
778
  imgPosition: D,
777
779
  isRowExpandable: e.getCanExpand(),
778
780
  enableNonFolderIndent: x,
779
781
  isRowExpanded: e.getIsExpanded(),
780
782
  isTableExpandable: p?.isExpandable,
781
783
  onExpandClick: (r) => {
782
- r?.altKey ? Ke(e, !e.getIsExpanded()) : e.toggleExpanded();
784
+ r?.altKey ? Me(e, !e.getIsExpanded()) : e.toggleExpanded();
783
785
  },
784
786
  startContent: e.original.startContent,
785
787
  endContent: e.original.endContent,
@@ -795,31 +797,31 @@ const tn = ({
795
797
  // Added onClick handler
796
798
  onDoubleClick: (r) => me.current?.(e.id, e)
797
799
  };
798
- return p?.children ? p.children(f, e, s) : /* @__PURE__ */ g(wt, { ...f, ...L?.cell });
800
+ return p?.children ? p.children(f, e, s) : /* @__PURE__ */ g(vt, { ...f, ...L?.cell });
799
801
  }
800
802
  }
801
803
  ],
802
804
  [
803
805
  c,
804
- B,
806
+ H,
805
807
  xe,
806
808
  u,
807
809
  x,
808
- M,
810
+ K,
809
811
  D,
810
812
  Q
811
813
  ]
812
814
  ), ze = w(
813
815
  (e) => {
814
- Y(Se(e, y));
816
+ X(Se(e, y));
815
817
  },
816
- [Y]
818
+ [X]
817
819
  ), Ie = w(
818
820
  (e) => {
819
- v?.(Se(e, G || {}));
821
+ v?.(Se(e, Y || {}));
820
822
  },
821
823
  [v]
822
- ), je = w(
824
+ ), $e = w(
823
825
  (e) => {
824
826
  ne?.((i) => {
825
827
  const s = e instanceof Function ? e(i) : e;
@@ -827,7 +829,7 @@ const tn = ({
827
829
  });
828
830
  },
829
831
  [ne]
830
- ), V = Xe({
832
+ ), B = We({
831
833
  data: Fe,
832
834
  columns: Ae,
833
835
  state: {
@@ -835,12 +837,12 @@ const tn = ({
835
837
  expanded: b ? !0 : te,
836
838
  rowSelection: y,
837
839
  globalFilter: b,
838
- rowPinning: G
840
+ rowPinning: Y
839
841
  },
840
842
  onRowSelectionChange: ze,
841
843
  onRowPinningChange: Ie,
842
844
  filterFns: {
843
- fuzzy: Me
845
+ fuzzy: Ke
844
846
  },
845
847
  globalFilterFn: "fuzzy",
846
848
  enableRowSelection: !0,
@@ -849,11 +851,11 @@ const tn = ({
849
851
  getRowId: (e) => e.id,
850
852
  enableSubRowSelection: !1,
851
853
  //disable sub row selection
852
- onExpandedChange: je,
854
+ onExpandedChange: $e,
853
855
  getSubRows: (e) => e.subRows,
854
856
  getCoreRowModel: Ze(),
855
- getFilteredRowModel: Ge(),
856
- getExpandedRowModel: Ye(),
857
+ getFilteredRowModel: Ye(),
858
+ getExpandedRowModel: Xe(),
857
859
  filterFromLeafRows: !0,
858
860
  // debugTable: true,
859
861
  // @ts-expect-error: updateData is not required
@@ -861,38 +863,38 @@ const tn = ({
861
863
  () => ({
862
864
  isExpandable: !!d,
863
865
  isLoading: o,
864
- children: W,
866
+ children: G,
865
867
  ...S
866
868
  }),
867
- [d, o, W, S]
869
+ [d, o, G, S]
868
870
  )
869
871
  });
870
872
  ce(() => {
871
- k.current = V;
872
- }, [V]);
873
- const { rows: q } = V.getRowModel(), $e = w(
873
+ k.current = B;
874
+ }, [B]);
875
+ const { rows: V } = B.getRowModel(), je = w(
874
876
  (e, i, s) => {
875
877
  if (!k.current) return;
876
- const p = q[i];
878
+ const p = V[i];
877
879
  if (!p || p.original === void 0) return;
878
880
  s.preventDefault(), s.stopPropagation();
879
881
  const m = Object.keys(y), f = m.includes(e), r = f ? m : [e], R = ee.flatMap(
880
- (h) => kt(
882
+ (h) => Mt(
881
883
  h(s, {
882
884
  rowId: e,
883
885
  rowIndex: i,
884
886
  row: p,
885
887
  selectedRows: r,
886
- selectedTableRows: r.map((l) => V.getRowModel().rowsById[l]).filter((l) => !!l),
888
+ selectedTableRows: r.map((l) => B.getRowModel().rowsById[l]).filter((l) => !!l),
887
889
  isSelected: f
888
890
  })
889
891
  )
890
892
  );
891
893
  R.length > 0 && ge(s, R);
892
894
  },
893
- [ee, q, y, ge]
894
- ), ae = C(null), H = nt({
895
- count: q.length,
895
+ [ee, V, y, ge]
896
+ ), ae = C(null), q = nt({
897
+ count: V.length,
896
898
  estimateSize: () => E || 34,
897
899
  //estimate row height for accurate scrollbar dragging
898
900
  getScrollElement: () => ae.current,
@@ -901,21 +903,21 @@ const tn = ({
901
903
  overscan: 5
902
904
  }), be = C(void 0);
903
905
  ce(() => {
904
- if (!K || be.current === K) return;
905
- const e = q.findIndex((i) => i.id === K);
906
- e < 0 || (be.current = K, F.current = K, H.scrollToIndex(e, { align: "center" }), requestAnimationFrame(
906
+ if (!M || be.current === M) return;
907
+ const e = V.findIndex((i) => i.id === M);
908
+ e < 0 || (be.current = M, F.current = M, q.scrollToIndex(e, { align: "center" }), requestAnimationFrame(
907
909
  () => requestAnimationFrame(() => {
908
910
  ae.current?.querySelector(
909
- `#${CSS.escape(re(K))}`
911
+ `#${CSS.escape(re(M))}`
910
912
  )?.querySelector('[tabindex="0"]')?.focus({ preventScroll: !0 });
911
913
  })
912
914
  ));
913
- }, [K, q, H]);
915
+ }, [M, V, q]);
914
916
  const Le = w(
915
917
  (e) => {
916
- e && H.measureElement(e);
918
+ e && q.measureElement(e);
917
919
  },
918
- [H]
920
+ [q]
919
921
  ), Pe = w(
920
922
  (e) => {
921
923
  if (!I) return;
@@ -924,29 +926,29 @@ const tn = ({
924
926
  },
925
927
  [I, o]
926
928
  ), {
927
- hasShortcuts: Be,
928
- handleShortcut: Ve,
929
+ hasShortcuts: He,
930
+ handleShortcut: Be,
929
931
  dialog: ie
930
- } = Et(U?.table);
932
+ } = kt(U?.table);
931
933
  return /* @__PURE__ */ O(Re, { children: [
932
934
  /* @__PURE__ */ O(
933
- mt,
935
+ ft,
934
936
  {
935
937
  ref: ae,
936
938
  onScroll: Pe,
937
939
  onClick: (e) => {
938
- u && !e.target.closest("tr") && (V.setRowSelection({}), F.current = null);
940
+ u && !e.target.closest("tr") && (B.setRowSelection({}), F.current = null);
939
941
  },
940
- ...X,
942
+ ...W,
941
943
  onKeyDown: (e) => {
942
- X.onKeyDown?.(e);
944
+ W.onKeyDown?.(e);
943
945
  const i = e.target;
944
- if (!Be || ie || e.defaultPrevented || ["INPUT", "TEXTAREA"].includes(i.tagName) || i.isContentEditable) return;
946
+ if (!He || ie || e.defaultPrevented || ["INPUT", "TEXTAREA"].includes(i.tagName) || i.isContentEditable) return;
945
947
  const s = i.closest("tr")?.id;
946
948
  if (!s) return;
947
949
  const p = P ? s.slice(P.length + 1) : s;
948
- Ve(e, () => {
949
- const { rowsById: m } = V.getRowModel(), f = (h) => {
950
+ Be(e, () => {
951
+ const { rowsById: m } = B.getRowModel(), f = (h) => {
950
952
  const l = m[h]?.original;
951
953
  if (!l) return;
952
954
  const { entityType: se } = l.data;
@@ -966,24 +968,24 @@ const tn = ({
966
968
  };
967
969
  });
968
970
  },
969
- className: z(X.className, { isLoading: o, fitContent: de }),
971
+ className: z(W.className, { isLoading: o, fitContent: de }),
970
972
  children: [
971
973
  !a && /* @__PURE__ */ g("table", { children: /* @__PURE__ */ g(
972
974
  "tbody",
973
975
  {
974
976
  style: {
975
- height: `${H?.getTotalSize()}px`
977
+ height: `${q?.getTotalSize()}px`
976
978
  //tells scrollbar how big the table is
977
979
  },
978
- children: H?.getVirtualItems().map((e) => {
979
- const i = q[e.index];
980
+ children: q?.getVirtualItems().map((e) => {
981
+ const i = V[e.index];
980
982
  return /* @__PURE__ */ g(
981
983
  "tr",
982
984
  {
983
985
  "data-index": e.index,
984
986
  ref: Le,
985
987
  id: re(i.id),
986
- onContextMenu: (s) => $e(i.id, e.index, s),
988
+ onContextMenu: (s) => je(i.id, e.index, s),
987
989
  ...L?.row,
988
990
  style: {
989
991
  transform: `translateY(${e.start}px)`,
@@ -998,28 +1000,28 @@ const tn = ({
998
1000
  })
999
1001
  }
1000
1002
  ) }),
1001
- !!a && /* @__PURE__ */ g(it, { error: a })
1003
+ !!a && /* @__PURE__ */ g(st, { error: a })
1002
1004
  ]
1003
1005
  }
1004
1006
  ),
1005
- ie && /* @__PURE__ */ g(St, { contribution: ie.contribution, context: ie.context })
1007
+ ie && /* @__PURE__ */ g(Rt, { contribution: ie.contribution, context: ie.context })
1006
1008
  ] });
1007
1009
  };
1008
1010
  export {
1009
- St as A,
1010
- ft as C,
1011
- ht as E,
1012
- Gt as H,
1013
- bt as R,
1014
- tn as S,
1015
- mt as T,
1011
+ Rt as A,
1012
+ ht as C,
1013
+ yt as E,
1014
+ Zt as H,
1015
+ wt as R,
1016
+ nn as S,
1017
+ ft as T,
1016
1018
  Yt as a,
1017
- Zt as b,
1018
- wt as c,
1019
+ en as b,
1020
+ vt as c,
1019
1021
  ke as d,
1020
- en as e,
1021
- vt as f,
1022
- Et as g,
1023
- Ct as s,
1024
- xt as u
1022
+ tn as e,
1023
+ St as f,
1024
+ kt as g,
1025
+ Et as s,
1026
+ bt as u
1025
1027
  };