@lincros-ui/components 0.2.22 → 0.2.25

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/index.cjs CHANGED
@@ -4942,7 +4942,7 @@ function useSidebarState(routePaths) {
4942
4942
  return expandedMenus.includes(menuTitle);
4943
4943
  };
4944
4944
  const isMenuItemActive = (url) => {
4945
- return location.pathname.includes(url);
4945
+ return location.pathname === url;
4946
4946
  };
4947
4947
  const isExactMenuItemActive = (url) => {
4948
4948
  return location.pathname === url;
@@ -5482,20 +5482,28 @@ function ProtectedRoute({ children, useAuthContext, tenantId, useSSO, routePaths
5482
5482
  }
5483
5483
  );
5484
5484
  }
5485
- var FilterBar = ({ onFilterChange, filters, operators, taskTypes, businessUnits }) => {
5485
+ var FilterBar = ({
5486
+ onFilterChange,
5487
+ filters,
5488
+ operators,
5489
+ taskTypes,
5490
+ businessUnits,
5491
+ statusOptions: statusOptionsProp,
5492
+ defaultStatus: defaultStatusProp
5493
+ }) => {
5486
5494
  const [openPopovers, setOpenPopovers] = React37.useState({
5487
5495
  businessUnits: false,
5488
5496
  operators: false,
5489
5497
  taskTypes: false,
5490
5498
  status: false
5491
5499
  });
5492
- const statusOptions = [
5493
- { value: "pending", label: "Pendente" },
5500
+ const statusOptions = statusOptionsProp ?? [
5494
5501
  { value: "in-progress", label: "Em Andamento (IA)" },
5495
- { value: "human-interaction", label: "Em Andamento (Humano)" },
5502
+ { value: "human-interaction", label: "Pendente (Humano)" },
5496
5503
  { value: "completed", label: "Conclu\xEDdo" },
5497
5504
  { value: "alert", label: "Precisam de Intera\xE7\xE3o" }
5498
5505
  ];
5506
+ const defaultStatus = defaultStatusProp ?? ["in-progress", "human-interaction"];
5499
5507
  const updateFilter = (key, value) => {
5500
5508
  const newFilters = { ...filters, [key]: value };
5501
5509
  onFilterChange(newFilters);
@@ -5504,7 +5512,7 @@ var FilterBar = ({ onFilterChange, filters, operators, taskTypes, businessUnits
5504
5512
  if (key === "vehicleId" || key === "operatorType") {
5505
5513
  updateFilter(key, "");
5506
5514
  } else if (key === "status") {
5507
- updateFilter(key, ["pending", "in-progress", "human-interaction"]);
5515
+ updateFilter(key, defaultStatus);
5508
5516
  } else {
5509
5517
  updateFilter(key, []);
5510
5518
  }
@@ -5516,8 +5524,7 @@ var FilterBar = ({ onFilterChange, filters, operators, taskTypes, businessUnits
5516
5524
  taskTypes: [],
5517
5525
  businessUnits: [],
5518
5526
  operatorType: "",
5519
- status: ["pending", "in-progress"],
5520
- // Manter padrão ao limpar tudo
5527
+ status: defaultStatus,
5521
5528
  startDate: "",
5522
5529
  endDate: ""
5523
5530
  };
@@ -5538,7 +5545,7 @@ var FilterBar = ({ onFilterChange, filters, operators, taskTypes, businessUnits
5538
5545
  ...filters.taskTypes,
5539
5546
  ...filters.businessUnits,
5540
5547
  // Não contar status como filtro ativo se for o padrão
5541
- ...JSON.stringify([...filters.status].sort()) !== JSON.stringify(["human-interaction", "in-progress", "pending"]) ? filters.status : []
5548
+ ...JSON.stringify([...filters.status].sort()) !== JSON.stringify([...defaultStatus].sort()) ? filters.status : []
5542
5549
  ].filter((value) => value !== "").length;
5543
5550
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white border-b border-gray-200 p-4 space-y-4", children: [
5544
5551
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [