@snksergio/design-system 0.30.3 → 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.
@@ -3472,9 +3472,10 @@ function TableToolbarViews({
3472
3472
  }) {
3473
3473
  const maxCustomTabs = Math.max(0, maxTabs - 1);
3474
3474
  const initialIds = useMemo$1(
3475
- // Só auto-pina views do próprio usuário (owner === myOwnerKey). As de outros
3476
- // (públicas) viram tab quando explicitamente aplicadas (via activeViewId).
3477
- () => views.filter((v) => v.owner === myOwnerKey).slice(0, maxCustomTabs).map((v) => v.id),
3475
+ // Auto-pina os presets do DS (owner === "preset" as abas fixas de defaultViews)
3476
+ // e as views do próprio usuário (owner === myOwnerKey). As públicas de OUTROS
3477
+ // usuários viram tab quando explicitamente aplicadas (via activeViewId).
3478
+ () => views.filter((v) => v.owner === myOwnerKey || v.owner === "preset").slice(0, maxCustomTabs).map((v) => v.id),
3478
3479
  // eslint-disable-next-line react-hooks/exhaustive-deps
3479
3480
  []
3480
3481
  );
@@ -3491,7 +3492,7 @@ function TableToolbarViews({
3491
3492
  for (const id of addedIds) {
3492
3493
  if (next.length >= maxCustomTabs) break;
3493
3494
  const v = views.find((vv) => vv.id === id);
3494
- if (v && v.owner !== myOwnerKey) continue;
3495
+ if (v && v.owner !== myOwnerKey && v.owner !== "preset") continue;
3495
3496
  next = [...next, id];
3496
3497
  }
3497
3498
  return next;
@@ -3505,10 +3506,10 @@ function TableToolbarViews({
3505
3506
  const customTabs = renderIds.map((id) => views.find((v) => v.id === id)).filter((v) => !!v).map((v) => ({
3506
3507
  id: v.id,
3507
3508
  name: typeof v.name === "string" ? v.name : String(v.name),
3508
- // Mostra o "X" (desfixar/fechar) nas views do usuário E na view ATIVA no
3509
- // momento assim pra fechar uma view pública de outro que foi aplicada
3510
- // (o X desfixa/deseleciona; não deleta a view de ninguém).
3511
- custom: v.owner === myOwnerKey || v.id === activeViewId
3509
+ // Mostra o "X" (desfixar/fechar) nas views do usuário E na view pública de
3510
+ // OUTRO que foi aplicada (o X desfixa/deseleciona; não deleta a view de
3511
+ // ninguém). Preset do DS é aba FIXA read-only nunca mostra X.
3512
+ custom: v.owner === myOwnerKey || v.id === activeViewId && v.owner !== "preset"
3512
3513
  }));
3513
3514
  const defaultName = customTabs.length === 0 ? soloLabel : "Default";
3514
3515
  return [{ id: DEFAULT_VIEW_ID, name: defaultName, custom: false }, ...customTabs];
@@ -22419,4 +22420,4 @@ export {
22419
22420
  DataTableLoading as y,
22420
22421
  DataTableNoResults as z
22421
22422
  };
22422
- //# sourceMappingURL=panel-CEkyoGiO.mjs.map
22423
+ //# sourceMappingURL=panel-8FiBxwcI.mjs.map