@snksergio/design-system 0.30.2 → 0.30.4

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.
@@ -3494,9 +3494,10 @@ function TableToolbarViews({
3494
3494
  }) {
3495
3495
  const maxCustomTabs = Math.max(0, maxTabs - 1);
3496
3496
  const initialIds = React.useMemo(
3497
- // Só auto-pina views do próprio usuário (owner === myOwnerKey). As de outros
3498
- // (públicas) viram tab quando explicitamente aplicadas (via activeViewId).
3499
- () => views.filter((v) => v.owner === myOwnerKey).slice(0, maxCustomTabs).map((v) => v.id),
3497
+ // Auto-pina os presets do DS (owner === "preset" as abas fixas de defaultViews)
3498
+ // e as views do próprio usuário (owner === myOwnerKey). As públicas de OUTROS
3499
+ // usuários viram tab quando explicitamente aplicadas (via activeViewId).
3500
+ () => views.filter((v) => v.owner === myOwnerKey || v.owner === "preset").slice(0, maxCustomTabs).map((v) => v.id),
3500
3501
  // eslint-disable-next-line react-hooks/exhaustive-deps
3501
3502
  []
3502
3503
  );
@@ -3513,7 +3514,7 @@ function TableToolbarViews({
3513
3514
  for (const id of addedIds) {
3514
3515
  if (next.length >= maxCustomTabs) break;
3515
3516
  const v = views.find((vv) => vv.id === id);
3516
- if (v && v.owner !== myOwnerKey) continue;
3517
+ if (v && v.owner !== myOwnerKey && v.owner !== "preset") continue;
3517
3518
  next = [...next, id];
3518
3519
  }
3519
3520
  return next;
@@ -3527,10 +3528,10 @@ function TableToolbarViews({
3527
3528
  const customTabs = renderIds.map((id) => views.find((v) => v.id === id)).filter((v) => !!v).map((v) => ({
3528
3529
  id: v.id,
3529
3530
  name: typeof v.name === "string" ? v.name : String(v.name),
3530
- // Mostra o "X" (desfixar/fechar) nas views do usuário E na view ATIVA no
3531
- // momento assim pra fechar uma view pública de outro que foi aplicada
3532
- // (o X desfixa/deseleciona; não deleta a view de ninguém).
3533
- custom: v.owner === myOwnerKey || v.id === activeViewId
3531
+ // Mostra o "X" (desfixar/fechar) nas views do usuário E na view pública de
3532
+ // OUTRO que foi aplicada (o X desfixa/deseleciona; não deleta a view de
3533
+ // ninguém). Preset do DS é aba FIXA read-only nunca mostra X.
3534
+ custom: v.owner === myOwnerKey || v.id === activeViewId && v.owner !== "preset"
3534
3535
  }));
3535
3536
  const defaultName = customTabs.length === 0 ? soloLabel : "Default";
3536
3537
  return [{ id: DEFAULT_VIEW_ID, name: defaultName, custom: false }, ...customTabs];
@@ -22439,4 +22440,4 @@ exports.useColumnResize = useColumnResize;
22439
22440
  exports.useColumnWidths = useColumnWidths;
22440
22441
  exports.useDataTableContext = useDataTableContext;
22441
22442
  exports.useFloatingPanelResize = useFloatingPanelResize;
22442
- //# sourceMappingURL=panel-B_SSIEDs.cjs.map
22443
+ //# sourceMappingURL=panel-BOrETqXz.cjs.map